Data Field as a FileName

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
Nisusmage
Premium Member
Premium Member
Posts: 103
Joined: Mon May 07, 2007 1:57 am

Data Field as a FileName

Post by Nisusmage »

Hello All,

I was just wondering if there is any known way of using a data field as a filename in a sequential stage.

I was thinking, that I could maybe loop through the records and pull all the records into a table with an autonumber i.e.

Code: Select all

FileNamesTable
ID,FileNameCode,FileName
1,BF,BobsFile
2,JDF,JimmysDinerFile
3,COC,ChipperOntheCorner
And then use the autonumber to loop through with a controller. and pushing the ID into a job as a parameter and looking up the filename and using that in the next job as a parameter. And then using the Parameter in the Sequential File name.

Shoo .. is there any other way to do it..?? .. Because this is a part of a larger job system, and it seems as if it's just getting too complicated to maintain stability.
~The simpliest solutions are always the best~
~Trick is to understand the complexity to implement simplicity~
Nisusmage
Premium Member
Premium Member
Posts: 103
Joined: Mon May 07, 2007 1:57 am

Post by Nisusmage »

NeverMind. . I got that to work. It's clean enough.

I have 3 jobs and 1 sequence.

1) The first job populates a Hashfile with ID and Filename returns the last @OUTROWNUMBER to the UserStatus.
2) The controller then loops through 1 to the last Job's UserStatus and returns the FileName to the UserStatus.
2.1) This Job follows the second job using the previous Jobs UserStatus as a parameter and populates the filename.

Works like a charm.
~The simpliest solutions are always the best~
~Trick is to understand the complexity to implement simplicity~
Post Reply