usage of JOBRC parameter



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

usage of JOBRC parameter

Postby ibmmf4u » Sun May 20, 2012 11:37 pm

Hi everyone,

My requirement here is to set the maxcc of the job. we are currently using z/OS 1.13R in our shop. I heard that this can be done by JOBRC parameter which got introduced in 1.13R .

I tried using the JOBRC Parameter in the below code as follows but i got an error stating verb JOBRC is unkown.

//xxxxxxxx JOB (xxxx,xxxxxx,,,xxxxx),'JOBRC USAGE',CLASS=H,
//   NOTIFY=&SYSUID,REGION=16M,MSGCLASS=U                 
//STEP010  EXEC PGM=IEFBR14                               
//STEP020  EXEC PGM=IEBGENER                             
//SYSOUT   DD   SYSOUT=*                                 
//SYSPRINT DD   SYSOUT=*                                 
// IF (STEP010.RC = 0 | STEP020.RC = 0) THEN             
//JOBRC=STEP010                                                 
// ENDIF                                                 


Pasted below is the error message which is encountered. I even tried it using in the job card but sill facing the same problem.

VERB "JOBRC" IS UNKNOWN


//xxxxxxxx JOB (xxxx,xxxxxx,,,xxxxx),'JOBRC USAGE',CLASS=H,
//   NOTIFY=&SYSUID,REGION=16M,MSGCLASS=U,JOBRC=STEP010               


 - NOTIFY=XXXXXXXX,REGION=16M,MSGCLASS=U,JOBRC=STEP010
UNKNOWN KEYWORD "JOBRC" SPECIFIED IN OPERAND OF "JOB"



Can someone kindly let me know on how to use the JOBRC keyword and make the above piece of code work as per my requirement.
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: usage of JOBRC parameter

Postby NicC » Mon May 21, 2012 1:24 am

Try reading the manual. Does it say that JOBRC goes on the job card? You cannot just make up the syntax as YOU want it - it must be as per the manual. As the INTERPRETER wants it.

By the way - why do this? Suppose a non-zero return code really IS an error? This will just hide it and screw your processing up.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: usage of JOBRC parameter

Postby steve-myers » Mon May 21, 2012 5:03 am

  • JOBRC is available only with z/OS 1.13 and later.
  • It is a JOB statement parameter, as you would discover when you RTFM. You cannot code it as you have shown.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: usage of JOBRC parameter

Postby dick scherrer » Mon May 21, 2012 8:08 am

Hello,

Suggest you post what you are trying to accomplish (in sentence form rather than code).

In addition to the problem syntax, i don't understand why someone wants you to do this. . . :?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: usage of JOBRC parameter

Postby ibmmf4u » Mon May 21, 2012 8:41 pm

Hi All,

Thanks for your valuable replies. As Dick mentioned i shall explain my requirement .

We will be normally FTP'ing files to a destination server daily. Its done with the help of a proc, which consists of three steps where all the steps will be trying to FTP the file in case of a failure of other.

If step010 FTP's the file successfully then the remaining steps will be flushed out as the subsequent steps will only execute upon the return code of the previous steps. Let me put an sample piece of code as an example here.

//STEP010 EXEC PGM=FTPPROG
//*** FTP STATEMENTS****
// IF  STEP010.RC > O THEN
//**** WHERE IF THE STEP010 FAILS IT EXECUTES THE STEP020****
//STEP020 EXEC PGM=FTPPROG
//****FTP STATEMENTS***
// IF STEP020.RC > O THEN
//****IF THE STEP020 FAILS THEN IT EXECUTES STEP030****
//STEP030 EXEC PGM=FTPPROG
//****FTP STATEMENTS***
// ENDIF
// ENDIF


All this is been done with the help of a proc and the same proc is been used by several jobs with a change in the control cards.

Now if any of the steps is failed while FTP'ing the file and if it went fine in the next step then am getting paged since the job picks up the maximum return code. In short the job is abended even if the file was successfully sent to destination either in second or third attempt.

Hence we came up with the idea of setting the MAXCC to zero, if its successfull in one of the three steps by doing an IF-condition at bottom as shown below.

// IF ( STEP010.RC =0 | STEP020.RC =0 | STEP030.RC =0) THEN
//*** SET MAXCC TO ZERO****
//*** WHICH I THOUGHT CAN BE DONE WITH JOBRC PARAMETER***
// ENDIF



Can someone kindly help me out in achieving the same.

Thanks in advance!
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: usage of JOBRC parameter

Postby Robert Sample » Mon May 21, 2012 8:53 pm

Even if you placed the JOBRC parameter on the JOB statement as is required, it probably would still not meet your needs. The manual says you have three choices for the JOBRC value: MAXRC, LASTRC, or a specific step RC. No IF statements, no setting to zero -- highest, last executed step, or specific step are your only three choices.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: usage of JOBRC parameter

Postby Akatsukami » Mon May 21, 2012 9:16 pm

We are running z/OS V1.12 here, so I cannot test this; but try something like:
//FOO    JOB    JOBRC=(STEP,STEP40)...
//STEP10   EXEC  FTP
//IF1      IF    (STEP10.RC¬=0) THEN
//STEP20   EXEC  FTP
//IF2      IF    (STEP20.RC¬=0) THEN
//STEP30   EXEC  FTP
//ENDIF2   ENDIF
//ENDIF1   ENDIF
//IF3     IF   ((STEP10.RC = 0) | (STEP20.RC = 0) | (STEP30.RC = 0)) THEN
//STEP40   EXEC  PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   *
  SET MAXCC=0
//         ELSE
//STEP40   EXEC  PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN   DD   *
  SET MAXCC=16
//ENDIF3   ENDIF
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: usage of JOBRC parameter

Postby ibmmf4u » Mon May 21, 2012 9:41 pm

Hi Robert,

Thanks a lot. I have one quick query about the it . please correct me if am wrong.

If i code a Dummy Step over there and have the job accept the LASTRC , will it works.

// IF ( STEP010.RC = 0| STEP020.RC = 0| STEP030.RC = 0) THEN
//STEP040 EXEC PGM=IEFBR14
// ENDIF


In this case if it satisfies the condition then STEP040 will execute and return code of zero will be passed as JOBRC can able to pick the return code of any step in the proc.

Please kindly correct me if am wrong.!!!


Hi Akatsukami,

I tried using the IDCAMS , it worked well till the return code of the program is lessthan the one which has been set through IDCAMS.

For ex. if one of the previous step's return code is 16 and the one i.e. coded through SET statement is 10 the job is picking up 16 and the program is abended. where if the previous steps return code is 2 and one i.e coded using SET is 4. it is picking up the one that has been set through IDCAMS as it is the highest. Either ways it is picking up the highest retrun code.

Thanks for your inputs!!
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: usage of JOBRC parameter

Postby dick scherrer » Mon May 21, 2012 11:58 pm

Hello,

It has been my experience that if an ftp fails, another attempt as the next step most likely fails also. . .

The cause of the failure should be determined, corrective action should be taken and the transmission re-run once the problem is corrected.

If the environment is so unstable failures happen often and that re-running a few times gets around the problem, i'd be quite concerned - fwiw.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: usage of JOBRC parameter

Postby Akatsukami » Tue May 22, 2012 2:51 am

ibmmf4u wrote:Hi Akatsukami,

I tried using the IDCAMS , it worked well till the return code of the program is lessthan the one which has been set through IDCAMS.

For ex. if one of the previous step's return code is 16 and the one i.e. coded through SET statement is 10 the job is picking up 16 and the program is abended. where if the previous steps return code is 2 and one i.e coded using SET is 4. it is picking up the one that has been set through IDCAMS as it is the highest. Either ways it is picking up the highest retrun code.

Thanks for your inputs!!

And you did code
JOBRC=(STEP,stepname[.procstepname])

on the JOB card, correct?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post