Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Submit a STEP in JCL multiple times.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Deepakgoyal2005

New User


Joined: 22 Mar 2007
Posts: 57
Location: India

PostPosted: Wed Jun 03, 2009 11:56 am    Post subject: Submit a STEP in JCL multiple times.
Reply with quote

I have a JCL to take backup of a PDS.
Passing the last node of source PDS name by symbolic parameter "NODE".
Need to take backup for multiple PDS with different NODE's.

Is there some way to submit the same STEP in a JCL by different values of Symbolic paramater been passed every time.

Like in this example i want to take backup of,
DEEPAK.TEST.SRX into DEEPAK.BACKUP.SRX
DEEPAK.TEST.CPY into DEEPAK.BACKUP.CPY
DEEPAK.TEST.DMS into DEEPAK.BACKUP.DMS

Code:

//NODE      SET NODE='SRX'                                               
//**********************************************************************
//* STEP010 : COPIES THE COMPONENTS IN THE PDS                         
//**********************************************************************
//STEP010 EXEC PGM=IEBCOPY,REGION=1024K                                 
//SYSUT1   DD UNIT=SYSDA,SPACE=(TRK,(30,30),RLSE)                       
//SYSUT2   DD UNIT=SYSDA,SPACE=(TRK,(30,30),RLSE)                       
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//INPUT    DD DISP=SHR,DSN=DEEPAK.TEST.&NODE.                     
//OUTPUT   DD DISP=SHR,DSN=DEEPAK.BACKUP.&NODE.                   
//SYSIN    DD *                                                         
    C O=OUTPUT,I=((INPUT,R))                                           
//*                                                                     
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 03, 2009 12:00 pm    Post subject:
Reply with quote

Why not one job with ALL inputs and outputs defined.
Back to top
View user's profile Send private message
Deepakgoyal2005

New User


Joined: 22 Mar 2007
Posts: 57
Location: India

PostPosted: Wed Jun 03, 2009 2:43 pm    Post subject:
Reply with quote

I just wanted to know if any such facility is available in JCL, so as to have a 1 point change in JCL for solving the purpose and for JCL to be short and simple since i would otherwise be coding the same step time and again.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Jun 03, 2009 2:56 pm    Post subject:
Reply with quote

Why not use an in-stream procedure?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 03, 2009 3:12 pm    Post subject:
Reply with quote

Hardly rocket science, is it ?
Code:

//**********************************************************************
//* STEP010 : COPIES THE COMPONENTS IN THE PDS                         
//**********************************************************************
//STEP010 EXEC PGM=IEBCOPY,REGION=1024K                                 
//SYSUT1   DD UNIT=SYSDA,SPACE=(TRK,(30,30),RLSE)                       
//SYSUT2   DD UNIT=SYSDA,SPACE=(TRK,(30,30),RLSE)                       
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//INPUT1   DD DISP=SHR,DSN=DEEPAK.TEST.ONE                     
//OUTPUT1  DD DISP=SHR,DSN=DEEPAK.BACKUP.ONE                   
//INPUT2   DD DISP=SHR,DSN=DEEPAK.TEST.TWO                     
//OUTPUT2  DD DISP=SHR,DSN=DEEPAK.BACKUP.TWO                   
//INPUT3   DD DISP=SHR,DSN=DEEPAK.TEST.THR                     
//OUTPUT3  DD DISP=SHR,DSN=DEEPAK.BACKUP.THR                   
//SYSIN    DD *                                                         
    C O=OUTPUT1,I=((INPUT1,R))                                           
    C O=OUTPUT2,I=((INPUT2,R))                                           
    C O=OUTPUT3,I=((INPUT3,R))                                           
//*                                                   
Back to top
View user's profile Send private message
Deepakgoyal2005

New User


Joined: 22 Mar 2007
Posts: 57
Location: India

PostPosted: Wed Jun 03, 2009 5:10 pm    Post subject:
Reply with quote

Thanks Expat...

It was just an example which i took to explain my question.
The replies what i got answers me that there is no way around in JCL to submit same step with different parameters been passed.

Anyways, Thanks all for your inputs.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Jun 03, 2009 5:38 pm    Post subject: Reply to: Submit a STEP in JCL multiple times.
Reply with quote

the replies did not answer anything because the question was badly posed !
did You ever hear of inline procs ??

Code:

