Doubt in Cond code?

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
sivasaras
Member
Posts: 45
Joined: Tue Jun 15, 2010 3:07 pm

Doubt in Cond code?

Post by sivasaras » Thu Jun 17, 2010 9:31 am

Hi,

I have 5 steps in a Jcl and i have coded cond code in step 3, will the remaining steps 4 and 5 will execute? this is the interview questions they asked in Jcl?

Kindly let me know.

Thanks in Advance.

Regards,
Siva

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Thu Jun 17, 2010 2:31 pm

Showing your JCL will help for sure. Who knows what COND parameter did you code?
Regards,
Anuj

sivasaras
Member
Posts: 45
Joined: Tue Jun 15, 2010 3:07 pm

Post by sivasaras » Mon Jun 21, 2010 4:36 pm

Hi,

I have 5 steps, i dont want to execute step 3 and step 5? how will you code the cond code?

Thanks in advance.

Regards,
Siva

sivasaras
Member
Posts: 45
Joined: Tue Jun 15, 2010 3:07 pm

Post by sivasaras » Mon Jun 21, 2010 4:44 pm

Hi,

This is the jcl which i have coded

//TRNG002 JOB (U940),'SIVA SARAS'
//STEP1 EXEC PGM=PROG1
//STEP2 EXEC PGM=CBPRG,
//STEP3 EXEC PGM=CBPRG2,COND=(8,EQ,STEP2)
//STEP4 EXEC PGM=CBPRG3,
//STEP5 EXEC PGM=CBPRG4,COND=(8,EQ,STEP4)
//

Kindly let me know it is correct or wrong.
if it wrong kindly let me know.

Regards,
Siva

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Jun 21, 2010 9:34 pm

Have you tried IEBEDIT, as we discussed in other topic?
Regards,
Anuj

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Jun 21, 2010 9:37 pm

And also, what happend when you tried what you showed?
Regards,
Anuj

User avatar
rajivtuli2512
Member
Posts: 3
Joined: Tue Jul 20, 2010 11:49 pm
Location: Bangalore

Post by rajivtuli2512 » Wed Jul 21, 2010 12:12 am

Hi,

Try this code ..


//TRNG002 JOB (U940),'SIVA SARAS'
//STEP1 EXEC PGM=PROG1
//STEP2 EXEC PGM=CBPRG,
//STEP3 EXEC PGM=CBPRG2,COND=(4095,LE,STEP2)
//STEP4 EXEC PGM=CBPRG3,
//STEP5 EXEC PGM=CBPRG4,COND=(4095,LE,STEP4)
//

Thanks
Thanks & Regards
^^^^RAJ^^^^^

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Jul 21, 2010 1:31 pm

Will it work for sure? What if the Return-code from step2 and step4 were less than 4095?
Regards,
Anuj

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