RC=FLUSH in IF condition



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

RC=FLUSH in IF condition

Postby mathew28 » Tue Oct 27, 2009 6:07 pm

The RC of STEP01 is FLUSH.
In the following condition:

//IF STEP01.RC = 0 THEN
//:
//:

How this condition will be executed ? What will be the value of STEP01.RC in the above condition when compared against 0 during the execution?
mathew28
 
Posts: 30
Joined: Tue Oct 20, 2009 11:06 am
Has thanked: 0 time
Been thanked: 0 time

Re: RC=FLUSH in IF condition

Postby expat » Tue Oct 27, 2009 8:34 pm

Have you tried it yourself ?
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: RC=FLUSH in IF condition

Postby mathew28 » Wed Oct 28, 2009 9:46 am

yes, I have tried it and is working perfectly. The condition fails and the step STEP03 in the else part is getting executed.
But I'm curious to know the RC value of the FLUSHed step STEP01.

STEP01 RC=FLUSH.
//IF STEP01.RC = 0 THEN
//STEP02
//:
//ELSE
//STEP03
//:
//:
//ENDIF

Please reply the value of the RC of the step STEP01. I'll put this way: How FLUSH is represented in numeric format (0, -1, 1, something like this) ?
mathew28
 
Posts: 30
Joined: Tue Oct 20, 2009 11:06 am
Has thanked: 0 time
Been thanked: 0 time

Re: RC=FLUSH in IF condition

Postby expat » Wed Oct 28, 2009 2:49 pm

The flushed step does not issue a return code, and you are checking for a specific return code of 0, and nothing is not equal to 0 so the ELSE segment executes
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post