Selecting Input 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
shivakumar
Participant
Posts: 31
Joined: Wed Mar 17, 2004 3:33 am

Selecting Input File

Post by shivakumar »

I have to create a parrallel job in that I am taking input from a Flat file.Suppose I am having a Indicator Flag it is having Vaues as 'C' and 'I'.If i get the Flag Value then I have to take the Input From File1 and If I Get the Flag Value as 'N' then I have to take the Input from File 2.

If the Meta data of the Two files are same then How Can Handle this?
If the Meta data of the Two files are different then How Can I handle this?

Without Writing a Script Can I handle this in DataStage Or Else I have to Call a Unix Routine for this , If so then How can I call that Routine.

Thanks and Regards
Siva
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi and Welcome aboard :),
You can do it in DataStage either way.
You can use parameters and sequence jobs to conditionally execute processing flow.
You can use DS basic language if you need it.
You can use multiple instance jobs if you want to use the same job (in case the Meta data of the Two files is the same) .
All depending on the knowladge you have and the need.

How is the indicator flag supplied?

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Read the file using Execute command activity in the Job Sequence and pass the value of indicated as command output by echo <indicator field>.
Use NestedCondition activity receive the command output as parameter and check for the value. Based on the value divert two output link.
By this you can handle either same layout or different layout.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply