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

Copy load modules and alias


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Apr 20, 2017 6:31 am
Reply with quote

Hi,

We have two load module libraries, old and new.
I need to copy some load modules from old to new and their corresponding aliases.

When I go to the PDS via ISPF and issue a "C" infront of only an alias member(only the alias member and not the corresponding data member),
it copies both the alias and corresponding member and the TTR values match.

However if I use a IEBCOPY batch job to copy the alias, it does not copy the data member.
If I copy both alias and data member using IEBCOPY, then the TTR does not match :-(
Code:
 COPY OUTDD=OUTPUT,INDD=((INPUT,R))     
 SELECT MEMBER=ALIASMEM

Could you please let me know how to copy both alias and data member through IEBCOPY or in batch.

Regards,
Vasanth.S
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 20, 2017 7:06 am
Reply with quote

The system is doing what you asked. From the DFSMSdfp Utilities manual on IEBCOPY with emphasis added by me:
Quote:
Copying Members That Have Alias Names (COPY Statement)

This topic discusses using the COPY statement for copying a PDS, PDSU, or PDSE that has members with alias names. The COPYGRP or COPYGROUP statement is recommended for copying program objects.

Tip: If the COPY statement is used to copy program objects, errors can occur.

If you are copying an entire data set to a new data set (one that has no members before the copy operation), all members and their aliases will be copied, and they will have the same relationship to one another as they had on the original data set.
If you are merging a data set with another data set, no members or aliases on the output data set will be changed unless you specify that input members are to replace output members.
Example:
In all instances, if you have a member A with alias B on your input data set, and a member C with alias B on your output data set, if you do not indicate replacement, member A will be copied over, but the alias name B will continue to refer to C. If you do indicate replacement, B will be copied as an alias of member A in the newly merged data set.
When selectively copying from a partitioned data set, you must specify every name that you want copied, including their aliases.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Apr 20, 2017 7:09 am
Reply with quote

You direct IEBCOPY to copy both the primary member and its alias member. Period. End of story.

Is the "old" data set a PDS or PDSE?
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Thu Apr 20, 2017 12:52 pm
Reply with quote

Which one of the reasons I like the PDS86 program from CBTTAPE.ORG so much, with that you can copy a member plus aliases with one command.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Apr 20, 2017 10:55 pm
Reply with quote

Quote:
The system is doing what you asked. From the DFSMSdfp Utilities manual on IEBCOPY

Thanks Robert, I should have referred the manual.
COPYGRP does not work, as we are still on z/OS 1.13.
Quote:
you must specify every name that you want copied, including their aliases.

I specified the alias and the primary member in IEBCOPY but after the copy the TTR did not match for alias and primary member.
Quote:
Is the "old" data set a PDS or PDSE?
Both the guys are PDS.
We have a work around, so it is not a pressing issue though.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 20, 2017 11:49 pm
Reply with quote

I found this quote dated 12/21/2015 at www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec294331.html :
Quote:
There is another type of alias on z/OS which is also handled differently, and that is an alias of a member of a loadlib. Tests using LOADLIBs with aliases showed that both IEBCOPY and XCOM will copy over aliases for load modules only when the entire loadlib is transferred. No alias relationship is maintained when transferring or copying over individual modules. MVS does not maintain the TTR's integrity when an individual module is relinked or copied or transferred. This is much the same as with source/text/listing members.

An alias transfer can only work if its associated base module is also transferred. This is due to the fact that the TTR pointer to the base member will be different on the receiving side. If the base member doesn't exist on the receiving side, there's no way to get a valid TTR pointer to place in the ALIAS directory entry.
So you need to either copy the entire load library or don't expect aliases to be associated with their base in the target load library if members are copied.
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts How to load to DB2 with column level ... DB2 6
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts REASON 00D70014 in load utility DB2 6
No new posts How to delete a user's alias from the... JCL & VSAM 11
Search our Forums:

Back to Top