Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Copy load modules and alias

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1521
Location: Chennai

PostPosted: Thu Apr 20, 2017 6:31 am    Post subject: Copy load modules and alias
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: 8151
Location: East Dubuque, Illinois, USA

PostPosted: Thu Apr 20, 2017 7:06 am    Post subject: Reply to: Copy load modules and alias
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: 563
Location: The Universe

PostPosted: Thu Apr 20, 2017 7:09 am    Post subject:
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 User


Joined: 01 Sep 2015
Posts: 161
Location: Switzerland

PostPosted: Thu Apr 20, 2017 12:52 pm    Post subject:
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: 1521
Location: Chennai

PostPosted: Thu Apr 20, 2017 10:55 pm    Post subject:
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: 8151
Location: East Dubuque, Illinois, USA

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

I found this quote dated 12/21/2015 at https://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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Could we identify the called modules ... elixir1986 COBOL Programming 5 Fri Jul 14, 2017 1:53 am
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us