[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: How do I set dynamic filename



I don't know what platform, or database, or versions of software you have,
but you could try using a variable
instead of a literal for your open statement.

eg/  instead of

     open 'c:\myfile.txt' as {out}

        try using

     let $outfile1 = 'c:\'
     let $outfile2 = $date     --(some variable holding the current date in
the format you choose)
     let $outfile3 = '_myfile.txt'

     let $outfile = $outfile1 + $outfile2 + $outfile3
     open $outfile as {out}


good luck.




Dominick Logiudice <dlogiudice@PINE.VPCC.SUNYSB.EDU> on 12/03/98 11:28:34
AM

Please respond to SQR-USERS@USA.NET

To:   Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
cc:    (bcc: Richard McCutcheon/HCM/AM/HONDA)
Subject:  How do I set dynamic filename




I want make a file name unique for each run. Right now I do
this
OPEN 'C:\PS\Sqr\ERRFILES\PYMST_COMPERR.txt' AS {out}
I would like to change this to
  120398_PYMST_COMPERR.txt  have the date or something
in there so I don't overlay a previous error file.
Thanks