wrapped stage

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
Mallayagari
Participant
Posts: 15
Joined: Tue Apr 20, 2004 3:10 am

wrapped stage

Post by Mallayagari »

Hi,
I need to run a sequencer in multiple instance mode. I have file say EMP_ID. For each EMP_ID I need to run the sequencer with EMP_ID as the parameter to the sequencer. [b]My requirement is that at any given time only N number of instances should be running untill it finishes for all the EMP_ID.[/b] Ex if in dev N=4 only four instances should be running and once the first EMP_ID is done it should take the 5th EMP_ID and run the sequencer.
I am planning to create a PX job which reads this sequjential file (which as EMP_ID list) and use the wrapped stage that calls the unix command DSJOB run command. When I try I am not able run any unix command from the wrapped stage.
[b]Can wrapped stage be used to run a unix script for each input row(sinlge column)?[/b]

Any other better solution?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Using a server job or, better yet, logic in a job sequence is going to be much simpler than attempting to do in PX with a wrapped stage.

Is your EMP_ID file a sequential one with just the EMP_IDs in it and no other information? If so, you could read the file into a variable (just "cat" the file as an external command), then use that variable as your loop condition.

Try getting that basic loop to work first, then you can start adding functionality regarding concurrent multiple instance runs.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a routine in the master control sequence that (a) checks how many instances are already running and (b) invokes the sub-sequence via DataStage API functions.
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