Dear All,
I would like to know how can I add a letter to the PUT statement below:
data _null_;
infile test ;
file '/sas/sasdata/FOLDER/FILE.txt';
input;
/*Here I need to add the letter D + the content so it would be like PUT 'D' || _infile_; but it doenst work */
put _infile_;
run;
I believe it is pretty basic put I'm struggling to find a solution.
Add the _infile_ option to the INFILE statement so you have a variable to manipulate:
infile test _infile_=tvar;
Then
tvar='D'||tvar;
put tvar;
Replace : PUT 'D' || _infile_; with put 'D' _infile_;
Haikuo
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.