07-18-2015 08:14 PM
My log files (log1.log, ........, logn.log) are created and saved in a folder : fold
I have a data :its name is filJ and I know the date of creation .
I want to get sas log that we can see the creation of data : filJ
07-19-2015 05:03 AM
Thank you that's right
but the problem is that , if i use "grep -n 'The data set .*\.TOTO has' *.log" I can have so many log files contains : 'The data set .*\.TOTO has'
but the difference beteween them : the date of creation .
in folder, I will have
data name date of creation
My idea is to keep the file name (dnj, j=1....n) and the date of the creation and check in the files log, if I can have the file (ex: data=dn1 and date of creation=
An other means, can we have usually in the file log " the name of the file associated with the date of creation" ? or an other information indicates that the history of the creation of file dnj is in log file logj.log ?
like this : ?
The data set ....TOTO has......
07-19-2015 09:34 AM
Read the names and last mod dates into a file. There are many postings on this site for how to do that. Or you might be able to just read the first line of each log file and find the date it started on the top.
Use the grep to find the list of files that have an indication of writing to the file of interest. Trouble with this is that unless you use consistent LIBREFs across the programs (or there is only one TOTO dataset on your system) you might need to do more searching to tell if the note is referring to the version of TOTO that you are looking for.
Then merge the two lists and take the one with the latest date (or latest date that is reasonable given the modified date on the TOTO dataset).
07-19-2015 12:26 PM
Thank you for your message.
If I understand well, I can use "the time of log starting on the top." but the time of log starting can be different from the time of creation of TOTO
my log can started at 11OCT2011:13:59:13 and create the toto data at 11OCT2011:14:07:13.
I will be intersted to know, if in all log files, when sas write in log : The data set TOTO has ... it will write after the date of creation :
Note : The data set TOTO has ...
Created 11OCT2011:14:07:13 ?
07-19-2015 01:31 PM
NOTE: The file library TEST is:
Owner Name=root,Group Name=root,
Last Modified=19 juli 2015 19:45:51 uur
Version and NLS differences aside that Created and Last modified
07-19-2015 04:14 AM
"Log files are not saved automatically" Correct, to be more precise.
- EG will get the log information and only when saved it will be stored inside that EGP project otherwhise it will get lost.
- The classic DM usage will redirect the sas-log to your screen and it will be lost after closing when not explicitly saved
- the batch processing will save a log (and list/print) at locations defined by that batch script.
There is whole logging frame-work that is part of the installation/configuration, ask your IT staff. SAS(R) 9.4 Interface to Application Response Measurement (ARM): Reference. This is also the basics used for APM (audit performance measurement) that has been deprecreated with the Eventmanager and all using this ARM source. Your question seems to be on some audit question.
07-19-2015 09:43 AM
The grep command is an Unix command I suppose your are running Eguide wit a server-based Unix version.
The creation date (and modification) are attributes of a sas-datasets (proc contents). When you have a place where are log-files are stored you could make a directory listing having the date (closing date/time of the sas process. By that limiting that in a window. If you know the owner and that one is unique not shared IT will have another subsetting. Still a lot of work wher APM / eventmanager are meant to do that.
If you are on a project where:
a/ it is important to have those answers who has done what and when.
b/ The code is managed by release management tested and validated before real usage.
You could implement your own logging into that. This user has: done... program .... action .... at ....
By that approach it will become part of your applications and adding those controls to it.
07-19-2015 03:38 PM
Your log example is dared as of Oct 2011. That is 4 years old and their should be new versions in place with pssuble slight differences. With that old dates it more research on an old case.
Your dates are English formatted that one of mine in my own national language.
I replaced a dataset that already did exist. The note is noting that. Would I have deleted it first it must be a created note. That surprises me as the datastep always create all data as new. Using a modify statement would cause an update in place.
07-19-2015 04:42 PM
@jaap: you're right. I should have to say " the time of last modification" and not" the time of creation"
But in my case there is no modification, there is only a creation, that's why I have used the word: creation.
To resume for the others: I have a data file. I know the name of my data file(toto ) and the date of creation of data toto.
I want to keep the log file who contains the history of the creation of my data file : toto ( all my sas log files are saved in folder : FL)
In folde : FL2011/ toto, time of creation =11OCT2011:14:07:13
In folde : FL2014/ toto, time of creation =11OCT2014:11:07:13