Help using Base SAS procedures

Identify the SAS program name from SAS dataset

Reply
Contributor
Posts: 22

Identify the SAS program name from SAS dataset

Hi to all,

Is there some SAS proc able to Identify the SAS program NAME(or path of the SAS Programm) from SAS dataset?

thanks!
Super Contributor
Super Contributor
Posts: 365

Re: Identify the SAS program name from SAS dataset

Hello Reone,

It is not clear from your post what do you mean. Is it possible to keep program names (and paths) in SAS dataset? The answer is yes, but is it what you need?

Sincerely,
SPR
Valued Guide
Posts: 2,177

Re: Identify the SAS program name from SAS dataset

Reone,
the answer to your question is NO
It would be possible, if the programmer of the process creating the data set, took the trouble to add that information to (the label of) the data sets created, but that seldom happens in my experience.

good luck
peterC
Respected Advisor
Posts: 3,799

Re: Identify the SAS program name from SAS dataset

Do you remember when SAS data sets had "HISTORY"?

It included the source data that created the data set. Which could be a data step but was usually PROC SORT. :-)
Super Contributor
Super Contributor
Posts: 3,174

Re: Identify the SAS program name from SAS dataset

Posted in reply to data_null__
While you are running SAS programs in "batch" from a "SYSIN" source (depends on your SAS session/environment though), consider that there is current-environment information available, if you wanted to do something with that. Your interest/purpose is unclear, based on your post -- so what would you with the info and when would you want to know about the "event"??

Mostly you will find info about the SYSIN option in the particular SAS companion guide for your Operating System.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:

batch program source sysin option site:sas.com
Valued Guide
Posts: 2,177

Re: Identify the SAS program name from SAS dataset

Posted in reply to data_null__
Ah, yes, aaaaah remember it well!
(almost a song)
And as you say, the final step in the history would be a sort
- but in an early release the last "n" steps were kept where that "n" was a history option which we set option history= 7 so the seven latest steps writing the table were available.
I guess it might need a very large header to keep enough versions for everyone!
Ask a Question
Discussion stats
  • 5 replies
  • 157 views
  • 0 likes
  • 5 in conversation