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.
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.