On Wednesday 20 February 2013 02:15:51 Thomas Berg wrote:
> > It's not the features that are bad in those instances, but rather the
> > syntax for requesting the features; that syntax is about as far from
> > the purported English-like character of COBOL as you can get.
> >
> > >I can't immediately see that (except maybe COMPUTATIONAL-n).
        In COBOL 2000 the Computational usages have been supplemented by
BINARY *
BINARY-C-LONG SIGNED
BINARY-C-LONG UNSIGNED
BINARY-C-LONG or
BINARY-CHAR SIGNED
BINARY-CHAR UNSIGNED
BINARY-CHAR or
BINARY-DOUBLE SIGNED
BINARY-DOUBLE UNSIGNED
BINARY-DOUBLE or
BINARY-LONG SIGNED
BINARY-LONG UNSIGNED
BINARY-LONG or
BINARY-SHORT SIGNED
BINARY-SHORT UNSIGNED
BINARY-SHORT or
COMP *
COMP-1 *
COMP-2 *
COMP-3 *
COMP-4 *
COMP-5 *
COMPUTATIONAL *
COMPUTATIONAL-1 *
COMPUTATIONAL-2 *
COMPUTATIONAL-3 *
COMPUTATIONAL-4 *
COMPUTATIONAL-5 *
COMPUTATIONAL-X
DISPLAY *
DISPLAY-1 *
FUNCTION-POINTER *
INDEX *
NATIONAL *
OBJECT REFERENCE class-name-1 *
PACKED-DECIMAL *
POINTER *
PROCEDURE-POINTER *
PROGRAM-POINTER
SIGNED-INT
SIGNED-LONG
SIGNED-SHORT
UNSIGNED-INT
UNSIGNED-LONG
UNSIGNED-SHORT
so this should no longer be an issue (unless they are prohibited by hide-bound 
installation standards). (* indicates those recognized by z/COBOL.)
> >
> > If you're just learning COBOL, the magic numbers 77 and 88 totally
> > obscure the intent; I consider them to be worse than COMPUTATIONAL-n in
> > that regard.
>
> Do you in this regard prefer, e g, that:
>
> 01  NAME1               PIC X.
>     88  ONE  VALUE '1'.
>     88  ZERO VALUE '0'.
>
> - instead be:
>
> 01  NAME1               PIC X.
>     WHEN VALUE '1' SETTRUE ONE.
>     WHEN VALUE '0' SETTRUE ZERO.
>
> ?
>
> But I can't see level number 77 be much confusing, out of line of "normal"
> COBOL and maybe superfluous but not much other than that.
        66, 77 and 88 were perhaps an unfortunate choice by the Codasyl 
Committee, 
but simple code inspection makes their purpose clear even to a neophyte after 
a few moments.  In COBOL 2000 we now have level 78 as well, to identify 
constant identifiers:
78 identifier-1 VALUE IS literal-1 .
an alternative that may be preferred (I do) is use of the CONSTANT keyword:
01 identifier-2 CONSTANT [ IS GLOBAL ] AS [literal-2 | LENGTH OF 
identifier-3 | BYTE-LENGTH OF identifier-4].
        All issues with level numbers and usage clauses may be quickly resolved 
by 
looking at the COBOL Language Reference manual (unless one has an aversion to 
reading it).

Leslie

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to