Note that the RECORD-TYPE-INDICATOR is 2 chars.
Code: Select all
... 10 RECORD-TYPE-INDICATOR PIC X(2). 88 HEADER-FLAG VALUE 'H'. 88 DETAIL-FLAG VALUE 'DT'. 88 TRAILER-FLAG VALUE 'T'. ...
Note that the HEADER-FLAG and TRAILER-FLAG literal VALUEs are a single char.
I was surprised to see this, because I assumed that the conditional flag literal would have to be the same length as the associated alphanumeric item.
IBM Enterprise COBOL 4.2 reference manual says
HP COBOL reference manual says:the number of characters in the literal must not exceed the size of the item.
I cannot find a definitive description of the behavior when the conditional VALUE literal is shorter than the associated alphanumeric item.If you specify a nonnumeric literal value, it must not exceed the size defined by the data item’s PICTURE clause.
Q: What VALUE(s) in the RECORD-TYPE-INDICATOR will set the HEADER-TYPE condition name?
b. anything starting with 'H'.
c. 'H ' ... H followed by a space
d. something else?