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

Issue with copying PDS members to another PDS


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Mon Apr 20, 2015 1:28 pm
Reply with quote

Hi All,
I have used below command to copy PDS members from one pds to another.

Code:
ADDRESS TSO 'COPY from pds(member) topds(mem)'



All the members were copied successfully but i am getting the output by setting the SPACES as ZEROS.

for example, from member is a COBOl program like below,
Code:

000026        ENVIRONMENT DIVISION.   
000027        CONFIGURATION SECTION. 
000028        INPUT-OUTPUT SECTION.   
000029        FILE-CONTROL.           


i am getting to pds member like below,

Code:

000026 00000  ENVIRONMENT DIVISION.   
000027 00000  CONFIGURATION SECTION.   
000028 00000  INPUT-OUTPUT SECTION.   
000029 00000  FILE-CONTROL.           


those extra ZEROS were coming in my to PDS member wherever the SPACES are available.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Apr 20, 2015 1:55 pm
Reply with quote

COPY is NOT a command provided by vanilla TSO

ask Your support about the documentation for it

but ...
it could be a leftover of a prehistoric program product
OS TSO Data Utilities 5734-UT1.

providing the commands
COPY, FORMAT, LIST, MERGE.

it was known to buggy ( BTDTGTTS )
for example putting odd sequence numbers even when not needed/asked for

( BTDTGTTS ) Been There Done That Got The T Shirt
Back to top
View user's profile Send private message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Mon Apr 20, 2015 3:25 pm
Reply with quote

Thx for the reply. If COPY is not an command then could you please let me know which command i can use to copy the pds members to another pds?
Back to top
View user's profile Send private message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Mon Apr 20, 2015 3:41 pm
Reply with quote

Thanks guys. I have used SMCOPY which worked.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Apr 20, 2015 4:33 pm
Reply with quote

Quote:
hanks guys. I have used SMCOPY which worked.


using SMCOPY is a really bad idea
SMCOPY is/was no tmeant to ce a general purpose copy utility,
just an aid to deal with the TDSO SESSION MANAGER logs

hence the SM prefix
Back to top
View user's profile Send private message
steve-myers

Active Member


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

PostPosted: Mon Apr 20, 2015 5:12 pm
Reply with quote

enrico-sorichetti wrote:
COPY is NOT a command provided by vanilla TSO

ask Your support about the documentation for it

but ...
it could be a leftover of a prehistoric program product
OS TSO Data Utilities 5734-UT1.

providing the commands
COPY, FORMAT, LIST, MERGE.

it was known to buggy ( BTDTGTTS )
for example putting odd sequence numbers even when not needed/asked for

( BTDTGTTS ) Been There Done That Got The T Shirt

I agree. The old COPY command was (is) known to be very buggy, along with most of the TSO Data Utilities package. The problem you had is a known issue. You can (usually) work around it by specifying the NONUM keyword. Otherwise, copying a single member from one PDS to another PDS usually works OK.

If the target PDS exists, you can use

REPRO input(member) output(member)

which should work on all systems unless the member is a load module, when it won't work
Back to top
View user's profile Send private message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Mon Apr 20, 2015 5:34 pm
Reply with quote

Thank you very much steve-myers. I have used REPRO as you said and it is also working perfectly(even for load module).
Back to top
View user's profile Send private message
steve-myers

Active Member


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

PostPosted: Mon Apr 20, 2015 8:09 pm
Reply with quote

Senthilkumar k wrote:
Thank you very much steve-myers. I have used REPRO as you said and it is also working perfectly(even for load module).

Just because it said it worked, don't bet on it. Load modules require surprisingly complex processing beyond just copying the data, and I'm not sure IDCAMS does it.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Apr 20, 2015 8:53 pm
Reply with quote

It would be more appropriate to use IEBCOPY to copy members from one PDS/PDSe to another - particularly load modules(PDS)/program objects(PDSe).

If a load module is being copied, IEBCOPY will invoke the linkage editor/binder if required. This will always occur if copying from PDS to PDSe or vice versa in order to convert load modules to program objects or program objects to load modules (if possible), respectively.

IEBCOPY will provide error messages where necessary.

Garry.
Back to top
View user's profile Send private message
steve-myers

Active Member


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

PostPosted: Mon Apr 20, 2015 11:24 pm
Reply with quote

Garry Carroll wrote:
It would be more appropriate to use IEBCOPY to copy members from one PDS/PDSe to another - particularly load modules(PDS)/program objects(PDSe).

If a load module is being copied, IEBCOPY will invoke the linkage editor/binder if required. ...
As far as I know, IEBCOPY copies load modules from PDS to PDS all by its little self, even if doing a COPYMOD to reblock a lod module. It does use the Binder when copying a load module to a PDSE.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Apr 21, 2015 12:12 am
Reply with quote

@Steve-Myers: Yes, and from PDSe to PDSe all by its little self. - which is why I mentioned "if required", PDSe to PDS also requires invoking the linkage editor/binder.

Garry.
Back to top
View user's profile Send private message
steve-myers

Active Member


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

PostPosted: Tue Apr 21, 2015 6:20 am
Reply with quote

steve-myers wrote:
... If the target PDS exists, you can use

REPRO input(member) output(member)

which should work on all systems unless the member is a load module, when it won't work


I goofed. It should be -

REPRO INDATASET(...) OUTDATASET(...)

There are acceptable abbreviations for INDATASET and OUTDATASET.

I did try copying a load module, something I never did before. Unless the issue has been corrected in the last 10 years or so, IDCAMS screwed up big time, and that has other implications.

IDCAMS did not copy the directory user data. Without the user data, the member is not a load module and cannot be used as a load module. You can load the member into the Binder. It will complain and you lose some functionality, but the basic data within the load module will be usable.

After I discovered REPRO did not copy the directory user data for a load module I decided to try it with a member that has ISPF directory stats. Sure enough it did not copy the ISPF directory stats.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Apr 21, 2015 12:35 pm
Reply with quote

Well, IBM created IEBCOPY and saw that it was good.

Or was there maybe another reason, I don't see?
Back to top
View user's profile Send private message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 53
Location: Chennai

PostPosted: Fri Apr 24, 2015 12:14 pm
Reply with quote

Using IEBCOPY you can copy members from PDS to PDS as well as it will Compress the unused Tracks and Cylinders of the output PDS to avoid space issues.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
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 Facing ABM3 issue! CICS 3
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
Search our Forums:

Back to Top