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

Is it possible to execute other steps if it abended


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

New User


Joined: 15 Oct 2006
Posts: 11

PostPosted: Sun Oct 22, 2006 11:55 am
Reply with quote

Q : The JOB consists of 5 steps if the job abended at 3 rd step then the other steps nothing but 4 th and 5 th steps will execute or not
Back to top
View user's profile Send private message
diwa_thilak

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Sun Oct 22, 2006 2:45 pm
Reply with quote

subbubannurutcs,

The job will not will not execute the remaining steps if the step has abended due to logical errors in the programs(i.e Data access violation, S22).

But if the job has abended to dataset not found/ catalogues. Empty dataset we can use the return codes to run the other steps.

Simple words:

cobol errors: if Abend no resuming, that logic has to be included in Code.
JCL errors : Use return code to execute other steps.


Correct me if i am wrong.

Thanks,
Diwakar .

Nobody is perfect. I am Nobody
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Oct 23, 2006 6:49 am
Reply with quote

subbu... COND=EVEN can be used to execute further step even if a preceding step has abended.
There are some constraints which needs to be consider for this type of execution... look here for more details...

Quote:
cobol errors: if Abend no resuming, that logic has to be included in Code.
JCL errors : Use return code to execute other steps.

Diwakar... See what manual says on this...
Quote:
If a step abnormally terminates during scheduling, due to failures such as JCL errors or the inability to allocate space, the system bypasses the remaining steps, no matter what the COND parameter requests.
Back to top
View user's profile Send private message
diwa_thilak

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Mon Oct 23, 2006 8:17 am
Reply with quote

Thanks priyesh for correcting me.

Thanks,
Diwakar.D
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Mon Oct 23, 2006 3:03 pm
Reply with quote

In addition to what priyesh said:

If you want a step to be executed when a prior step abende code COND=ONLY. This step will only be executed if the job abended. Often done for recovery of a database.
Back to top
View user's profile Send private message
vrexy

New User


Joined: 19 May 2005
Posts: 7
Location: bangalore

PostPosted: Thu Oct 26, 2006 11:47 am
Reply with quote

Hi ,

Suppose 3 steps are there in 1st step is having one member , this member is used by 2nd step . if that member is empty in 1st step 2nd step should not run . it should go directly to the 3rd step , can u please let me know how to check the empty file using JCL and how to put condition.

Surya
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Oct 26, 2006 2:08 pm
Reply with quote

vrexy wrote:
Hi ,

Suppose 3 steps are there in 1st step is having one member , this member is used by 2nd step . if that member is empty in 1st step 2nd step should not run . it should go directly to the 3rd step , can u please let me know how to check the empty file using JCL and how to put condition.

Surya


Step 1 is the one to set the condition depending on the content of the member. I.e. when empty set condition to 1, when not set condition to 2. How to do this you can find in the application programming manuals yourself. In the JCL at step 2 and 3 you code the COND parameter. Keep in mind that the COND condition is used to find out if the step is to be not executed. If the member is empty at step 2 code COND,EQ,1; if step 1 set the condition to 1 this step will not run. If not at step 3 code COND,NE,2
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Oct 27, 2006 12:37 pm
Reply with quote

Hi !

You could also use the IF Instruction in JCL. It's a bit more comfortable.

// IF (RC EQ 4) THEN
//*
//STEP100 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=IER1337.MDL50310.S307.PROTDAT
//SYSUT2 DD SYSOUT=*
//*
// ENDIF
//*

Regards, UmeySan
Back to top
View user's profile Send private message
toddnugen

New User


Joined: 01 Nov 2006
Posts: 9

PostPosted: Wed Nov 01, 2006 7:45 am
Reply with quote

//Step1 cond=(0,lt)
...
//Step3 cond=(0,lt)
//Step4 cond=(0,lt)
//Step5 cond=(0,lt)
...
//***Operator response If Abend***
//Stepx cond=(0,eq,step4)
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 Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Reorg abended with REASON=X'00E40347' DB2 2
No new posts Fetch data from programs execute (dat... DB2 3
No new posts CA7 deleting files in steps after job... CA Products 4
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
Search our Forums:

Back to Top