BookmarkSubscribeRSS Feed
Sivanandam
Calcite | Level 5
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..
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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...
Sivanandam
Calcite | Level 5
Could you please provide me sample code so that it will be more helpful for me..

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1572 views
  • 0 likes
  • 2 in conversation