Date: Wed, 22 Feb 2012 17:28:10 -0500
Reply-To: Peter Crawford <Peter.Crawford@BLUEYONDER.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Crawford <Peter.Crawford@BLUEYONDER.CO.UK>
Subject: Re: ALTLOG functionality for multiple SAS sessions
On Wed, 22 Feb 2012 13:24:33 -0500, Scott Murff
>I am using SAS 9.2 in a Windows environment and am trying to solve the
>problem of having my log printed to both the log window within SAS and an
>external file simeltaneously.
>This problem can be solved in a single SAS session by using the ALTLOG
>option in a config file. I would like to take it one step further
>however. I often have multiple SAS sessions open concurrently and would
>like to have the log from each session printed within SAS as well as a
>separate external file for each SAS session. One way to do this would be
>to create separate SAS shortcuts, each with a different ALTLOG
>destination, and launch each successive SAS session from a different
>I am looking for a solution that avoids this work around and that would
>allow me to open multiple SAS sessions from the same shortcut and
>dynamically update where the external log file is written for each
>Any help would be greatly appreciated!
have you looked at the invocation options
doc for these options in SAS9.2 appear at
These option values should provide a "time-stamped" altlog file (in
your "MY SAS Files" folder. That #p adds the process id to the name
ensuring that you succeed in starting two sessions within the same second,
their unique process IDs will distinguish the altlogs.
These # features will be supported for ALTLOG when you invode SAS for
DisplayManager, but not when SAS is invoked "in batch" (or when EG invokes
SAS). In "batch mode" these # flags apply only in the LOG file name.