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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.