View previous topic :: View next topic
|
Author |
Message |
kushal Bothra
New User
Joined: 16 Feb 2011 Posts: 38 Location: Gurgoan
|
|
|
|
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,,,
Thanks
Kushal |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
Back to top |
|
|
kushal Bothra
New User
Joined: 16 Feb 2011 Posts: 38 Location: Gurgoan
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Please try and let us know the result. |
|
Back to top |
|
|
kushal Bothra
New User
Joined: 16 Feb 2011 Posts: 38 Location: Gurgoan
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Forget JJ. Toss a little test JCL into the system. Consult the current JCL manual. Look at any error messages. |
|
Back to top |
|
|
kushal Bothra
New User
Joined: 16 Feb 2011 Posts: 38 Location: Gurgoan
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
kushal Bothra
New User
Joined: 16 Feb 2011 Posts: 38 Location: Gurgoan
|
|
|
|
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 .. ? |
|
Back to top |
|
|
kushal Bothra
New User
Joined: 16 Feb 2011 Posts: 38 Location: Gurgoan
|
|
|
|
Quote: |
What can be the resolution ????
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
kushal Bothra
New User
Joined: 16 Feb 2011 Posts: 38 Location: Gurgoan
|
|
|
|
Thanks Robert Comments kept in mind |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
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 |
|
|
|