View previous topic :: View next topic
|
Author |
Message |
Deepakgoyal2005
New User
Joined: 22 Mar 2007 Posts: 57 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Why not one job with ALL inputs and outputs defined. |
|
Back to top |
|
|
Deepakgoyal2005
New User
Joined: 22 Mar 2007 Posts: 57 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Why not use an in-stream procedure? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
Deepakgoyal2005
New User
Joined: 22 Mar 2007 Posts: 57 Location: India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
Deepakgoyal2005
New User
Joined: 22 Mar 2007 Posts: 57 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Deepakgoyal2005
New User
Joined: 22 Mar 2007 Posts: 57 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome - good luck
d |
|
Back to top |
|
|
Itanium
Active User
Joined: 22 Jan 2006 Posts: 114 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
|