09-10-2014 05:06 PM
I am looking for a table originally created in sas code. I can find out where it is used but not able to find where it is created. Can someone let me know is there any way i can find out where this data set originally created.
09-10-2014 05:14 PM
I'm not sure what you mean.
Are you looking for where the SAS dataset is created within a particular program or in general?
I think the only way is to search for the first instance of the dataset name in the programs. The issue is if a macro was used to create it then you won't be able to trace it back using any automated searches.
09-10-2014 05:19 PM
Actually, I am looking for data set which is created somewhere but dont know how to do backtrack. like where or in which sas code/program it was created. I am sure it was not created by macro.
09-10-2014 05:34 PM
One way at least in Windows 7, don't know about Windows 8:
Open Windows explorer
Navigate to the root of the drive you think the data may be on
In the search box type the name of the SAS dataset without the library name and with an extension of sas7bdat.
However, if you are looking at code and there is not a library associated with the variable there is a strong likelihood that the dataset was written to a temporary WORK library and would not exist after the session of SAS that created is was closed. If it likely to be in the current WORK library then you can get the path to that by executing:
and then looking in the log for the folder location of the current work library.
09-10-2014 05:40 PM
I am sorry I guess i am not able to frame my question correctly.
Data set has associated library. I am able to see that data set in that library. But looking for SAS code where that data set is created.
09-10-2014 05:42 PM
SAS programs are text files. The windows search can be set up to search for that word in the .sas (SAS Programs) files.
09-10-2014 06:05 PM
No, then you need to search the server and use whatever tools Unix or Windows has there.
In a situation like this its probably easier to ask a colleague or a supervisor for help.
EDIT: or look for documentation that might point you in the right direction.
09-10-2014 07:27 PM
Well that was like pulling teeth.
Try asking whomever runs the jobs or look for documentation or try searching the metadata: