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

SYSIN PDS Library Concatenation


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Brad McCoy

New User


Joined: 02 Jul 2014
Posts: 3
Location: USA

PostPosted: Mon Jul 07, 2014 11:49 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Tue Jul 08, 2014 12:06 am
Reply with quote

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
View user's profile Send private message
Brad McCoy

New User


Joined: 02 Jul 2014
Posts: 3
Location: USA

PostPosted: Tue Jul 08, 2014 12:31 am
Reply with 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)
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Tue Jul 08, 2014 1:51 am
Reply with quote

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
View user's profile Send private message
Brad McCoy

New User


Joined: 02 Jul 2014
Posts: 3
Location: USA

PostPosted: Tue Jul 08, 2014 7:35 pm
Reply with quote

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'. icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jul 08, 2014 10:39 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Wed Jul 23, 2014 3:15 am
Reply with quote

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
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 Calling an Open C library function in... CICS 1
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Access library name in REXX CLIST & REXX 6
Search our Forums:

Back to Top