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: Bill Klein
Subject: RE: [open-cobol-list] Re: Redefines question
Date: Sat May 7 10:41:56 2005

Micro Focus does allow it.  I don't know about Unisys.  IBM definitely does
NOT allow it (and never has - that I know of).  See (for example)

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR20/5.3.12 

"If the data item referenced by data-name-2 is either declared to be an
external data record or is specified with a level-number other than 01, the
number of character positions it contains must be greater than or equal to
the number of character positions in the data item referenced by the subject
of this entry. If the data-name referenced by data-name-2 is specified with
a level-number of 01 and is not declared to be an external data record,
there is no such constraint."

Is the Unisys LRM online?  Can you find where it allow it?  

(Micro Focus CLEARLY documents this as an extension - and flags it when
FLAGSTD or FLAG(ANSI) is specified). 

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On 
> Behalf Of Ron Norman
> Sent: Saturday, May 07, 2005 8:51 AM
> To: Roger While; Bill Klein
> Cc: address@hidden
> Subject: RE: [open-cobol-list] Re: Redefines question
> 
> 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
> 
> 
> -------------------------------------------------------
> 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 
> _______________________________________________
> 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]