View previous topic :: View next topic
|
Author |
Message |
Brad McCoy
New User
Joined: 02 Jul 2014 Posts: 3 Location: USA
|
|
|
|
Hello,
I am looking for a simple way to search multiple pds libraries and return with a single member. The ultimate objective here is to avoid multiple versions of the same SYSIN Card Member. A perfect solution would be similar to how we search multiple PROC libs via the JCLLIB statement.
For illustration: I have several test environments and one production environment. I want my JCL to look in the test environment for a SYSIN Data member and if not found, look to a higher level test environment, etc. up to Production. This would ensure that my JCL is pulling in the test SYSIN without having to hardcode the library names specific to each SYSIN.
The best solution I found in forum searches here involved using IEBCOPY to copy SYSIN Members from multiple libraries to one, then use the one library. That will work but I am looking for a more elegant solution that avoids extra steps.
Thanks in advance for any replies! |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Code: |
//OPCJOB .....
//ExecStep EXEC PGM=OPC...
//SYSIN DD DSN=xxxxx0.xxxxx.xxxxx,DISP=SHR
// DD DSN=xxxxx1.xxxxx.xxxxx,DISP=SHR
// DD DSN=xxxxx2.xxxxx.xxxxx,DISP=SHR |
Is this what you mean? |
|
Back to top |
|
|
Brad McCoy
New User
Joined: 02 Jul 2014 Posts: 3 Location: USA
|
|
|
|
Rohit, If I used your example and the member existed in more than one of these three PDS libraries, the JCL would return every one of the members rather than just the first one. Also I believe if the member was missing from one of these libraries the JCL would error out? (I may be wrong, it's been awhile since doing similar JCL) |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
Rohit, If I used your example and the member existed in more than one of these three PDS libraries, the JCL would return every one of the members rather than just the first one. Also I believe if the member was missing from one of these libraries the JCL would error out? (I may be wrong, it's been awhile since doing similar JCL) |
Yes, right in both the cases and certainly this is not what you looking for.
Also,
Quote: |
The best solution I found in forum searches here involved using IEBCOPY to copy SYSIN Members from multiple libraries to one, then use the one library. That will work but I am looking for a more elegant solution that avoids extra steps |
In this case, you need to manually change the control card member name as and when you want to point to any region or enviornments control card, isn't it? but yes this will avoid multiple versioning |
|
Back to top |
|
|
Brad McCoy
New User
Joined: 02 Jul 2014 Posts: 3 Location: USA
|
|
|
|
Rohit, Thank you for your feedback. You are correct, manually changing member/library names to point to the correct environment is the way my area does this currently. I'm trying to find a better way.
My objective is to reduce manual changes as much as possible but I am starting to conclude that until IBM introduces a new z/OS feature allowing this I am stuck with my current process.
ps- Your first reply is exactly what I would think of when hearing 'sysin pds library concatenation'. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You will have anyway a two step process ...
check the use of ISRSCAN or ISRLEMX
they will extract from a PDS concatenation the member found first in the hierarchy
thats the way ISPF builds the compile jcld |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
You could use a JCL symbolic and a DDNAME reference on your SYSIN to point to the library appropriate to the environment.
In this example if you code ENV=T on the execution JCL it will reference the T named DD statement.The &ENV could also be used to relate to different member names possibly.
//STEP01 EXEC YOURPROC,ENV=T
//YOURPROC PROC ENV=P
//....
//SYSIN DD DDNAME=&ENV
//T DD DSN=TEST.LEVEL.PDS(MEMBER&ENV)
//Q DD DSN=QUAL.LEVEL.PDS(MEMBER&ENV)
//P DD DSN=PROD.LEVEL.PDS(MEMBER&ENV) |
|
Back to top |
|
|
|