Subject: | |
From: | |
Reply To: | |
Date: | Sat, 12 Jul 1997 08:40:24 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
At 09:16 AM 7/11/97 -0800, you wrote:
>Gregory Stigers writes:
>
>>>> "Stigers, Gregory - ANDOVER" <[log in to unmask]> 07/11/97
>07:58am >>>
>I have someone claiming that you cannot use FILLER in a COBOL
>defintiion
>of a group, where the group is a numeric field (say 10I2 or 10J2) in an
>IMAGE record, because INITIALIZE will generate garbage that IMAGE
>can't
>handle. My understanding is that so long as the field's PIC is correct,
>you can call it FILLER, FILLERUP, FILLERDELPHIA, ANYTHINGYOUWANT,
>or
>even not give it a name (10 PIC S94 COMP-3).
>---------------------------------------------------------------------------
------
>Not so,
>Filler is a COBOL reserved word with a specific function to be an
>unnamed byte(s) holder. It is documented in the COBOL manual under
>the initialize verb that "elementary FILLER data items are not affected by
>the execution of INITIALIZE".
>
>If your buffer was as follows:
>
>01 DATA-REC.
> 03 FIELD-1 PIC X(10).
> 03 FIELD-2 PIC S9(4) COMP.
> 03 FIELD-3 PIC S9(10) COMP-3.
> 03 FIELD-4 PIC S9(6).
> 03 FILLER PIC S9(9) COMP-3.
>
> INITIALIZE DATA-REC.
> CALL "DBPUT"
> USING BASE..... DATA-REC.
>
>The field FIELD-1 would have spaces, FIELD-2 thru FIELD-4 would have
>zero. However the end FILLER field would not be initialized, and would
>probably have binary zero or garbage.
One could always place a VALUE clause on the filler statement to
initialize/set it until there is a read/move to the area....
/jf
|
|
|