LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2012, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Scott Murff <scott.murff@OCC.TREAS.GOV>

On Wed, 22 Feb 2012 13:24:33 -0500, Scott Murff <scott.murff@OCC.TREAS.GOV> wrote:

>Hi SAS-L, > >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 >shortcut. > >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 session. > >Any help would be greatly appreciated! > >Thanks, > >Scott

Scott have you looked at the invocation options -LOGPARM "rollover=session" -ALTLOG "!mySASfiles\altlog#d#b#Y.#H#M#s.#p.log"

doc for these options in SAS9.2 appear at http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewe r.htm#a002303556.htm

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.

good luck peterC


Back to: Top of message | Previous page | Main SAS-L page