Line by line.
The File Statement specifies the output file for the Put Statements to come.
file ”&G_IFC_PATH/DATA/WDATA/cmsdate.txt”;
This seems to put the &acdt macro variable into some desired format (I can't see &acdt).
cmsdate=put(compress(put(&acdt,yymmdd10.),’-’),8.):
This Put Statement puts the value of cmsdate in the first column in the file you specified in the File Statement.
put @1 cmsdate $8.;
I recommend to review the documentasion first.
> What does this do? Since no output dataset or temp dataset saved, does it changing the content of txt file?
The text file is rewritten because it is put into the file specified in the file statement.
> Does variable cmsdate still exist in the system after this program is run?
No dataset is generated, so no variables exist.
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.