[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Beginner's question
I've the same question for flat file and am interested by fast module to convert
packed numeric fields used under OS/390. This module have to be called directly
from SQR
with minimum impact, been included in the motor without SQR Server been
recompiled
or linked again.
My boss is terrified by SQR nasty looking performance when sqr routine called to
'depack' fields. SQR is at least ten or twenty slower than internal solution. My
preceding request for enhancement stayed without any answer, nerver accepted as
request to implement.
By other way, I'am fully interested by DB2 specialist contact to try
optimisation
of database access or SQL / SQR code optimisation, if exists.
Thank's by advance
Regards
Franck Masson wrote:
> 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