LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2004, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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?
Comments: To: Zax Data Systems <Zack.Haynes@BRISTOLWEST.COM>

Hi Zack,

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.

Good luck.

Regards - Jim.

On Fri, 29 Oct 2004 17:17:07 -0400, Zack Haynes <Zack.Haynes@BRISTOLWEST.COM> wrote:

>Dear SAS-L; > >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. > >YourSas.bat: >SasBatch -sysparm? 'YourSas.sas' > >SasBatch: >Data _null_ rundate=date() runtime=time() >call symputs for rundate runtime sysparm >%sysexec c:\sas\sas.exe &sysparm >-log &sysparm..&rundate..&runtime >-lst &sysparm..&rundate..&runtime >Result: YourSas.sas.041029.171323.log/lst > >-- >Zac Haynes, Systems & Applications Programmer, 714-404-8840. >ISPF Dialog, REXX, Scripts, SAS, Endevor, DB2, SQL, & Macro. > > >-----Original Message----- >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of >Peter Crawford >Sent: Friday, October 29, 2004 3:51 PM >To: SAS-L@LISTSERV.UGA.EDU >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 >Peter Crawford >On Thu, 28 Oct 2004 13:06:32 +0100, Jones Martyn ><Martyn.Jones@UK.FUJITSU.COM> wrote: > >>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 >>D:\Data\SASFiles\V8\batchautoexec.sas -sysin >>D:\Data\SASFiles\V8\setbatchdailylog.sas" >> >>Where setbatchdailylog.sas is .... >> >>data _null_; >> file 'd:/data/sasfiles/v8/batchdaily.bat'; >> format date date9. datec $9.; >> date=today(); >> datec=put(date,date9.); >> 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' >> ||substr(datec,6,4)||substr(datec,3,3) >> ||substr(datec,1,2)||'.log'; >> put saslit autolit sysinlit loglit; >>run; >> >>And subsequently schedule 'd:/data/sasfiles/v8/batchdaily.bat'.... >> >>Martyn >>-----Original Message----- >>From: Scott [mailto:usenet739_yahoo_com_au@CRONKITE.CC.UGA.EDU] >>Sent: 28 October 2004 12:36 >>To: SAS-L@LISTSERV.UGA.EDU >>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 >that >>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 >>news:9EED2986E756964BB16FBE23CB68948D0815D6C1@fldavex01.bristolwest.com... >>> 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 >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 >>> delivering >>> 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 >>> recipient >>> 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 >>> use. > > 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 delivering >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 recipient >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 >use.


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