View previous topic :: View next topic
|
Author |
Message |
Pierre Lemieux
New User
Joined: 17 May 2007 Posts: 1 Location: Qu?bec
|
|
|
|
Hi!
I execute a batch job with 2 steps. Step 1 produce any return code.
How to read this return code in the Step2.
Step2 is an assembler program that should be able to read the previous step without having to mention the previous step's name.
Is this possible ? If so how ?
Thanks ! |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi Pierre !
...that should be able to read the previous step without having to mention the previous step's name.
Do you really believe that ??? Why ???
As an old assembler programmer, I can tell you how to get all the information of the TCB, ACB or the TIOT during runtime in an Ass-Pgm.
Or how to modify the JobFileControlblock or something else. But these are all informations during actual runtime. I actually have no idea of getting the rc of a previous already ended step. Without reading SMF-Records.
In fact of having to do this, i would transfer the rc via a temporary dataset between these programms. Quiet simple an easy.
Please let me know, if you have any solution for an ass-pgm.
Regards, UmeySan |
|
Back to top |
|
|
ganeshptrk
New User
Joined: 04 Apr 2007 Posts: 17 Location: Chennai
|
|
|
|
The return code set by step1 is stored in R15. In your assembler program verify the contents of R15.
If fact, at end of Assembler program, just before exiting, we set the return code in R15 and return to address specified in R14. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
ganeshptrk wrote: |
The return code set by step1 is stored in R15. In your assembler program verify the contents of R15.
If fact, at end of Assembler program, just before exiting, we set the return code in R15 and return to address specified in R14. |
And what makes you think that nothing else happens between the end of one step and the beginning of the next. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you find a way to retrieve the rc you want, how will it be used?
As UmeySan posted, this is not a typical requirement.
If you describe what functionality you need to solve some business requirement, we can probably offer suggestions.
If you are determined to find exactly this, be prepared to do a lot of digging (unless some kind soul happens to have and will post the code here). The info is in the system (as this is how condition code testing is supported), but if i recall, it is not as simple as looking into control blocks of the currently executing step.
As i mentioned, if you describe your requirement (other than the retrieving of a prior step's rc), we may be able to offer suggestions. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
There must be something out there capable of doing so. How else would the COND parameter be able do decide to execute the next step or not? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Yes, it is in the system (once upon a time, in a much earlier version of the operating system (before it was re-named to MVS), i chased down similar info, but it was so long ago that the specifics have left my mind. . . ).
As it would be a rare requirement, i don't know if anyone will have code to do this that is not proprietary. We'll see |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
@ganeshptrk:
Yes, you could set R15 for Rc. But allways your applikation-programm
runs as a sub-programm under control of the system. So only the System can interpret this rc and initiate something.
@Craq Giegerich:
Right man! There's happening al lot of things!!!
@Dick & Bitneuker:
Yes, there is something. The JES-Routines and Services. And all these fucking control-blocks. If one has time enought, he could spend it in analysing how the IF-THEN-ELSE construct in the JCL is been realized.
As i worked in an RACF projekt, we had to analyse and modify RACF control-blocks and write exits and so on, depending on interactive system events. Terrible and nerve-racking work. Cost's me some brain cells and a lot of bucks for red wine.
@All:
So why not using this services. Just add al little IF construction in the
JCL. IF previous Steps ends with RC=0 execute next pgm with PARM=OK,
else execute next pgm with PARM=NO. Then interpret the parm in the applikation an do something you want.
I think, we need no doctoral dissertations. What we really need are practicable and efficient solutions. But also simply created, that everyone of us could understand what another guy had done there. And this also just in the middle of the night after two bottles of red wine and an exhausting hour with two blonds.
We don't get an iron cross ore a medal of honour for a high sophisticated
solution. So if your are only a applikation programmer, need the tools, which are allready there.
Regards & nice weekend
UmeySan |
|
Back to top |
|
|
|