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

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Cherukuri
Participant
Posts: 46
Joined: Wed Jul 25, 2007 2:43 am
Location: India
Contact:

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

Post 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.
Cheru
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Again, start by posting in the correct forum - the FAQ Discussion forum is not it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post 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.
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Cherukuri
Participant
Posts: 46
Joined: Wed Jul 25, 2007 2:43 am
Location: India
Contact:

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

Post by Cherukuri »

Hi,

Please revert me with the solution for the requirement above.

Regards,
Cheru.
Cheru
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's been "reverted"... do you have any specific questions?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Cherukuri
Participant
Posts: 46
Joined: Wed Jul 25, 2007 2:43 am
Location: India
Contact:

Post by Cherukuri »

Hi,

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

Regards,
Cheru.
Cheru
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

What help you require in creating a script?
You can try it yourself and if you struggle ,please post here.
pandeeswaran
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply