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

JCL - Is there a way to have repeat logic in JCL code?


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

New User


Joined: 15 Mar 2005
Posts: 17
Location: Toronto, Canada

PostPosted: Fri Mar 18, 2005 12:57 pm
Reply with quote

Hi,

I need to perform cretain sequence of JCL steps until certain condition code is received. Is there a way out?

Thanks,
Siva.
Back to top
View user's profile Send private message
kavi

New User


Joined: 03 Mar 2005
Posts: 2

PostPosted: Fri Mar 18, 2005 2:58 pm
Reply with quote

You can use

// IF <stepname>.RC = 0 THEN
//STEP1 EXEC PGM=XXX
// ELSE
//STEP2 EXEC PG=YYY
// END-IF
//
Back to top
View user's profile Send private message
sivaplv

New User


Joined: 15 Mar 2005
Posts: 17
Location: Toronto, Canada

PostPosted: Fri Mar 18, 2005 3:15 pm
Reply with quote

Hi Kavi,

I am not looking for IF ....ELSE way, since I need to loop may JCL steps until the certain RC condition is met. Looking for something like PERFORM UNTIL or DO WHILE, to enclose a sequence of steps together that need be executed in that loop.

Any Ideas?

Thanks,
Back to top
View user's profile Send private message
sivaplv

New User


Joined: 15 Mar 2005
Posts: 17
Location: Toronto, Canada

PostPosted: Sun Mar 20, 2005 10:59 am
Reply with quote

Hi,

Can somebody, please, advise on this one? If there is no solution within JCL, then I will try to use REXX to create dynamic JCL to solve this problem.

Thanks,
Back to top
View user's profile Send private message
Prandip

New User


Joined: 04 Mar 2005
Posts: 84
Location: In my tiny cubicle ...

PostPosted: Sun Mar 20, 2005 2:01 pm
Reply with quote

No, not within a single job. You would have to logically repeat the submission of the entire job until your control criteria was met.

For more information on MVS JCL, please revire the "z/OS MVS JCL Reference":

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B650/CCONTENTS?DT=20040712170508
Back to top
View user's profile Send private message
sivaplv

New User


Joined: 15 Mar 2005
Posts: 17
Location: Toronto, Canada

PostPosted: Sun Mar 20, 2005 11:01 pm
Reply with quote

Hi Prandip,

Thanks for your reply.

Hi Moderator,

Please mark this as SOLVED.

Regards,
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 IBM IMU Utility for Easytrieve Code t... IBM Tools 0
No new posts Writing next records after a match an... Compuware & Other Tools 5
No new posts purge jobs with return code 0 and ret... JCL & VSAM 6
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
No new posts Repeat n times by substuting SEQNUM i... DFSORT/ICETOOL 2
Search our Forums:


Back to Top