gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [open-cobol-list] Re: Redefines question


From: Ron Norman
Subject: RE: [open-cobol-list] Re: Redefines question
Date: Sat May 7 06:52:11 2005

Just my two cents, but I do believe that the Micro Focus, Unisys (and
most likely IBM) COBOL compilers all allow REDEFINES at any level.
Each data item of the redefines would have its own size for MOVE and
Compare, etc, but that the storage reserved would be the longest of the
redefined data items. You also seldom get a warning and never an error
in doing this.

I have seen many old applications that do this sort of ting.

Cheers
Ron Norman

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of Roger
While
Sent: May 7, 2005 9:18 AM
To: Bill Klein
Cc: address@hidden
Subject: RE: [open-cobol-list] Re: Redefines question

Now thoroughly confused.
Here's 13.16.42.3 on page 337 - point 1 :
1) Storage association for the subject of the entry starts at the first
bit 
of the data item referenced by data-name-2
and continues over an area sufficient to contain the number of bits 
required by the data item referenced by the
subject of the entry. If the subject of the entry requires more bits
than 
the data item referenced by data-name-2,
the storage area allocated for the data item referenced by data-name-2
and 
the subject of the entry is the
number of bits required by the data item referenced by the subject of
the 
entry. The size used for references
to the data item referenced by data-name-2 is not changed.

Hmmm.
Clarification ?

Roger


>OK,
>   I have now found the actual '02 Standard rule.
>
>Page 336, SR(9),
>
>"9) The storage area required for the subject of the entry shall not be
>larger than the storage area required for the data item referenced by
>data-name-2, unless the data item referenced by data-name-2 has been
>specified with level number 1 and without the EXTERNAL clause."
>
>In other words, you can do a redefines of a smaller by a larger - but
ONLY
>when they are 01-levels (not EXTERNAL).  In other words, you need to 
>figure
>out the "maximum" storage allowed for all 01-levels; allocate that; and

>then
>do the redefines.
>
>   ***
>
>My other notes were thinking about subordinate items - where this is
(was)
>non-conforming.




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events,
4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list


reply via email to

[Prev in Thread] Current Thread [Next in Thread]