DATA Step, Macro, Functions and more

To copy the data from one member of the pds to the other

Reply
Contributor
Posts: 38

To copy the data from one member of the pds to the other

In a file 'xo94.inputs' there are two variables userid and the modelid as beow

Userid's modelid's
Srgm2001 Srgm2345
Srgm2005 Srgm2678
Srgm3009 Srgm6997

There is a PDS 'xo94.control.userview' where all the above mentioned userid's will be there as a member.
I need to copy all the content of usrid srgm2001 from 'xo94.control.userview'
to the file 'xo94.control.userview1' as a member srgm2345.
where the new member Srgm2345 should be create as a new member in the file'xo94.control.userview1'and once the content are copied to the newly created member i need to replace all 2001 to 2345 inside the member Srgm2345.
similarly as a loop i need to copy for all members in the 'xo94.inputs'
Could you please help me how to achieve this .If possible can you proivide me the code for this..
Super Contributor
Super Contributor
Posts: 3,174

Re: To copy the data from one member of the pds to the other

You can use a combination of PROC PDSCOPY and PROC PDS to complete this task. Or you may want to consider a DATA step approach to read/write each of your members, as needed.

The SAS companion document for z/OS MVS can be found at the SAS support http://support.sas.com/ website, using the SEARCH facility or an Internet search.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search arguments, this topic / post:
proc pdscopy pds site:sas.com

data step "pds member" +copy site:sas.com

Additional SAS support site's code sample (from the search above):

http://support.sas.com/kb/24/701.html

http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#mvs-accexf-writin...
Contributor
Posts: 38

Re: To copy the data from one member of the pds to the other

Could you please provide me sample code so that it will be more helpful for me..
Ask a Question
Discussion stats
  • 2 replies
  • 208 views
  • 0 likes
  • 2 in conversation