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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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