View previous topic :: View next topic
|
Author |
Message |
Senthilkumar k Warnings : 1 New User
Joined: 07 May 2009 Posts: 51 Location: Chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
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 |
|
|
Senthilkumar k Warnings : 1 New User
Joined: 07 May 2009 Posts: 51 Location: Chennai
|
|
|
|
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 |
|
|
Senthilkumar k Warnings : 1 New User
Joined: 07 May 2009 Posts: 51 Location: Chennai
|
|
|
|
Thanks guys. I have used SMCOPY which worked. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
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 |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
Senthilkumar k Warnings : 1 New User
Joined: 07 May 2009 Posts: 51 Location: Chennai
|
|
|
|
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 |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
@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 |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Well, IBM created IEBCOPY and saw that it was good.
Or was there maybe another reason, I don't see? |
|
Back to top |
|
|
Ramsee
New User
Joined: 06 Jan 2011 Posts: 53 Location: Chennai
|
|
|
|
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 |
|
|
|