View previous topic :: View next topic
|
Author |
Message |
priya
Moderator
Joined: 24 Jul 2003 Posts: 568 Location: Bangalore
|
|
|
|
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 |
|
|
thepirate
New User
Joined: 11 Jun 2003 Posts: 1
|
|
|
|
Step 3 will NOT run |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Even If STEP2 abends abnormally, STEP3 will execute unless the job canceled by the operator. |
|
Back to top |
|
|
Parameswaran
New User
Joined: 05 Jun 2003 Posts: 2 Location: Chennai, India
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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.
Regards.[/quote] |
|
Back to top |
|
|
priya
Moderator
Joined: 24 Jul 2003 Posts: 568 Location: Bangalore
|
|
|
|
Hello
Thanks a lot for your guidance. |
|
Back to top |
|
|
shankarravi1984 Warnings : 1 New User
Joined: 15 Sep 2006 Posts: 9 Location: pune
|
|
|
|
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 |
|
|
samitcmathur
New User
Joined: 05 Feb 2006 Posts: 4
|
|
|
|
your step 3 indicates to be bypassed if the cond is true
if step2 abends then step 3 abends |
|
Back to top |
|
|
timburkart
New User
Joined: 17 Mar 2007 Posts: 29 Location: USA
|
|
|
|
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 |
|
|
|