Dynamic file dynamic column

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
pkothana
Participant
Posts: 50
Joined: Tue Oct 14, 2003 6:12 am

Dynamic file dynamic column

Post by pkothana »

Hi,
It is required to dynamically pick columns (headers) from a particular file based on some condition. Again the file name is also dynamic ( "xyz"+ID+MMDDYY). ID and MMDDYY will keep on changing. I have to pick ID from the file name and attach it to the selected columns.

For example :
File Name : xyz_123_102803 (ID = 123 and date 10/28/03)
Columns : abc_I, sdf_I, sde_D (headers are dynamic i.e. in the next file we will have different headers)
I have to select abc_I and sdf_I columns.

Final output will be a file with following header names :
123abc_I, 123sdf_I (123 being the ID)


I was wondering if it is possible in Datastage PX. If yes, then how can we achieve this? There are so many questions arising here. How to pick a file with dynamic name (File path is fixed)? Then how can we specify dynamic column names in the file format? How can we select the columns based on column name format? How can we pick ID from the filename and attach the same to the columns?

Any help in this regard is highly appreciated.

Thanks a Lot in advance

Best Regards
Pinkesh
Post Reply