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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
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.
Ready to level-up your skills? Choose your own adventure.