Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
6-45
IF ... DOUBLEBYTE Statement
The following example illustrates a simple IF statement:
IF julian-days IS GREATER THAN 59,
ADD leap-year TO julian-days.
The following example illustrates a simple IF ELSE statement:
IF tally GREATER THAN 0
MOVE 0 TO tally
MOVE 3 TO msg-index
PERFORM print-error-routine
ELSE
MOVE 1 TO flag.
The following example illustrates nested IF statements:
IF employee-number NOT EQUAL TO SPACES
PERFORM read-routine
IF no-error
PERFORM list-record-out
IF yes
PERFORM delete-master
IF no-error
ADD 1 TO delete-count
ELSE
NEXT SENTENCE
ELSE
MOVE 0 TO flag
ELSE
NEXT SENTENCE
ELSE
MOVE 1 TO flag.
IF ... DOUBLEBYTE Statement
The IF ... DOUBLEBYTE statement tests for the existence of only double-byte
characters in an alphanumeric data item.
Aligned double spaces are seen as %H2020 and are valid double-byte characters. A
single space or a nonaligned space is not a double-byte character.
IF ... WITHIN Statement
The IF ... WITHIN statement determines whether the cursor, positioned at the row and
column values stored in OLD-CURSOR, NEW-CURSOR, or an appropriate Working-
Storage data item, is within an elementary screen item or an elementary screen overlay
item.
IF data-name [ IS ] [ NOT ] DOUBLEBYTE
IF [ NOT ] data-item [ NOT ] WITHIN screen-item
[ AT screen-area ]