[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Beginner's question
hi Romaella,
in sqr when you specify a lenght of numeric, it is in term of byte and
not digit to display.
#I:1 is an interger coded in one byte.
#I:4 is an integer coded in 4 bytes
if you want to display you value in term of digit (999999), convert your
numeric in caracter using edit.
digit is not byte, i seems you have done a mistake in reading the
documentation of the open statement ( option fixed).
Franck,
Romaella, Robbi wrote:
>
> Hello everyone,
> I will apologize for the simplicity of this question up front as I
> am new to SQR.
> I would appreciate any help and tolerance you can afford a beginner.
>
> I am writing to a predefined flat file of fixed length. One of the fields is
> a calculated field defined as 999999v99.
> I am currently using the form:
>
> Write 1 from $Field1:8 $Field2:10 $Fiedl3:10...............
>
> When I add the numeric field #Field4 in the sequence above it will not
> let me use the length assignment (#Field4:8 )
> The error says that the numeric variable must have :length of 1, 2 or 4
> bytes.
> Realizing the decimal is only implied, how do I get the fixed field
> definition I need?
>
> I thought about moving the numeric variable to a character field, but in the
> above form I did
> not know how to right justify the field.
>
> Robbi Anne Romaella
> SCT Corporation
> rromaella@nespower.com
> (615) 747-3078