Hi,
in a datastage project I have s a batch (name A) that is attached and runned by an another batch (name B).
After the end of the run of the batch A, can A return a value to the batch B?
thanks in advance
Mario
can a batch return a value?
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
this is possible if you are willing to use variables, the way we did it was to have several 'control' jobs pass variables to each other and so react based on the variable values recieved/passed.
will variable passing help? i.e. we have batch A and batch B. Batch A consists of job 1, 2, 3 and batch B consists of job 4, 5, 6. if job 2 fails, batch A has a status of failed and carries that status to batch B. This status triggers an email msg to the administrator and batch B to start batch A again to see if something has changed to allow job 2 to finish. it can be more flexible, but this is the basis.
this is best done not using the job sequencer, as we have found it is still a little limited; but coding a 'job control' using BASIC does the trick.. its just a bit more work.
dnzl
will variable passing help? i.e. we have batch A and batch B. Batch A consists of job 1, 2, 3 and batch B consists of job 4, 5, 6. if job 2 fails, batch A has a status of failed and carries that status to batch B. This status triggers an email msg to the administrator and batch B to start batch A again to see if something has changed to allow job 2 to finish. it can be more flexible, but this is the basis.
this is best done not using the job sequencer, as we have found it is still a little limited; but coding a 'job control' using BASIC does the trick.. its just a bit more work.
dnzl
dnzl
"what the thinker thinks, the prover proves" - Robert Anton Wilson
"what the thinker thinks, the prover proves" - Robert Anton Wilson
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Each batch can "see" the other's user status area. You could use this variable for communication. It persists even after the batch has finished.
Use DSSetUserStatus() function to assign a value to the user status area, and DSGetJobInfo(hJob, DSJ.USERSTATUS) to retrieve it.
Use DSSetUserStatus() function to assign a value to the user status area, and DSGetJobInfo(hJob, DSJ.USERSTATUS) to retrieve it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.