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 (November 1997, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 1 Nov 1997 09:59:42 -0800
Reply-To:     "kmself@ix.netcom.com" <kmself@ix.netcom.com>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Karsten M. Self" <kmself@IX.NETCOM.COM>
Organization: Self Analysis
Subject:      Re: Command Line Argument/Build A File Name
Comments: To: "irubin@erols.com" <irubin@erols.com>
Content-Type: text/plain; charset="us-ascii"

Your solution will vary by operating system. For Unix and PC environments, you can specify options following the invocation command:

sas -altlog myalternate.log

I have a Unix invocation script for interactive SAS sessions which uses the 'date' command to build a timestamped log. You may need to modify it for your own purposes and/or system:

-------------------< cut here >------------------- #!/bin/ksh # Interactive SAS Invocation script # Default/Initializations

# ...argument list (for SAS) arglist=$*

# ...date & time for logfile name datetime="`date +%C%y%m%d.%H%M%S`"

#------------------------------------------------------------ ## Main #------------------------------------------------------------

# Launch SAS ( $SASEXEC -altlog ~/sasuser/log.$datetime $arglist ) &

# Delete altlog files older than 30 days. Problems to /dev/null. ( find $HOME/sasuser \( -type d ! -name sasuser -prune \) \ -o \( -name log.\* -mtime +30 -print \) \ | xargs rm ) \ 2> /dev/null & -------------------< cut here >-------------------

On Saturday, November 01, 1997 12:43 PM, irubin [SMTP:irubin@erols.com] wrote: > Tom, > > I had a similar problem trying to set up an alternative log (ALTLOG > option) > with a name of the file reflecting the current date. I gave up on that > too > and had a few conversations with SAS tech support. The verdict is "NOT > POSSIBLE". > > Eric Rubin > > ---------- > > From: TomPBarry <tompbarry@AOL.COM> > > To: SAS-L@UGA.CC.UGA.EDU > > Subject: Command Line Argument/Build A File Name > > Date: Friday, October 31, 1997 7:19 PM > > > > I am wondering if there is a way to pass a value to a SAS routine from > > the command line as in: sas myprog 19970910 > > > > And if so, how can I use that value (19970920) to build an output > > file name as in: > > > > data temp; > > set outdata; > > file ?????; > > put d1 1-2 d2 3-4; > > run; > > > > where ????? is the file name : out19970920 > > > > I've spent hours on this and I give up!!! > > > > Tom

Karsten M. Self (kmself@ix.netcom.com)

What part of "gestalt" don't you understand? (Welchen Teil von "Gestalt" verstehen Sie nicht?)


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