View previous topic :: View next topic
|
Author |
Message |
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
I need to perform a series of PDS Copy steps, but the PDS names will be different each time which i need to provide as a parameter |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Read the JCl manual, and pay attention to the PROC statement and then try and build an instream PROC in which you can define the symbolics that are required, and then execute the PROC with the symbolics adjusted for any PDS. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
Hi Deepthy,
Better to use rexx code for your requirement. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Deepthy,
Quote: |
I need to perform a series of PDS Copy steps, but the PDS names will be different each time |
As suggested, Use REXX to build your JCL which has an instream proc.
If the first few qualifiers of the PDS are the same then u can use LMDLIST to expand. If the qualifiers are different then store it a flat file and read that file and set-up the JCL. |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
My actual requirement is like i have a set of PDS names which i need to copy using a JCL. but the middle level qualifier of the PDS 's changes for each execution.
XXX.val1.YYY
AAA.val1.BBB
GGG.val1.HHH
the value for the val1 changes for each execution
How to specify it through JCL. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
Hi Deepthy,
Put all the pds names in a sequential file and read that file and unstring the name of the file with "." as delimiter and get the second qualifier and use it to override for each and every call of the proc which will copy that pds file to another file use the same qualifier in the file to which you are copying so that it will not get override in the same file for the next execution. |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
Is it possible to give a symbolic parameter in a SYSIN statement?
say
//COPYSTP1.SYSINDD *
*
$$DD01 COPY OUT=0,EDITALLl=(1,0,C'ABCD',C'WXYZ')
can i use a parameter in place of the second string 'WXYZ' like
$$DD01 COPY OUT=0,EDITALLl=(1,0,C'ABCD',&TRIAL)
Where TRIAL is defined in an instream proc within the JCL. or is there any other way to give the parameter value in the sysin statement |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Why don't you try it and let us know?
O. |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
I tried giving the same statement but didnt workout? is there any other way? |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
There is a correction in the code in the above query (TYPO error)
//COPYSTP1.SYSINDD *
*
$$DD01 COPY OUT=0,EDITALL=(1,0,C'ABCD',C'WXYZ')
can i use a parameter in place of the second string 'WXYZ' like
$$DD01 COPY OUT=0,EDITALL=(1,0,C'ABCD',&TRIAL) |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
No.
O. |
|
Back to top |
|
|
Rod Hittle
New User
Joined: 21 Nov 2007 Posts: 4 Location: Omaha, NE USA
|
|
|
|
Deepthy, you asked 'Is it possible to give a symbolic parameter in a SYSIN statement?' and ofer71 said 'no'. He is correct if you stick to just having JCL code in a 'job' or even a job executing a proc.
There is no way around this that I have discovered. BUT, if you can code a REXX macro (you can do this in COBOL too) you can make a macro that dynamically creates the job/JCL (typically a PDS member but could be a single flat file). In that macro you can very the node for files you want to change to do the copy. I typically do this using a REXX macro and a 'skeleton'. The symbolic variable is picked up by the skeleton if in the skeleton the 'word' has a '&' in front of it. Just like in a job/proc relationship. With REXX you can even have it come up with an on-screen panel (like CICS) where you can supply the value for the variable, the REXX marco would pick that up and assign it to the variable, and pass it on to the JCL created using the skeleton previously made. All this can be done with COBOL too, but more of a bother in my opinion. |
|
Back to top |
|
|
|