Dear,
I am using below pgm to convert xpt files in folder to sas data sets. I am getting syntax error. XPT datasets are in rt1 folder. The output sas datasets will go rt2 folder in my pgm.
filename tmp pipe "dir /b ""abc/programs/qc/archive/rt1/*.xpt""";
libname ms "abc/programs/qc/archive/rt2";
data _null_;
infile tmp;
input;
call execute(cats('filename xptfile "abc/programs/qc/archive/rt1/', _input_'"));
call execute('proc copy inlib=xptfile outlib=ms; run;');
call execute('filename xptfile clear;');
run;
Please suggest. Thank you
Show the sas log, with reprinted sas statements, and SAS notes and messages regarding your question.
Check you quotes for unbalanced quotes. Just looking at the code as posted on the forum shows that the quotes aren't balanced because of the color the code text displays. The first Call execute is not closed properly.
@knveraraju91 wrote:
Dear,
I am using below pgm to convert xpt files in folder to sas data sets. I am getting syntax error. XPT datasets are in rt1 folder. The output sas datasets will go rt2 folder in my pgm.
filename tmp pipe "dir /b ""abc/programs/qc/archive/rt1/*.xpt"""; libname ms "abc/programs/qc/archive/rt2"; data _null_; infile tmp; input; call execute(cats('filename xptfile "abc/programs/qc/archive/rt1/', _input_'")); call execute('proc copy inlib=xptfile outlib=ms; run;'); call execute('filename xptfile clear;'); run;
Please suggest. Thank you
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 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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: