IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COND Parameter in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Thu Jul 24, 2003 9:04 am
Reply with quote

This is my JCL..

WHETHER STEP3 EXECUTES OR NOT IF ATEP2 ABENDS ABNORMALLY


000100 //FLOPRI JOB 'FLORIDA','PRIYA',NOTIFY=&SYSUID
000110 //JOBLIB DD DSN=FLORI01.PRIYA.PRIYA,DISP=SHR
000200 //STEP1 EXEC PGM=LOAD
000700 //STEP2 EXEC PGM=IGYWCL,PARM='LIB,APOST,XREF'
000710 //COBOL.SYSIN DD DSN=FLORI01.PRIYA.PRIYACOBOL1)
000720 //LKED.SYSLMOD DD DSN=FLORI01.PRIYA.LOADF(LOAD1)
000800 //STEP3 EXEC PGM=LOAD,COND=EVEN
Back to top
View user's profile Send private message
thepirate

New User


Joined: 11 Jun 2003
Posts: 1

PostPosted: Fri Jul 25, 2003 9:27 am
Reply with quote

Step 3 will NOT run
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1210
Location: India

PostPosted: Fri Jul 25, 2003 1:05 pm
Reply with quote

Even If STEP2 abends abnormally, STEP3 will execute unless the job canceled by the operator.
Back to top
View user's profile Send private message
Parameswaran

New User


Joined: 05 Jun 2003
Posts: 2
Location: Chennai, India

PostPosted: Fri Aug 01, 2003 9:29 am
Reply with quote

In the above JCL it seems a program is being compiled in step2 and run in step 3...Coding COND=EVEN in step3 wont help becoz Step3 will also abend as there will be no load modules created from step2 if it abends.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Aug 01, 2003 3:20 pm
Reply with quote

STEP3 will run and may not abend. It will execute the version of pgm LOAD1 that was in the loadlib when the JOB started. If the code was OK, the job will complete.

Slade
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Fri Aug 01, 2003 6:35 pm
Reply with quote

Hello mmwife,

What if the loadlib member is not present in the library. (Eg. it is a new program) and the program abends??


Regards

Mayuresh
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Aug 02, 2003 1:19 pm
Reply with quote

Hi Mayuresh,
Quote:

If the code was OK, the job will complete.

If the pgm isn't in the loadlib, that's a specific instance of the code NOT being OK. icon_wink.gif

Regards.[/quote]
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Mon Aug 04, 2003 11:18 am
Reply with quote

Hello

Thanks a lot for your guidance.
Back to top
View user's profile Send private message
shankarravi1984
Warnings : 1

New User


Joined: 15 Sep 2006
Posts: 9
Location: pune

PostPosted: Sun Sep 17, 2006 8:26 pm
Reply with quote

hi this is ravi
you can use both cond and parm parameter in jcl,PARM parameter is used to give the input information,you have specify to the "linkage section" in your cobol program instead of using PARM paramter you can give input data in the "sysin dd *",cond paramter controls the execution of subsequent steps depending on the return code occured from the prvious step
regards,
ravi
Back to top
View user's profile Send private message
samitcmathur

New User


Joined: 05 Feb 2006
Posts: 4

PostPosted: Fri Mar 23, 2007 1:16 pm
Reply with quote

your step 3 indicates to be bypassed if the cond is true
if step2 abends then step 3 abends
Back to top
View user's profile Send private message
timburkart

New User


Joined: 17 Mar 2007
Posts: 29
Location: USA

PostPosted: Fri Mar 23, 2007 8:17 pm
Reply with quote

Have you tried the IF THEN... ENDIF statement for condition code checking? It is easier to understand and simpler to code!! See example below.

Please refer to Chapter 17 in the z/OS v1.7 JCL Reference Guide - publibz.boulder.ibm.com/epubs/pdf/iea2b661.pdf

//HWGS342J JOB (PT-HWL),TIM.7239,MSGCLASS=T,CLASS=2,
// NOTIFY=HWGS342
/*JOBPARM L=999999
/*ROUTE PRINT DUMMY
//PROCLIB JCLLIB ORDER=HWGD.PROCLIB
//STEP010 EXEC HWGZSMC,MAP=HWWE001A,SSID=SDBP,SYSQ=
// IF RC = 0 THEN
//STEP020 EXEC HWGZSMC,MAP=HWWI005A,SSID=SDBP,SYSQ=
// ENDIF
// IF RC = 0 THEN
//STEP030 EXEC HWGZSMC,MAP=HWWI008A,SSID=SDBP,SYSQ=
// ENDIF
// IF RC = 0 THEN
//STEP040 EXEC HWGZSMC,MAP=HWWI009A,SSID=SDBP,SYSQ=
// ENDIF
// IF RC = 0 THEN
//STEP050 EXEC HWGZSMC,MAP=HWWI011A,SSID=SDBP,SYSQ=
// ENDIF
// IF RC = 0 THEN
//STEP900 EXEC HWGZSMR,SSID=SDBP,SYSQ=
// ELSE
//STEP990 EXEC PGM=IEFBR14
//NODSN DD DISP=OLD,DSN=ABORT.JOB
// ENDIF

regards,

tim
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Writing the output file name from a p... JCL & VSAM 7
Search our Forums:

Back to Top