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

How to abend a JCL


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

New User


Joined: 02 Nov 2005
Posts: 12
Location: Delhi

PostPosted: Mon Jun 12, 2006 9:30 pm
Reply with quote

Hi all,
Can anyone help me to abend a job. Actually there is one program which is getting executed by step01 of the job and step02 is sending the mail regarding the record counts and all.

Now I need to amend the program like if there is any mismatch in the no of record processed and total no of record present in trailer record, then write the error message in the file and send mail the content of that file and abend the program/JCL so that the next job should/can not run. Becasue the next job is dependent on the succesful completeion of this job in that suite. IN simple meaning that suite will stop there only.

Thanks
Abhash
Back to top
View user's profile Send private message
calspach

New User


Joined: 05 May 2006
Posts: 32
Location: USA

PostPosted: Tue Jun 13, 2006 12:34 am
Reply with quote

Put the cond= on each step you do or don't want to run following the completion of the STEP1.

STEP2 EXEC PGM=IDCAMS,COND=(0,NE,STEP1) WILL RUN IF STEP1 RECIEVES 0

STEP3 EXEC PGM=IDCAMS,COND=(0,EQ,STEP1) WILL NOT RUN IF STEP1 RECIEVES 0

Basically, if the condition specified is TRUE, the step will not run.

You can then write a simple program that will run and blow up based on the same conditions. Basically, whenever it runs, it blows up. Make it only run when there is a non-zero error, or when there is a specific error.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Jun 13, 2006 1:30 am
Reply with quote

Abhash,

You don't need to write a program to abend. If your site does not have a program thats function is to abend, all you need to do is execute a program that does not exist. i.e.

//SETP3 EXEC PGM=ABENDNOW,PARM=(0,EQ,STEP1)

You will get a S806 abend when STEP3 runs.

Dave
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Avoid job abend on dataset held by us... JCL & VSAM 6
No new posts After newcopy the CICS program user f... CICS 7
No new posts User ABEND U0476. Need help. IMS DB/DC 1
No new posts ABEND 0717 during starting IMS IMS DB/DC 0
No new posts Call an hlasm from REXX in batch and ... CLIST & REXX 4
Search our Forums:


Back to Top