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 Parameter in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: COND Parameter in JCL
Reply with quote

THIS IS MY JCL... MY DOUBT IS 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    Post subject:
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: 1202
Location: India

PostPosted: Fri Jul 25, 2003 1:05 pm    Post subject: Re: COND PARM IN JCL
Reply with quote

Even If STEP2 abends abnormally, STEP3 execute unless the job is 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    Post subject:
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    Post subject:
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: 238
Location: USA

PostPosted: Fri Aug 01, 2003 6:35 pm    Post subject:
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    Post subject:
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    Post subject: PRIYA
Reply with quote

Hello friends,

Thanks a lot for your guidances.....

HAPPY FRIENDSHIP DAY TO ALL
specially to Mcmillan & Mmwife.
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    Post subject: Re: COND PARM IN JCL
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    Post subject: Re: COND PARM IN JCL
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: 30
Location: USA

PostPosted: Fri Mar 23, 2007 8:17 pm    Post subject: Re: COND Parameter in JCL
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 - http://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    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 Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


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