Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Steps getting executed even though previous step has RC = 12

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

New User


Joined: 02 Dec 2003
Posts: 5

PostPosted: Fri Feb 23, 2007 6:00 am    Post subject: Steps getting executed even though previous step has RC = 12
Reply with quote

In one of our job, all the steps are getting executed even though previous step (SAFPOM01 and SAFPOM02) has RC = 12. Only the last step has COND=EVEN.

-JOBNAME STEPNAME PROCSTEP RC
-FAFPOM1X SAFPOM01 12
-FAFPOM1X SAFPOM02 12
-FAFPOM1X SAFPOM03 00
-FAFPOM1X SAFPOM04 00
-FAFPOM1X *OMVSEX 00
-FAFPOM1X *OMVSEX 00
-FAFPOM1X SAFPOM05 00
-FAFPOM1X SAFPOM06 FLUSH
-FAFPOM1X SAFPOM07 FLUSH
-FAFPOM1X SAFPOM08 FLUSH
-FAFPOM1X SAFPOM09 00
-FAFPOM1X SAFPOM10 00
-FAFPOM1X *OMVSEX 00
-FAFPOM1X *OMVSEX 00
-FAFPOM1X SAFPOM11 00
-FAFPOM1X SAFPOM12 FLUSH
-FAFPOM1X SAFPOM13 FLUSH
-FAFPOM1X SAFPOM14 FLUSH
-FAFPOM1X SAFPOM15 00
-FAFPOM1X SAFPOM16 00

Any clue? Please advice.

Thanks!
Anand
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Feb 23, 2007 6:35 am    Post subject:
Reply with quote

Without additional evidence, it looks like "working as designed".
Why would any step care what the RCs were prior unless it wanted to....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 23, 2007 8:36 am    Post subject:
Reply with quote

Hello,

Please post your jcl.

If there is no COND= for the JOB or for the individual STEPs, they will run. It appears that some of the steps have a COND= while others do not.

If we can see your jcl, we can offer suggestions.
Back to top
View user's profile Send private message
aseem

New User


Joined: 02 Dec 2003
Posts: 5

PostPosted: Fri Feb 23, 2007 11:37 pm    Post subject:
Reply with quote

Hi,

Thanks for the response!

Here is how job looks:

