File name with wild card on basic

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not as far as I know. You'd need to look up the current name (with a wildcard 'dir' perhaps) and then open it directly once you know the name.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes you can.

Open the file with OpenSeq then use the Status statement on the file variable. Field #6 of the dynamic array returned by Status contains the file size.

Code: Select all

OpenSeq filepath To file.fvar
Then
   Status FileInfo From file.fvar
   Then
      FileSize = FileInfo<6,1,1>
   End
End
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The part I was addressing was the 'using a wildcard on the file name' part. I don't believe that OpenSeq would support wildcards... or does it? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, but... Yeah, but...

Your routine could process the wildcard and check the size of each file in turn. Invoke ls through DSExecute, for example.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, then basically what I posted. (no pun intended)
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply