[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Output file names
- Subject: Re: Output file names
- From: John Milardovic <milardj@SX.COM>
- Date: Wed, 25 Aug 1999 15:20:49 -0400
Sure use -F and access the argument using the $sqr-report var.
Ex. open $sqr-report as 1 etc.
Or just pass your desired file name (or a unique identifier) as a regular
parameter and use 'input' to pick it up.
Or use the SQR pid and tack it onto the end of the hardcoded file name.
Or use the SQR exists function to see if the file exists throw that in a
loop and keep testing until you have something unique
Eg
if $file exists
let #x=0
while #x < 9999999
let $file2 = $file || to_char(#x)
if $file2 does not exist
break
add 1 to #x
end-while
HTH
John Milardovic
> -----Original Message-----
> From: Todd Becker [SMTP:tbecker@CCCIS.COM]
> Sent: Wednesday, August 25, 1999 2:48 PM
> To: Multiple recipients of list SQR-USERS
> Subject: Output file names
>
> Is it possible to define a flat file name from the SQR command line? I
> know the -F can be used to rename the .lis file, but our goal is to create
> unique output file names before they are created.
>
> For example, User1 runs SQR fil_Report1 which produces a fixed length
> file
> named fil_Report1.dat. Concurrently, User2 runs SQR fil_Report1 which
> also
> produces a fixed length file named fil_Report1.dat. My question is, from
> the command line, can I define the output file name, such as fil_Report1_
> +
> varUserName + .dat?
>
> TIA,
>
> Todd Becker