View previous topic :: View next topic
|
Author |
Message |
krishna_Murty Warnings : 2 New User
Joined: 17 Sep 2006 Posts: 24
|
|
|
|
I have a situation that one of my production jobs is getting a Return-Code of 4, so this job is not going into Abend Queue, hence I want to have an alternate method like writing a Cobol Program which will enhance this return code of 4 (only if it is 4, if not 4, it should not do this process) from previous step and enhance it to 8, so that the job can give a abend and thus the job is routed to Abend Queue. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Add a step with someting like 'IF RC=4'.
In this step, you have few options:
1. Use IDCAM's SET MAXCC command.
2. Use COBOL program with 'COMPUTE RETURN-CODE = 8' statement.
3. Use REXX with 'EXIT 8'.
4. Use REXX/ISPF with 'ZISPFRC = 8'.
etc.
O. |
|
Back to top |
|
|
meetreks
New User
Joined: 28 Sep 2006 Posts: 26 Location: Edinburgh
|
|
|
|
You can use statements like IF STEP1.RC = 4 THEN SET STEP1.RC=8 and manipulate the job with these statements. |
|
Back to top |
|
|
krishna_Murty Warnings : 2 New User
Joined: 17 Sep 2006 Posts: 24
|
|
|
|
Hi ofer71
Can i know through the Cobol Point of view, as to how tapping the return code of the previous step in to the next Cobol Program step, where i would be tapping the prevous step's return code.
Is it through PARM parameter or some thing like that.
Please help me.
Thanks in advance.
Hi Ram
Can we forcefully set the Return Code of a step to 8, i was thinking that by the RC of previous step, we can only execute a step. i.e if RC = 4 then execute STEP2 Else Execute Step 3.
However Ram , with ur advice, i am thinking whether if i code as below
that IF STEP1.RC = 4 Execute STEP2 ELSE Execute STEP3,
where in STEP2 always i write a cobol step which leads to RC 8. Anyways i will try with this idea. Thanks very much Ram
Regards
Krishna |
|
Back to top |
|
|
Kevin
Active User
Joined: 25 Aug 2005 Posts: 234
|
|
|
|
This is what you're thinking, right?
Code: |
//STEP1 EXEC PGM=SOMEPGM
//*
// IF STEP1.RC = 4 THEN
//STEP2 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SET MAXCC=8
/*
// ELSE
//STEP3 EXEC PGM=ANOTHERPGM
//...
// ENDIF
|
|
|
Back to top |
|
|
krishna_Murty Warnings : 2 New User
Joined: 17 Sep 2006 Posts: 24
|
|
|
|
Thanks Kevin
What you have coded if it works , it will be of great help to me, i will code and will comeback.
Regards
Krishna |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Just for general knowledge:
You can obtain step's RC from within a program by mapping through SCT. The return code is stored in STCSEXEC. |
|
Back to top |
|
|
|