BWZ on character field

pickerij@norbord.com pickerij@norbord.com
Wed, 1 Apr 1998 17:04:28 -0500


Terry Pickering (no relation that I know of) asks ...

>I have the following element defined in a file:
>
>    Element:            PO-NUM
>    Type:               Character
>    Size:               10
>    Item Defaults:      CHARACTER Size 10
>
>Here is the code for a sample quick screen using that field. Note the   
BWZ
>is commented out.
>
>SCREEN GLS_EXE:DEMO1
>FILE GLS-INVOICE-MSTR-PEND
>FIELD PO-NUM OF GLS-INVOICE-MSTR-PEND       ;BWZ
>PROCEDURE PROCESS PO-NUM
>BEGIN
>  INFO = "PO-NUM:" + PO-NUM NOW RESPONSE
>END
>
>When the screen is run and you enter in a value of "700001", you get the
>following "info" displayed:
>
> PO-NUM:700001
>
>If you put a BWZ on the FIELD statement and run it again using the same
>input data, the "info" displayed is:
>
> PO-NUM:0000700001
>
>The manual says "You can use BWZ option for non-numeric fields. In such
>cases, QUICK treats the field as a numeric field and applies numeric   
edits".
>
>Does this imply it actually changes the field values in the buffers? It
>appears to from what I can see. I would have expected it to only apply
>"numeric edits", not actually change the values. Which then brings up   
the
>case, is it stored in FIELDTEXT or FIELDVALUE?

All is working as it should. Using any of the allowed field statement   
options which imply numeric data (such as NUMERIC, BWZ) will indicate to   
Quick that it should treat the field as numeric. It will change the value   
in fieldtext by right justifying and zerofilling it so if you consider   
fieldtext to be a "buffer" then, yes, Quick does change the value. It   
will also apply numeric edits to whatever the user enters -- e.g. it will   
disallow alphas in the field.

As to whether it is stored in FIELDTEXT or FIELDVALUE, I would rather you   
consider that it is in FIELDTEXT during the INPUT and OUTPUT procedures   
regardless of datatype and then use the actual item name in the EDIT   
procedure and let Quick do the mental exercise of substituting for the   
buffer. For the record, though, it is actually in FIELDTEXT since it is a   
character item.

Regards,
John "no relation that I know of" Pickering
JWP Systems Inc.
Toronto
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.