gnucobol-users
[Top][All Lists]
Advanced

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

RE: [open-cobol-list] Re: OC issues - number 7


From: Bill Klein
Subject: RE: [open-cobol-list] Re: OC issues - number 7
Date: Wed Jan 18 14:01:09 2006

Just so it is clear, when you place a COMP on a group item, it does NOT make
the group item COMP, only the items under it.  This is why the '02 Standard
introduced the new

  GROUP-USAGE  (BIT, NATIONAL)

clause.  This clause makes the group have the USAGE as well as sub-items.
There is no 
   GROUP-USAGE COMP

so you would need to code a REDEFINES to treat the group item as COMP. 

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On 
> Behalf Of Roger While
> Sent: Wednesday, January 18, 2006 3:45 PM
> To: address@hidden
> Cc: address@hidden; address@hidden
> Subject: [open-cobol-list] Re: OC issues - number 7
> 
> John,
> This is typical of what one sees on old mainframe programs.
> In fact, judging by the names, what Sergey has done is to reduce
> the problem to a test example.
> The reason that constructs like this were done in the old
> days was to conserve memory. Effectively "packing" the
> fields. Defining each field on an 01 level would align the
> field on the machines natural boundary therefore taking
> much more room. This did not have any runtime performance
> consequences on alignment tolerant machines like the 390.
> 
> Roger
> 
> >It looks like very bad code to me. You define the group item "T"
> >as computational. Then you define subfields under it.
> >Each of these fields are signed, which means
> >that the fields have to have room for a sign byte or nibble.
> >Also, a COMP field soes not measure out the same length as its
> >count in decimal digits. An S9(4) field, depending on the
> >hardware, may require  various lengths in bytes. On a word
> >oriented machine it could be a half word or full word.
> >
> >There is no need to define the group item as COMP. That
> >definition is best left to the elementary items, those with PIC
> >clauses. Indeed there is no real need to group the above data
> >fields at all.  They can all be defined as 01 or 77. Just because
> >the standard says you can do someting doesn't mean that you
> >should do something. I cannot ever recall having assigned COMP,
> >COMP-3 etc. to a group item. And I have been writing COBOL since
> >1968.
> >
> >We waste time trying to write nonsense code code designed to break
> >compilers. The answer in every case is to write sensible code.
> >Given the fact that major features like the SCREEN SECTION are
> >still missing, playing around with silly scenarios is not useful.
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&;
> dat=121642
> _______________________________________________
> 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]