//BKUP    PROC
//CPY     EXEC PGM=IEBCOPY,REGION=1024K                                 
//SYSPRINT  DD SYSOUT=*                                                 
//SYSOUT    DD SYSOUT=*                                                 
//SYSUT1    DD DISP=SHR,DSN=DEEPAK.TEST.&NODE                  
//SYSUT2    DD DISP=SHR,DSN=DEEPAK.BKUP.&NODE
//SYSUT3    DD UNIT=SYSDA,SPACE=(CYL,(2,2))
//SYSUT4    DD UNIT=SYSDA,SPACE=(CYL,(2,2))            
//        PEND
//*
//        EXEC BKUP,NODE=AAA
//        EXEC BKUP,NODE=...
//        EXEC BKUP,NODE=ZZZ

   

Back to top
View user's profile Send private message
Deepakgoyal2005

New User


Joined: 22 Mar 2007
Posts: 57
Location: India

PostPosted: Thu Jun 04, 2009 11:06 am    Post subject:
Reply with quote

I got my answer from other source...
FYI... an example to show different values of symbolic parameters driving same STEP to run multiple times.

JCL:
Code:

//PRC JCLLIB  ORDER=DEEPAK.TEST.JCL
//STEP010  EXEC BACKPRC,                   
//         PDS='CPY'                       
//STEP020  EXEC BACKPRC,                   
//         PDS='SRX'                       


PRC:
Code:

//STEP002 EXEC PGM=IEBCOPY,REGION=1024K                 
//SYSUT1   DD UNIT=SYSDA,SPACE=(TRK,(30,30),RLSE)       
//SYSUT2   DD UNIT=SYSDA,SPACE=(TRK,(30,30),RLSE)       
//SYSPRINT DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//INPUT    DD DISP=SHR,DSN=DEEPAK.TEST.&PDS       
//OUTPUT   DD DISP=SHR,DSN=DEEPAK.BACKUP.&PDS     
//SYSIN    DD DISP=SHR,DSN=DEEPAK.CTC(BKPCTC)
//*                                                     

Where, DEEPAK.CTC(BKPCTC) stores control card as "C O=OUTPUT,I=((INPUT,R))"
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 04, 2009 9:37 pm    Post subject:
Reply with quote

Hello,

Quote:
an example to show different values of symbolic parameters driving same STEP to run multiple times.
No, that is not an example of "driving the same step" multiple times. It is an example of a job that executes a PROC multiple times. Each time the step is only executed one time.

I mention this because you not only need to make something run, but you need to use the correct terminology when "talking" with others. . .
Back to top
View user's profile Send private message
Deepakgoyal2005

New User


Joined: 22 Mar 2007
Posts: 57
Location: India

PostPosted: Fri Jun 05, 2009 9:50 am    Post subject:
Reply with quote

Thanks Dick for your suggestions.
Also the solution provided by Enrico worked well. Somehow i missed trying it out since i had never used inline PROCS so I took it as coding a separate component as PROC to execute JCL.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jun 05, 2009 9:53 am    Post subject: Reply to: Submit a STEP in JCL multiple times.
Reply with quote

You're welcome - good luck icon_smile.gif

d
Back to top
View user's profile Send private message
Itanium

Active User


Joined: 22 Jan 2006
Posts: 114
Location: India

PostPosted: Fri Jun 05, 2009 5:55 pm    Post subject:
Reply with quote

just a thought to share, in our application we have a Backup Process that actually creates a dynamic Backup JCL at runtime and executes.

Input to the process will be a file with 'N' number of datasets to be backedup (each dataset as a record), and the Backup Proc executes a Program that will actually create a JCL with the 'N' number of steps to take backup of each dataset input in the file and use INTRDR to execute that dynamically created JCL.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 05, 2009 6:03 pm    Post subject:
Reply with quote

Itanium wrote:
just a thought to share, in our application we have a Backup Process that actually creates a dynamic Backup JCL at runtime and executes.

Input to the process will be a file with 'N' number of datasets to be backedup (each dataset as a record), and the Backup Proc executes a Program that will actually create a JCL with the 'N' number of steps to take backup of each dataset input in the file and use INTRDR to execute that dynamically created JCL.


I would have thought that Dfdss would have been far more efficient at taking backups of multiple datasets.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to calculate an specific transact... lind sh CICS 2 Tue Sep 13, 2016 9:20 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Don't allow CICS to submit batch jobs prino JCL & VSAM 5 Mon Jul 25, 2016 3:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us