Run a step 'n' times

How to Run same steps in a jcl 'n' number of time without repeating the steps n times?

Questions by balasubramaniyan

Showing Answers 1 - 7 of 7 Answers

I'm not sure if you're aware of this, but JCL doesn't have the ability to pass control to previous statements in a single run.

You could either set up a proc.
Personally, I'd INCLUDE the step as many times as needed

  Was this answer useful?  Yes

Aloke Deb

  • Jul 25th, 2011
 

Use an instream proc:
See the code below, it takes the backup of the dataset by replacing the NODE parameter

Code
  1. //BKUP    PROC

  2. //CPY     EXEC PGM=IEBCOPY,REGION=1024K                                  

  3. //SYSPRINT  DD SYSOUT=*                                                  

  4. //SYSOUT    DD SYSOUT=*                                                  

  5. //SYSUT1    DD DISP=SHR,DSN=ABC.TEST.&NODE                  

  6. //SYSUT2    DD DISP=SHR,DSN=ABC.BKUP.&NODE

  7. //SYSUT3    DD UNIT=SYSDA,SPACE=(CYL,(2,2))

  8. //SYSUT4    DD UNIT=SYSDA,SPACE=(CYL,(2,2))            

  9. //        PEND

  10. //*

  11. //        EXEC BKUP,NODE=AAA

  12. //        EXEC BKUP,NODE=...

  13. //        EXEC BKUP,NODE=ZZZ

  Was this answer useful?  Yes

Pavan Kumar

  • Apr 22nd, 2015
 

Put the JCL to be called multiple times into the working storage section of COBOL program and submit this JCL from perform statement with until condition of COBOL program . Call this COBOL program from another JCL.

  Was this answer useful?  Yes

Janani

  • Mar 2nd, 2017
 

Can you please let me know how this can be implemented?

  Was this answer useful?  Yes

RAM

  • Apr 25th, 2017
 

JCL with multiple jobcards will submit the JCL multiple times

  Was this answer useful?  Yes

CodeBulls

  • Nov 24th, 2017
 

Put the Steps in a In-Stream PROC and repeat executing the PROC n times.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.