View previous topic :: View next topic
|
Author |
Message |
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|