//*D***************************************************************
//JOBLIB DD DSN=FTL.PROD,
// DISP=SHR
//*------------------------------------------------------------*//
//* ALLOCATE DATA HFS FILE *//
//*------------------------------------------------------------*//
//SAFPOM01 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(F0003623), ALLOC BIGTRUCK/ALFSEND
// DISP=SHR
//*
//*------------------------------------------------------------*//
//* MOUNT DATA HFS FILE *//
//*------------------------------------------------------------*//
//SAFPOM02 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(F0003624), MOUNT BIGTRUCK/ALFSEND
// DISP=SHR
//*
//*************************************************************
//* TRANSFER PO MASTER BLANKET HEADER FILE TO ALF VIA SFTP *
//* *
//* MOVE FILE TO BE TRANSMITTED TO UNIX SIDE OF MAINFRAME *
//* *
//*************************************************************
//SAFPOM03 EXEC PGM=IKJEFT01
//SFTPDATA DD DSN=AF.R.POBHDRV(0),
// DISP=SHR
//SFTPCMDS DD DSN=FTL.PPDS(SETNDATE),
// DISP=SHR
// DD DSN=FTL.PPDS(F0003589),
// DISP=SHR
// DD DSN=FTL.PPDS(CONNECTB),
// DISP=SHR
// DD DSN=FTL.PPDS(F0003590),
// DISP=SHR
//UNIXFILE DD PATH='/u/BIGTRUCK/ALFSEND/POBHDRV.DATAFILE',
// PATHDISP=(KEEP,DELETE),
// PATHOPTS=(ORDWR,OCREAT,OTRUNC),PATHMODE=(SIRWXU)
// PATHOPTS=(ORDWR,OCREAT,OTRUNC),PATHMODE=(SIRWXU)
//UNIXSCRP DD PATH='/u/BIGTRUCK/ALFSEND/POBHDRV.SCRIPT',
// PATHDISP=(KEEP,DELETE),
// PATHOPTS=(ORDWR,OCREAT,OTRUNC),PATHMODE=(SIRWXU)
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(OCOPY),
// DISP=SHR
/*
//*************************************************************
//* RUN SFTP UNDER BATCH UNIX *
//*************************************************************
//SAFPOM04 EXEC PGM=BPXBATCH
//*
//STDIN DD PATH='/u/BIGTRUCK/ALFSEND/POBHDRV.SCRIPT',
// PATHOPTS=(ORDONLY),PATHDISP=(DELETE,DELETE)
//STDOUT DD PATH='/u/BIGTRUCK/ALFSEND/POBHDRV.STDOUT',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),PATHMODE=(SIRWXU)
//STDERR DD PATH='/u/BIGTRUCK/ALFSEND/POBHDRV.STDERR',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),PATHMODE=(SIRWXU)
/*
//*************************************************************
//* PRINT THE UNIX STDERR AND STDOUT SO WE KNOW WHAT HAPPENED *
//*************************************************************
//SAFPOM05 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=V
//USTDOUT DD PATH='/u/BIGTRUCK/ALFSEND/POBHDRV.STDOUT',
// PATHDISP=(DELETE,DELETE)
//USTDERR DD PATH='/u/BIGTRUCK/ALFSEND/POBHDRV.STDERR',
// PATHDISP=(DELETE,DELETE)
//SYSTSIN DD DSN=FTL.PPDS(F0000863),
// DISP=SHR
//STDERR DD SYSOUT=V,LRECL=132,RECFM=F
//STDOUT DD SYSOUT=V,LRECL=132,RECFM=F
/*
//*************************************************************
//* IF XMIT FAILS, UNMOUNT/DEALLOCATE UNIX THEN CANCEL JOB *
//*************************************************************
// IF (SAFPOM03.RC GE 4 OR SAFPOM04.RC GE 4) THEN
//SAFPOM06 EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(F0003625), UNMOUNT BIGTRUCK/ALFSEND
// DISP=SHR
/*
//SAFPOM07 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(F0003626), UNALLOC BIGTRUCK/ALFSEND
// DISP=SHR
/*
//SAFPOM08 EXEC PGM=EZCANCEL CANCEL JOB
//SYSIN DD DUMMY
//OUT56911 DD DUMMY,
// DCB=BLKSIZE=100
//SYSOUT DD SYSOUT=U
//SYSPRINT DD SYSOUT=U
//SYSUDUMP DD SYSOUT=U,
// HOLD=YES
/*
// ENDIF
//*************************************************************
//* TRANSFER PO MASTER BLANKET LINE DATA FILE TO ALF VIA SFTP *
//* *
//* MOVE FILE TO BE TRANSMITTED TO UNIX SIDE OF MAINFRAME *
//* *
//*************************************************************
//SAFPOM09 EXEC PGM=IKJEFT01
//SFTPDATA DD DSN=AF.R.POBLINEV(0),
// DISP=SHR
//SFTPCMDS DD DSN=FTL.PPDS(SETNDATE),
// DISP=SHR
// DD DSN=FTL.PPDS(F0003591),
// DISP=SHR
// DD DSN=FTL.PPDS(CONNECTB),
// DISP=SHR
// DD DSN=FTL.PPDS(F0003592),
// DISP=SHR
//UNIXFILE DD PATH='/u/BIGTRUCK/ALFSEND/POBLINE.DATAFILE',
// PATHDISP=(KEEP,DELETE),
// PATHOPTS=(ORDWR,OCREAT,OTRUNC),PATHMODE=(SIRWXU)
//UNIXSCRP DD PATH='/u/BIGTRUCK/ALFSEND/POBLINE.SCRIPT',
// PATHDISP=(KEEP,DELETE),
// PATHOPTS=(ORDWR,OCREAT,OTRUNC),PATHMODE=(SIRWXU)
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(OCOPY),
// DISP=SHR
//*
//*************************************************************
//* RUN SFTP UNDER BATCH UNIX *
//*************************************************************
//SAFPOM10 EXEC PGM=BPXBATCH
//*
//STDIN DD PATH='/u/BIGTRUCK/ALFSEND/POBLINE.SCRIPT',
// PATHOPTS=(ORDONLY),PATHDISP=(DELETE,DELETE)
//STDOUT DD PATH='/u/BIGTRUCK/ALFSEND/POBLINE.STDOUT',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),PATHMODE=(SIRWXU)
//STDERR DD PATH='/u/BIGTRUCK/ALFSEND/POBLINE.STDERR',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),PATHMODE=(SIRWXU)
//*
//*************************************************************
//* PRINT THE UNIX STDERR AND STDOUT SO WE KNOW WHAT HAPPENED *
//*************************************************************
//SAFPOM11 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=V
//USTDOUT DD PATH='/u/BIGTRUCK/ALFSEND/POBLINE.STDOUT',
// PATHDISP=(DELETE,DELETE)
//USTDERR DD PATH='/u/BIGTRUCK/ALFSEND/POBLINE.STDERR',
// PATHDISP=(DELETE,DELETE)
//SYSTSIN DD DSN=FTL.PPDS(F0000863),
// DISP=SHR
//STDERR DD SYSOUT=V,LRECL=132,RECFM=F
//STDOUT DD SYSOUT=V,LRECL=132,RECFM=F
//*
//*************************************************************
//* IF XMIT FAILS, UNMOUNT/DEALLOCATE UNIX THEN CANCEL JOB *
//*************************************************************
// IF (SAFPOM09.RC GE 4 OR SAFPOM10.RC GE 4) THEN
//SAFPOM12 EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(F0003625), UNMOUNT BIGTRUCK/ALFSEND
// DISP=SHR
/*
//SAFPOM13 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(F0003626), UNALLOC BIGTRUCK/ALFSEND
// DISP=SHR
/*
//SAFPOM14 EXEC PGM=EZCANCEL CANCEL JOB
//SYSIN DD DUMMY
//OUT56911 DD DUMMY,
// DCB=BLKSIZE=100
//SYSOUT DD SYSOUT=U
//SYSPRINT DD SYSOUT=U
//SYSUDUMP DD SYSOUT=U,
// HOLD=YES
/*
// ENDIF
//*************************************************************
//* UNMOUNT DATA HFS FILE EVEN IF THE TRANSMIT STEPS FAIL *
//*************************************************************
//SAFPOM15 EXEC PGM=IKJEFT1B,
// COND=EVEN
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(F0003625), UNMOUNT BIGTRUCK/ALFSEND
// DISP=SHR
//*
//*************************************************************
//* DEALLOCATE DATA HFS FILE EVEN IF THE TRANSMIT STEPS FAIL *
//*************************************************************
//SAFPOM16 EXEC PGM=IKJEFT01,
// COND=EVEN
//SYSTSPRT DD SYSOUT=V
//SYSTSIN DD DSN=FTL.PPDS(F0003626), UNALLOC BIGTRUCK/ALFSEND
// DISP=SHR
//*




Please advice.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 23, 2007 11:52 pm    Post subject:
Reply with quote

Hello,

Your post did not include your jobcard - it too could have COND tests.

Notice that some of your steps have COND tests and others do not. If you want the steps to be bypassed in the case of an RC=12 anywhere you could specify a condition code test at the job level or on each step.

Also, notice that some steps (the last 2) have COND=EVEN which tells the system to execute those steps even after an abend (i.e. s0c7, sb37, U0012, etc). You will need to decide how you want those steps to behave for your RC=12 situation - setting an RC is not an abend and EVEN deals with abends.
Back to top
View user's profile Send private message
aseem

New User


Joined: 02 Dec 2003
Posts: 5

PostPosted: Sat Feb 24, 2007 12:08 am    Post subject:
Reply with quote

Hi,

Here is the jobcard:

//FAFREFDX JOB FSIC0000,'ABC-1005 SFTP REFDGM',CLASS=A,
// MSGLEVEL=1,MSGCLASS=V,REGION=0M


Thanks!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Feb 24, 2007 3:22 am    Post subject:
Reply with quote

Hello,

Your jobcard has no condition code test. You can add one or test at the step level. Your initial post shows the first 2 steps returning an RC 12 and subsequently, some of the steps run and some are "flushed".

You will need to decide which steps should run and which should be skipped in which situations. You must very clearly define what should happen at each step for each possible condition code you are interested in. If some steps are to run even in the event of an abend, that too must be considered.
Back to top
View user's profile Send private message
aseem

New User


Joined: 02 Dec 2003
Posts: 5

PostPosted: Sat Feb 24, 2007 3:30 am    Post subject:
Reply with quote

This helps. Thanks a ton!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Feb 24, 2007 4:38 am    Post subject:
Reply with quote

You're welcome icon_smile.gif
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Mon Feb 26, 2007 12:10 am    Post subject: Re: Steps getting executed even though previous step has RC
Reply with quote

In many shops from my experience of JCL (about 30 years) the standard is to have on the JobCard
Code:
//jobname  JOB (acctg),'pgmname',COND=(4,LT),

or on each step something like
Code:
//stepname EXEC PGM=xxxxxxxx,COND=(4,LT)

This means that steps are bypassed after an unacceptable return code. IBM utilities and 'usually' application programs conform to the standard:

  • 0 - OK
  • 4 - Warning
  • 8 - Error
  • > - Severe error
Back to top
View user's profile Send private message
aseem

New User


Joined: 02 Dec 2003
Posts: 5

PostPosted: Tue Feb 27, 2007 5:24 am    Post subject:
Reply with quote

That makes sense. Thanks Steve!
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us