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

Submit a STEP in JCL multiple times.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8796
Location: Welsh Wales

PostPosted: Wed Jun 03, 2009 12:00 pm
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
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Jun 03, 2009 2:56 pm
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: 8796
Location: Welsh Wales

PostPosted: Wed Jun 03, 2009 3:12 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Jun 03, 2009 5:38 pm
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
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

Moderator Emeritus


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

PostPosted: Thu Jun 04, 2009 9:37 pm
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
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

Moderator Emeritus


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

PostPosted: Fri Jun 05, 2009 9:53 am
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
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: 8796
Location: Welsh Wales

PostPosted: Fri Jun 05, 2009 6:03 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts Repeat n times by substuting SEQNUM i... DFSORT/ICETOOL 2
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts Using Multiple IFTHEN and WHEN condit... SYNCSORT 12
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top