Find the last executed STEP in a JCL

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
sknaren
Member
Posts: 1
Joined: Wed Aug 26, 2015 9:22 am

Find the last executed STEP in a JCL

Post by sknaren » Wed Aug 26, 2015 9:28 am

Hi,

I have to find the last STEP (step name) that was executed.

Eg:

//MYJOB JOB .....
//STEP1 EXEC PGM=XYZ
//STEP2 EXEC PGM=ABC
//STEP3 EXEC PGM=A12
//STEP4 EXEC PGM=B12

I have the condition statements to no execute steps if the prior step returns an code more than 4.
So in case STEP1 and STEP 2 and completed. STEP2 gives a RC of 8, then I want to know that STEP2 was the last executed step.

Justification to know this step.
I have to send an alert notification (email via SMTP) to the batch monitoring team saying "MYJOB abended in step STEP2".

Regards
sknaren

Bigindyr
Member
Posts: 2
Joined: Wed Nov 25, 2015 12:23 pm
Contact:

Post by Bigindyr » Wed Nov 25, 2015 12:25 pm

I like this comment a lot. And follow-up forum on forever.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others