…..I cleared log and use proc printto to save log, but log start from line 4109? how to make it start from line 1?
don't know how to reset number after each run. thanks.
dm output 'clear';
dm log 'clear';
proc delete data=work._all_;
run;
proc printto log='L:\ acct.log' new;
run;
NOTE: PROCEDURE PRINTTO used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
4109
4110
4111 ****************************************************************************
4112 Filename
You can try using the RESETLINE statement.
But note that you now be generating SAS logs that are lying to you about what has happened. Reseting the line numbering does NOT change all of the other settings, datasets, filenames, libnames, etc that the pervious 4000 lines of code have generated.
Clearing the log does not reset the line numbers to 1. So maybe you don't need the line numbers reset to 1.
If you want everything saved from line 1, you want to use PROC PRINTTO as the first line of your program — or use the ALTLOG option when you invoke SAS.
I don't have any config file, and I searched online, find an example,
-altlog L:\acct.log
this command is not working. don't know how to use it.
I put in fist line of my program. but before I run my program, I had to run some macro to setup path, call macro programs, that is the 4000 line before my program log.
You can try using the RESETLINE statement.
But note that you now be generating SAS logs that are lying to you about what has happened. Reseting the line numbering does NOT change all of the other settings, datasets, filenames, libnames, etc that the pervious 4000 lines of code have generated.
well, I believe altlog is what I looking for, but not sure how to use altlog.
so I will use resetline for now. thanks all.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.