DATA Step, Macro, Functions and more

SAS program name that created the SAS data set

Accepted Solution Solved
Reply
Super Contributor
Posts: 271
Accepted Solution

SAS program name that created the SAS data set

This migt be little bit strange question. I wonder is there any way we could relate SAS data set to program it created (which SAS data set was created by which program? The reason I am asking I have so many permanent sas data sets and I want to which sas program created the respective data sets.


Accepted Solutions
Solution
‎12-14-2015 02:57 PM
Super User
Posts: 11,343

Re: SAS program name that created the SAS data set

Posted in reply to SAS_inquisitive

If the program is saved before it is executed you can use the sas automatic variable to put a label on the data set with that information:

 

data mydata (label="%sysget(SAS_EXECFILEPATH)");

/* other code*/

run;

 

After creation likely not very easy. The sas Source program has to be saved before use though.

View solution in original post


All Replies
Solution
‎12-14-2015 02:57 PM
Super User
Posts: 11,343

Re: SAS program name that created the SAS data set

Posted in reply to SAS_inquisitive

If the program is saved before it is executed you can use the sas automatic variable to put a label on the data set with that information:

 

data mydata (label="%sysget(SAS_EXECFILEPATH)");

/* other code*/

run;

 

After creation likely not very easy. The sas Source program has to be saved before use though.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 151 views
  • 0 likes
  • 2 in conversation