Professional Documents
Culture Documents
Scenario:
There is a DS Job, in which source is Oracle Enterprise Stage and target is a
Sequential Stage. In the extraction query, WHERE condition is parameterized. That
means every time the Job triggers it will prompt the developer to provide the value
for parameter. The DS Job looks like below.
Solution:
Step 1: Create a Job Sequence that includes the activities as shown below.
Step 2: In ExecCmd_NoRecords activity, need to identify the record count to run the
job as many times the number of records available in DEPT_INPUT.TXT file.
With the specified command we will generally get the output like this.
But we need only the record number so we are going to get this by using user
variable activity in the next step.
Step 3: In UsrVar_NoOfRecords activity use the variable and write the function to get
first value from the output returned in Step 2.
So NoOfRecords variable now holds the value 3 after exuting the specified
command in user variables activity. This output value will be the input for Start Loop
activity because this is nothing but how many times the DS Job should get trigger.
Thats it. There is nothing to define in the End Loop activity. Now try triggering the
DS Job Sequence.
Input data in the Source Oracle DEPT table:
After executing the Job Sequence successfully, see the job status in DS Director and
check output in the target file
E:\DATASTAGE_PRACTICE\TARGETS\DEPT_TARGET.TXT
DS Job Sequence status:
DS Job status(Main):
Happy learning!!
Thogata
Author Nagapratap