Date: Sat, 30 Oct 2004 17:46:26 -0400
Reply-To: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Subject: Re: What do you change to have a unique/numbered LOG/LST name?
The solution I sent you (with an amandment) comes close to what you want.
If you just install (put) the files at their locations, all you have to do
to start your batch SAs program is to enter from a dos window:
SASstamp <<your SAS program>>
to get datime-stamped output and log files.
You could also create a shortcut (PIF) for SAS stamp:
[drive:][\subdirectory]SASstamp %1 %2 %3 %4 %5 %6 %7 %8 %9
to drag and drop your SAS program on (I think, I use the command line).
Or do you work interactively with SAS and want to start you batch program
from there? I would have to think of the changes to perform, but you might
invent them yourself as well.
Regards - Jim.
On Fri, 29 Oct 2004 17:17:07 -0400, Zack Haynes
>Thanks to all for input on unique Log/Lst names. I would have
>done the same as you've suggested with REXX or Script but a more
>automatic SAS solution is required. Here is what I was hoping
>to have as the required solution in a pseudo code, (not working)
>where the SAS program is written and a batch file is used to
>execute a SAS in batch which invokes your SAS program with the
>Log/Lst options. You then only need to copy the batch model
>YourSas.bat & change the SAS program name within it. Is it Ok
>to call SAS within a SAS in this way? If so, what is the best
>way to pass along 'YourSas.sas' program names? Thanks.
>SasBatch -sysparm? 'YourSas.sas'
>Data _null_ rundate=date() runtime=time()
>call symputs for rundate runtime sysparm
>%sysexec c:\sas\sas.exe &sysparm
>Zac Haynes, Systems & Applications Programmer, 714-404-8840.
>ISPF Dialog, REXX, Scripts, SAS, Endevor, DB2, SQL, & Macro.
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
>Sent: Friday, October 29, 2004 3:51 PM
>Subject: Re: What do you change to have a unique/numbered LOG/LST name?
>I've been using sas to do this for my display manager sessions on win
>playforms for >10 years !
>Techniques have become simpler over the years
>Last posted as %upalts, I expect you'll find it in the archives
>On Thu, 28 Oct 2004 13:06:32 +0100, Jones Martyn
>>Why learn PERL when you've already got SAS? Execute SAS to build the bat
>>file to do what you want....
>>Schedule a .bat file containing....
>>"c:\Program Files\SAS Institute\SAS\V8\sas.exe" -autoexec
>>Where setbatchdailylog.sas is ....
>> file 'd:/data/sasfiles/v8/batchdaily.bat';
>> format date date9. datec $9.;
>> saslit='"c:\Program Files\SAS Institute\SAS\V8\sas.exe"';
>> autolit=' -autoexec D:\Data\SASFiles\V8\batchautoexec.sas';
>> sysinlit='-sysin D:\Data\SASFiles\V8\batchdaily.sas';
>> loglit='-log ' || 'D:\Data\SASFiles\V8\batchdaily'
>> put saslit autolit sysinlit loglit;
>>And subsequently schedule 'd:/data/sasfiles/v8/batchdaily.bat'....
>>From: Scott [mailto:usenet739_yahoo_com_au@CRONKITE.CC.UGA.EDU]
>>Sent: 28 October 2004 12:36
>>Subject: Re: What do you change to have a unique/numbered LOG/LST name?
>>If it were me, I'd give up on Windows' brain dead command interpretter,
>>install ActiveState PERL (free), pre-calculate the timestamp in the PERL
>>script, and invoke SAS with the -log and -print options. If this would be
>>an option for you, let me know and I can send you a sample PERL script
>>does exactly what you want.
>>You can get PERL from http://www.activestate.com/Products/ActivePerl/
>>"Zack Haynes" <Zack.Haynes@BRISTOLWEST.COM> wrote in message
>>> Dear SAS-L;
>>> What setup changes are needed to allow Win SAS
>>> to create a unique .LOG and .LST file name for
>>> the invoked SAS program. For example, a batch
>>> file contains this command:
>>> c:\sas\sas.exe c:\vssdev\saspgm1.sas
>>> When above is executed SAS may create the following:
>>> SASPGM1.LOG SASPGM1.LST
>>> What I'd like to have:
>>> SASPGM1.041020.132534.LOG SASPGM1.041020.132534.LST
>>> Is this possible? We are using Win SAS 8.2. Thanks.
>>> Zac Haynes, Systems & Applications Programmer, 714-404-8840.
>>> ISPF Dialog, REXX, Scripts, SAS, Endevor, DB2, SQL, & Macro.
>>> NOTE: THIS IS A CONFIDENTIAL COMMUNICATION. This transmission is
>>> only for the use of the individuals or entity to which it is addressed.
>>> you are not the intended recipient, or the person responsible for
>>> the message to the intended recipient, please return or delete it
>>> immediately. Although this e-mail and any attachments are believed to be
>>> free of any virus or other defect, it is the responsibility of the
>>> to ensure that it is virus free and no responsibility is accepted by us
>>> any loss or damage arising in any way from its unauthorized modification
> NOTE: THIS IS A CONFIDENTIAL COMMUNICATION. This transmission is intended
>only for the use of the individuals or entity to which it is addressed. If
>you are not the intended recipient, or the person responsible for
>the message to the intended recipient, please return or delete it
>immediately. Although this e-mail and any attachments are believed to be
>free of any virus or other defect, it is the responsibility of the
>to ensure that it is virus free and no responsibility is accepted by us for
>any loss or damage arising in any way from its unauthorized modification or