Re: INSPECT and TRAILING syntax




"Karl Kiesel" <Karl.Kiesel@xxxxxxxxxxxxxxxxxxx> wrote in message
news:e41d9j$ovg$1@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Chuck Stevens" <charles.stevens@xxxxxxxxxx> schrieb im Newsbeitrag
news:e3vhio$1rg9$1@xxxxxxxxxxxxxxxxxxxxxxx

I understood the availability of SIZE as an alternative for PICTURE, but
couldn't relate to how CLASS was a syntactic/semantic substitute for
PICTURE. And thus I stand by the question: what functionality does the
class test in the PROCEDURE DIVISION provide that duplicates what PICTURE
provides in the DATA DIVISION sufficient to render the latter
unnecessary?

The 'COBOL-61 extended' report specifies as one of various clauses within
a record description in the data division a CLASS clause with 'FUNCTION:
To indicate the type of data being described' and with a syntax
CLASS IS {ALPHABETIC / NUMERIC / APHANUMERIC /AN} (only keywords within
the brackets are underlined)
and several notes, of which the last says: '6. If a PICTURE is given, the
CLASS clause is unnecessary. If both are used, however, the class of
characters shown in the PICTURE must not contradict the CLASS clause of an
elementary item, or of a group to which the item belongs'

K. Kiesel

Thank you for posting that Karl.

Given that your document and Chuck's both indicate PICTURE was available,
I'm at a loss to account for why we didn't use it. It may have been lack of
understanding on my part at the time or perhaps it was an installlation
standard, I honestly can't remember.

I DO remember learning about PICTURE on an ICL COBOL course in Auckland in
1967.

Pete.



.