When you submit code or a catalog entry from the Enhanced Editor, the filename or catalog entry name and their respective folders are placed in these environment variables:
contains the full path of the submitted program or catalog entry. The full path includes the folder and the filename.
contains only the name of the submitted program or the catalog entry name.
You can then extract the filename and full path for use in your SAS programs.
After the following DATA step runs and the data is sorted, the PRINT procedure includes the filename in the title and the full path in the footnote of the procedure output. The results are shown below as a Screen Shot
Here’s a simple SAS Macro to delete a SAS dataset…It takes the name of the SAS dataset as the parameter…
Common Programming Mistake with Proc Sort NODUPRECS
SAS Code Examples SAS STAT Examples SAS Macros SAS Library What statistical analysis should I use? SAS Textbook Examples David Franklin’s Examples
The PRINTTO procedure defines destinations for SAS procedure output and for the SAS log. By default, SAS procedure output and the SAS log are routed to the default procedure output file and the default SAS log file for your method of operation. See Default Destinations for SAS Log and Procedure Output. You can store the […]