Hi,
I need to replace a string in the PDS member ,string which i need to change in each pds member are present in the seperate PS.
Example;
PDS:'xo94,sas,'
member names are:
SRGM2001
SRGM2002
SRGM2003
PS file:
Below are the dat present int hePS file
Membername String which want to replace in member
SRGM2001 SRGM2005
SRGM2002 SRGM2006
SRGM2003 SRGM2007
I want to read the SRGM2001 from the PS file and need to search in the PDS file if found i want to open that member
and need to search 2005 if present i need to replace with 2001 similarly for remaining members .
Could you please help me to achieve this
Thanks,
Siva.
Hi,
I didn't get any reply for my above requirement for three days which helped me to found the solution by my own.
Filevar statement and TRANWRD statement satisifed my requirement.
Please find the code as below
filename yy'xo94.store';
filename xx'xo94.sas.modelid';
data ss;
infile xx;
input store $;
length ftrw $50;
ftrw ='xo94.control.parm('||trim(store)||')';
infile dummy filevar=ftrw sharebuffers end=done;
FILE DUMMY FILEVAR=FTRW;
do until(done);
input @1 sss $80.;
%INCLUDE YY; //Which contains TRANWRD stements
put sss;
end;
run;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.