Open statement for hash files

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

This is excerpted from a function someone else wrote, so YMMV :)

FileName = Arg1

OpenPath FileName To FileHandle Then
... do stuff here :)
End Else
Ans = @False
Call DSLogFatal(" unable to open file, status = " : Status(), "YourRoutineName")
End

You might want to read up on OpenPath and Read in the Universe Basic Help file.

Hope this helps,
Tony
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The only "difference" between the two is that, where the hashed file is created in an account, an entry is made in the VOC (vocabulary) for that account, so that the OPEN statement can be used. If the hashed file is created in a directory there is on entry in the VOC, so that the OPENPATH statement must be used. OPENPATH can also be used if the hashed file is created in an account.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply