HELP With RC=04 in jcl



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

HELP With RC=04 in jcl

Postby masterchecho » Fri Nov 26, 2010 12:34 am

Hi all,
I have a problem with a RC in my jcl , to put you in context :

JCL X ==> PROC A
STEP 1 : Through "REPRO COUNT(1) VALIDATE if input file is empty or not

IF RC.STEP1= 0 (input file contains data)
STEP2
STEP3
ELSE (Empty file)
STEP 4
ENDIF.
end Proc.

then when i have an empty file , the proc returns an RC=04 , therefore the JCL ends with RC=04.

Now my question:
How can i handle the rc=04 , in order to my jcl ends with rc=00 eventhough i am processing an empty file.

Should i add an set maxcc o lastcc to the code ? Does it works for procs ?


Thanks in advance
Sergio
masterchecho
 
Posts: 10
Joined: Tue May 25, 2010 1:49 am
Has thanked: 0 time
Been thanked: 0 time

Re: HELP With RC=04 in jcl

 

Re: HELP With RC=04 in jcl

Postby NicC » Fri Nov 26, 2010 12:54 am

You can set MAXCC in an IDCAMS step or you could run an IEFBR14 if the RC=0. Other options are available.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: HELP With RC=04 in jcl

Postby dick scherrer » Fri Nov 26, 2010 9:51 am

Hello,

One option that is not available is to reset a non-zero condition code back to zero. Once set it stays set. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to JCL