DATA Step, Macro, Functions and more

I jst need add a new note in the SAS initial Log file.

Reply
Occasional Contributor Uli
Occasional Contributor
Posts: 8

I jst need add a new note in the SAS initial Log file.

Hi ,

Can you please help me.

I just want to add a new note in the SAS log file like:

Note: The program is running on " SAS PROD" server.

After the following notes
NOTE: Copyright (c) 2002-2008 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.2

SO that when the user runs the log file , he can see which server he is running.


Thanks in Advance.

Best Regards
SAS Employee
Posts: 13

Re: I jst need add a new note in the SAS initial Log file.

try adding your message to autoexec.sas
if the file does not exists create the one in the same path where sas.exe resides
e.g. -
%put The Program is running on SAS PROD Server ;
Valued Guide
Posts: 2,175

Re: I jst need add a new note in the SAS initial Log file.

try system options LogNote1 and 2 which appears at the end)
Super Contributor
Super Contributor
Posts: 3,174

Re: I jst need add a new note in the SAS initial Log file.

Check out using AUTOEXEC (with some "init" code) to probe your running-OS attributes, and possibly also NEWS for a static message displayed in the start of the log. Suggest you review the SAS companion document for your OS, as well as searching the SAS support website for supplemental technical / conference reference material on this topic.

Scott Barry
SBBWorks, Inc.
Valued Guide
Posts: 2,175

Re: I jst need add a new note in the SAS initial Log file.

submitted incomplete response ,

LOGnote1 provides a replacement for "The SAS System" title line that appears in the log file of batch SAS runs.

LogNote2 provides a trailer message in the log

because I work with a mixture of config files, it is easy to "inherit" these batch options from the "current folder" in which SAS starts.

a useful alternative might be the -NEWS option
it refers to a file that will be echo-ed into the SAS log as this demo indicates[pre]NOTE: SAS 9.1.3 Service Pack 4

news about your sas environments


NOTE: SAS initialization used:[/pre]
Ask a Question
Discussion stats
  • 4 replies
  • 242 views
  • 0 likes
  • 4 in conversation