Need a logic to pic a date attached file

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
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Need a logic to pic a date attached file

Post by rajan.n »

Hello all,[:)]
Hope some one throws some light [:)]
my requirement.
1) Daily we get file name 20080424ABC.txt and 20080424ABC_XYZ.txt (date concatinated to the file name ) in to our folder say \\z\files\
2)Now my job which reads "20080424ABC.txt " is with a seq file. I can not hardcode daily that date appended file. Important thing is we may run job at any time i.e daily or once in 2 days or 5 days once.So i may have 5 files since i run the job if am ruunning it after 5 days...my job should process them one by one the sequence is imprtant .
3) I want a logic - how can we parameterise my job and also have tht file name(20080424ABC) to be a field in my job so that we store that name to corresponding row loaded from respective file.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Read all the files in a folder and pass it as parameter to the job, using a script. Or use execute command activity to pass as parameter and LoopActivity to loop through each Filename.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Post by rajan.n »

kumar_s wrote:Read all the files in a folder and pass it as parameter to the job, using a script. Or use execute command activity to pass as parameter and LoopActivity to loop through each Filename. ...
thanks for the quick reply ,

Can you give me the process how to send a folder as a parameter in a script ( i have to use a bat script )
can i have code for that ?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

I was referring to pass all the files available in the particular folder. You can pass all the *ABC_XYZ.txt to the file one after another.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply