Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we enhance a return code of 4 to 8

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Can we enhance a return code of 4 to 8
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: 2360
Location: Israel

PostPosted: Mon Oct 02, 2006 1:47 pm    Post subject:
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    Post subject: Re: Can we enhance a return code of 4 to 8
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    Post subject:
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    Post subject: Re: Can we enhance a return code of 4 to 8
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    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Oct 03, 2006 10:58 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us