Page 1 of 1

Ds job should run daily and pick the current date file.

Posted: Thu Feb 09, 2012 8:37 am
by Cherukuri
Hi,

I have a requirment as explained below:

Question : Daily files are placed in '/tmp/ds/sources/' the files are in .csv formate

I have to dev a Datastage job (and load to the path '/tmp/ds/target/') in such a way the job should run daily and should pick the present date file, if i did not get a file on the perticular day it should NOT pick the old file and more over the job should not run on that day (because no file exists on that day).

for example the source files are :

source_mrc_06_02_2012.csv
source_mrc_07_02_2012.csv
source_mrc_08_02_2012.csv
'
'
'
'

Please could expertise explan me how to approach this requirement.

Thanks in advance.

cheru.

Posted: Thu Feb 09, 2012 9:12 am
by chulett
Again, start by posting in the correct forum - the FAQ Discussion forum is not it.

Posted: Thu Feb 09, 2012 9:14 am
by pandeesh
I think it's better to handle this in sequence. Write a script and call this in execute command activity. Setup the trigger conditions accordingly.

Posted: Thu Feb 09, 2012 10:13 am
by chulett
Something has to run to check the files, so yes a Sequence job would be appropriate and it could trigger the processing job only if a file is found.

Posted: Thu Feb 09, 2012 10:17 am
by chulett
I would argue against a "current date" file check but would implement an "unprocessed" file check. Move/archive the files elsewhere after processing so that anything found in that directory needs to be loaded, this allows you to catch up if need be.

Re: Ds job should run daily and pick the current date file.

Posted: Fri Feb 10, 2012 6:27 am
by Cherukuri
Hi,

Please revert me with the solution for the requirement above.

Regards,
Cheru.

Posted: Fri Feb 10, 2012 8:15 am
by chulett
It's been "reverted"... do you have any specific questions?

Posted: Tue Feb 14, 2012 6:29 am
by Cherukuri
Hi,

Please also help in creating a script as suggesed by Pandeesh.

Regards,
Cheru.

Posted: Tue Feb 14, 2012 6:50 am
by pandeesh
What help you require in creating a script?
You can try it yourself and if you struggle ,please post here.

Posted: Tue Feb 14, 2012 3:27 pm
by ray.wurlod
That is, we're more here to help you to learn than to provide solutions. That's called "consulting" and comes at a price.