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

Steps getting executed even though previous step has RC = 12


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 3156
Location: Tucson AZ

PostPosted: Fri Feb 23, 2007 6:35 am
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

Moderator Emeritus


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

PostPosted: Fri Feb 23, 2007 8:36 am
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
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

Moderator Emeritus


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

PostPosted: Fri Feb 23, 2007 11:52 pm
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
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

Moderator Emeritus


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

PostPosted: Sat Feb 24, 2007 3:22 am
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
Reply with quote

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

Moderator Emeritus


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

PostPosted: Sat Feb 24, 2007 4:38 am
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: 89
Location: Stockholm, Sweden

PostPosted: Mon Feb 26, 2007 12:10 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts CA7 deleting files in steps after job... CA Products 4
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
Search our Forums:

Back to Top