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
 

 

COND Parameters in STeps

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

New User


Joined: 28 Jul 2006
Posts: 7
Location: Hartford

PostPosted: Wed Aug 23, 2006 7:07 pm    Post subject: COND Parameters in STeps
Reply with quote

I have a following condition

//STEP1 EXEC=XXX.
//....
//.....
//STEP2 EXEC=YYY,Cond=(12,NE,STEP1)
//...
//...
//STEP3 EXEC=AAA,Cond=(0,NE,STEP1)
//...
//...
//STEP4 EXEC=BBB,Cond=(0,NE,STEP3)


If STEP1 is giving RC as 12, STEP2 will execute and STEP3 is depend on STEP1 so this step (STEP3) will be FLUSH, but STEP4 is dependend on STEP3,
Will STEP4 execute or FLUSH?
As per my understanding all step following STEP2 should FLUSH, but practically this is not happening...

Does any one know why this is happening?
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Aug 23, 2006 9:36 pm    Post subject: Re: COND Parameters in STeps
Reply with quote

Quote:

//STEP1 EXEC=TTT.
//....
//.....
//STEP2 EXEC=YYY,Cond=(12,NE,STEP1)
//...
//...
//STEP3 EXEC=AAA,Cond=(0,NE,STEP1)
//...
//...
//STEP4 EXEC=BBB,Cond=(0,NE,STEP3)


STEP4 will execute in this condition. The unexecuted STEP3 gives a defaut RC of 0000. There was no error condition associated with STEP3.

If you want STEP4 to not execute if STEP1 or STEP3 have RC=0000 you need to code

//STEP1 EXEC=TTT.
//....
//.....
//STEP2 EXEC=YYY,Cond=(12,NE,STEP1)
//...
//...
//STEP3 EXEC=AAA,Cond=(0,NE,STEP1)
//...
//...
//STEP4 EXEC=BBB,Cond=((0,NE,STEP3),(0,NE.STEP1))

Dave
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Thu Aug 24, 2006 1:56 pm    Post subject: Re: COND Parameters in STeps
Reply with quote

Hi All, can you pleae let me know what is FLUSH ?

Thanks!
Rathna.
Back to top
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Fri Aug 25, 2006 5:31 pm    Post subject: Re: COND Parameters in STeps
Reply with quote

Hi David i tried this code,
Code:
               
//*                                                   
//STEP01   EXEC PGM=IEFBR14                           
//DD01     DD  DSN=A027104.TEMP.FILE4,               
//             DISP=(MOD,DELETE,DELETE),             
//             SPACE=(TRK,1),UNIT=SYSDA,             
//             DCB=(DSCB1,RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSOUT   DD  SYSOUT=*                               
//*                                                   
//STEP02   EXEC PGM=IEFBR14,COND=(4,GE,STEP01)       
//DD02     DD  DSN=A027104.TEMP.FILE2,               
//             DISP=(MOD,CATLG,DELETE),               
//             SPACE=(TRK,1),UNIT=SYSDA,             
//             DCB=(DSCB1,RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSOUT   DD  SYSOUT=*                               
//*                                                   
// IF STEP02.RC=0 THEN                                 
//STEP02A  EXEC PGM=IEFBR14                           
//SYSIN    DD  DUMMY                                   
//SYSOUT   DD  SYSOUT=*                               
// ELSE                                               
//STEP02B  EXEC PGM=IEFBR14                           
//SYSIN    DD  DUMMY                                   
//SYSOUT   DD  SYSOUT=*                               
// ENDIF                                               
//*                                                   
//STEP03   EXEC PGM=IEFBR14,COND=(0,NE,STEP02)         
//DD02     DD  DSN=A027104.TEMP.FILE5,                 
//             DISP=(MOD,CATLG,DELETE),               
//             SPACE=(TRK,1),UNIT=SYSDA,               
//             DCB=(DSCB1,RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSOUT   DD  SYSOUT=*                               
//*                                                   
//                                                     


This is my joblog


Step_Name Program Code
001 STEP01 IEFBR14 00
002 STEP02 IEFBR14 N/A
003 STEP02A IEFBR14 N/A
004 STEP02B IEFBR14 00
005 STEP03 IEFBR14 00

so what will be RC returned by step02.The above joblog shows that it will not have zero.then wat will be the value it will possess if that step2 is not executed.
Back to top
View user's profile Send private message
neoconvoy

New User


Joined: 22 Jul 2006
Posts: 9

PostPosted: Sun Aug 27, 2006 1:09 pm    Post subject:
Reply with quote

I guess this should answer some questions, ripped from the IBM manuals:
Quote:
Purpose

Use the COND parameter to test return codes from previous job steps and determine whether to bypass this job step. You can specify one or more tests on the COND parameter, and you can test return codes from particular job steps or from every job step that has completed processing. If any of the test conditions are satisfied, the system evaluates the COND parameter as true and bypasses the job step. If none of the test conditions specified on the COND parameter are satisfied, the system evaluates the COND parameter as false and executes the job step.

The system performs the COND parameter tests against return codes from the current execution of the job. If a test specifies a previous step that was bypassed, the system evaluates the COND parameter as false.

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 LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts COND parameter vs IF THEN ELSE Alks JCL & VSAM 11 Fri Jun 17, 2016 5:28 pm


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