Date: Wed, 7 May 1997 12:36:00 EST
Reply-To: "James, Stephen P." <spj1@CIPCOD1.EM.CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "James, Stephen P." <spj1@CIPCOD1.EM.CDC.GOV>
Subject: Saving SAS log from program
David Alderton wrote...
"Folks, occasionally I have some fairly large jobs to run (that take 3-8
hours) and would like to start them as I walk out the door. For security
reasons everyone is logged out by the system at some odd (but late) time
which means I lose the SAS log and/or the printed output from a job. I can
request and receive an exception to the policy which gets me around the
problem. However, I know that I can issue a DM command from a SAS job
(e.g., 'DM clear log') but was unable to figure out how save the log and/or
output. Ideally, I would like to run the job, save the log, save any
output, then terminate SAS to clean up the temp files. Any suggestions?"
dm 'log;file "longjob.log" ';
dm 'output;file "longjob.out" ' ;
dm 'bye' ;
If the files already exist, you'll want to put an 'R' following the file
name so that it will automatically replace the file without stopping to ask
you if it's OK (e.g. dm 'log; file "longjob.log" r ' ;).