IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can we enhance a return code of 4 to 8


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krishna_Murty
Warnings : 2

New User


Joined: 17 Sep 2006
Posts: 24

PostPosted: Sun Oct 01, 2006 5:20 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Oct 02, 2006 1:47 pm
Reply with quote

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
View user's profile Send private message
meetreks

New User


Joined: 28 Sep 2006
Posts: 26
Location: Edinburgh

PostPosted: Mon Oct 02, 2006 8:48 pm
Reply with quote

You can use statements like IF STEP1.RC = 4 THEN SET STEP1.RC=8 and manipulate the job with these statements.
Back to top
View user's profile Send private message
krishna_Murty
Warnings : 2

New User


Joined: 17 Sep 2006
Posts: 24

PostPosted: Mon Oct 02, 2006 9:35 pm
Reply with quote

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
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Mon Oct 02, 2006 11:35 pm
Reply with quote

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
View user's profile Send private message
krishna_Murty
Warnings : 2

New User


Joined: 17 Sep 2006
Posts: 24

PostPosted: Tue Oct 03, 2006 9:05 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Oct 03, 2006 10:58 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top