[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Flat file creation problem
- Subject: Re: Flat file creation problem
- From: "Korbel, Gordon E." <GEKORBEL@NORSTAN.COM>
- Date: Fri, 4 Jun 1999 14:22:36 -0500
Two ideas:
1) Open 'C:\temp\file.out' as 1 for writing record=1043:FIXED
or 2)
let #x =length($output_buff)
while #x < 1043
let $output_buff = $output_buff || ' '
let #x =length($output_buff)
end-while
One or both of these should give you what you want.
I may be slightly off in some of the syntax -- faulty wiring in the head on
Fridays.
-Gordon
-----Original Message-----
From: Bruce Weinstein [mailto:bruceweinstein@CANADA.COM]
Sent: Friday, June 04, 1999 1:54 PM
To: Multiple recipients of list SQR-USERS
Subject: Flat file creation problem
Does anyone know how to insure that records created in a .lis file
from an SQR is of a certain length? Because the last field being
written out to the .lis file is a description, the record lengths in
the .lis file vary depending on the length of the description.
I can insure the record lengths by "opening" a file in the SQR and
"writing" to this file, but I need it to work via the .lis route using
the print command. The command I'm using is as follows
"print $output_buff (1,1,1043)"
If $output_buff is 10 characters then the record length is 10
If $output_buff is 500 characters then the record length is 500
----------------------------------------
Bruce Weinstein
E-mail: bruceweinstein@canada.com