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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.