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
 

 

Need to set Return code = 0 for a JCL statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kushal Bothra

New User


Joined: 16 Feb 2011
Posts: 38
Location: Gurgoan

PostPosted: Mon Oct 22, 2012 1:37 pm    Post subject: Need to set Return code = 0 for a JCL statement
Reply with quote

Hi

I have a DROP VIEW step in JOB and in case the view doesnot exists my JCL gives a return code of 8. I need that the return code of my JCL should always be 0.

Can I set it in any way,,, icon_idea.gif

Thanks
Kushal
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Oct 22, 2012 1:45 pm    Post subject:
Reply with quote

Hi Kushal,

This Query Belongs to JCL forum and not Cobol

Quote:
I need that the return code of my JCL should always be 0.


Do you want MAXCC or LASTCC to be SET as 0??
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Mon Oct 22, 2012 1:53 pm    Post subject:
Reply with quote

Hi Kushal,

If you're with z/OS Version 1 Release 13, please review JOBRC Parameter of JOB statement.

And, your scheduling package might have a functionality to do this.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Oct 22, 2012 1:55 pm    Post subject: Reply to: Need to set Return code = 0 for a JCL statement
Reply with quote

Quote:
Do you want MAXCC or LASTCC to be SET as 0??


MAXCC and LASTCC are IDCAMS terms not JCL' s

depending on the zOS level the following terms apply

JOBRC and MAXRC LASTRC

Quote:
| JOBRC= {MAXRC}
| {LASTRC}
| {(STEP,stepname[.procstepname]}
|


where JOBRC will be the return code presented to JES

see here for the whole shebang

z/OS V1R13.0 MVS JCL User's Guide
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/iea2b570/CCONTENTS?SHELF=all13be9&DN=SA22-7598-07&DT=20110610095749
z/OS V1R13.0 MVS JCL Reference
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/iea2b6b1/CCONTENTS?SHELF=all13be9&DN=SA22-7597-16&DT=20120814180937


AND WHAT HAS THE QUESTION TO DO WITH COBOL ?
Back to top
View user's profile Send private message
kushal Bothra

New User


Joined: 16 Feb 2011
Posts: 38
Location: Gurgoan

PostPosted: Mon Oct 22, 2012 2:06 pm    Post subject:
Reply with quote

I have the JCL step where I am getting RC 8
//DB2SQDV EXEC DB2SQL
//DB2SAUTH DD *
PI000004
/*
//SYSIN DD *
DROP VIEW PI000004.PI@PPDI;

so to achive overall RC 0 I should code in the jobcard
| JOBRC= {8}
| {0}
| {DB2SAUTH}

Is it ?
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Mon Oct 22, 2012 2:08 pm    Post subject:
Reply with quote

Please try and let us know the result.
Back to top
View user's profile Send private message
kushal Bothra

New User


Joined: 16 Feb 2011
Posts: 38
Location: Gurgoan

PostPosted: Mon Oct 22, 2012 2:40 pm    Post subject:
Reply with quote

one help how do we use JOBRC ?
KUSDVIEW JOB (D03,07PI),'DROP VIEW TEST',
MSGCLASS=D,NOTIFY=Z099,GROUP=Z099,
JOBRC(8,0,DB2SQDV)

This is definately wrong as I am getting following errors on JJ

LABEL SV MSG.NO. ERROR MESSAGE
-------- -- -------- -------------------------------------------------
.JAAA 8 DSS6160E - "(" IS AN INVALID DELIMITER AS USED
.JAAA 8 DSS1090E - INCORRECT POSITIONAL PARAMETER - "JOBRC "
.JAAA 8 DSS1090E - INCORRECT POSITIONAL PARAMETER - "8 "
.JAAA 8 DSS1090E - INCORRECT POSITIONAL PARAMETER - "0 "
.JAAA 8 DSS6070E - UNEQUAL NUMBER OF RIGHT PARENTHESES
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Oct 22, 2012 2:43 pm    Post subject: Reply to: Need to set Return code = 0 for a JCL statement
Reply with quote

Forget JJ. Toss a little test JCL into the system. Consult the current JCL manual. Look at any error messages.
Back to top
View user's profile Send private message
kushal Bothra

New User


Joined: 16 Feb 2011
Posts: 38
Location: Gurgoan

PostPosted: Mon Oct 22, 2012 2:59 pm    Post subject:
Reply with quote

Tried running the JCL by appending JOBRC(8,0,DB2SQDV) gettin error JCL ERROR INCORRECT POSITIONAL PARAMETER - "JOBRC "




Checked the system its :-- JES: JES2 z/OS1.12
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon Oct 22, 2012 3:06 pm    Post subject:
Reply with quote

kushal Bothra wrote:
Checked the system its :-- JES: JES2 z/OS1.12

In that case, you cannot modify the completion code of the job; it will be the highest completion code of any step. JOBRC is only available in z/OS 1.13.
Back to top
View user's profile Send private message
kushal Bothra

New User


Joined: 16 Feb 2011
Posts: 38
Location: Gurgoan

PostPosted: Mon Oct 22, 2012 3:09 pm    Post subject:
Reply with quote

Any other option to change RC of a particular step from 8 to 0 or if any step in my JCL is ending with maxcc 8 can by any option my JCL end with RC 0 .. ? icon_confused.gif
Back to top
View user's profile Send private message
kushal Bothra

New User


Joined: 16 Feb 2011
Posts: 38
Location: Gurgoan

PostPosted: Mon Oct 22, 2012 3:20 pm    Post subject:
Reply with quote

Quote:


What can be the resolution ???? icon_confused.gif icon_eek.gif icon_sad.gif icon_mad.gif icon_rolleyes.gif

Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Oct 22, 2012 3:37 pm    Post subject: Reply to: Need to set Return code = 0 for a JCL statement
Reply with quote

Quote:
What can be the resolution ????

You will have to learn to live without a JCL solution . AMEN

if You are using a scheduler speak to Your support in order
to consider a RC 8 for that step a success and not a failure.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Mon Oct 22, 2012 4:15 pm    Post subject:
Reply with quote

Quote:
Any other option to change RC of a particular step from 8 to 0 or if any step in my JCL is ending with maxcc 8 can by any option my JCL end with RC 0 .. ?
No, you have no other option -- follow the suggestions you have already been given by enrico and akatsukami.

You may "need" the return code to be zero, but it will not be -- PERIOD. Furthermore, your terminology needs to be improved: MAXCC is a term extremely specific to one utlity (IDCAMS) and only to that utility. A job has a return code, not MAXCC, for each step.
Back to top
View user's profile Send private message
kushal Bothra

New User


Joined: 16 Feb 2011
Posts: 38
Location: Gurgoan

PostPosted: Mon Oct 22, 2012 4:22 pm    Post subject:
Reply with quote

Thanks Robert Comments kept in mind
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Mon Oct 22, 2012 5:46 pm    Post subject:
Reply with quote

One solution is to alter the program that is running your SQL statement. If I recall correctly, IBM supplies the source code for DSNTEP2/4, DSNTIAUL and DSNTIAD. You can modify it if you wish.

Another option is to write your own simple DSNREXX program to issue the DROP. It is not as difficult as you might think; the Rexx program can read the DROP from the SYSIN and pass it as a string to the EXECUTE IMMEDIATE SQL statement. You are then free to handle the SQLCODE as you wish.
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 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
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts DFHWS2LS return value divated CICS 4 Mon Nov 07, 2016 5:44 pm
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


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