[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 have to do something similiar for a client.  Try using variables.
Example:

Unstring $journal_date by '-' into $year $month $day

     Let $journal_dt = $year||$month||$day

     Let $path = 'c:\ps\sqr\'

     Let $file_name = $journal_dt||'.txt'

     Let $file = $path||$file_name

     If $first_file = 'Y'                !set to Y once
          Close 1
     end-if

     OPEN $file AS 1
     FOR-WRITING
     RECORD=95:FIXED
     STATUS=#Open1
     If #Open1 = -1
          STOP QUIET
     End-if

This is just one way....hope it helps.

To:       Multiple recipients of list SQR-USERS <SQR-USERS @ list.iex.net>
cc:        (bcc: Banessa Mosley/Bit)
From:     Dominick Logiudice <dlogiudice @ PINE.VPCC.SUNYSB.EDU>
Date:     12/03/98 04:28:34 PM GMT
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