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-102
TURN Statement
05 MS-DEST-1-FLD2 PIC X(20) TO WS-DEST-1-FLD2.
05 MS-DEST-1-FLD3 PIC X(50) TO WS-DEST-1-FLD3.
01 DESTINATION-TEMP-2.
05 MS-DEST-2-FLD1 PIC X(30) TO WS-DEST-2-FLD1.
05 FILLER PIC 9(4) COMP.
05 MS-DEST-2-FLD2 PIC X(30) TO WS-DEST-2-FLD2.
05 MS-DEST-2-FLD3 PIC X(40) TO WS-DEST-2-FLD3.
PROCEDURE DIVISON.
TRANSFORM MS-SOURCE
SELECT CODE FIELD IS WS-SEL-CODE-FIELD OF WS-CODE-MSG
CODE SC1 YIELDS DESTINATION-TEMP-1
CODE SC2 YIELDS DESTINATION-TEMP-2
ON ERROR PERFORM ERROR-HANDLER.
TURN Statement
The TURN statement changes the display attributes of screen variable fields. The
TURN statement cannot be used by programs communicating with intelligent devices.
TEMP or TEMPORARY
indicates the fields are to be reset to their initial display attributes when the next
RESET TEMP or ACCEPT statement is executed.
TURN [ TEMP ] { [ mnemonic-name ] }
[ TEMPORARY ] { [ DYNAMIC ] }
[ RECEIVE FROM { ALTERNAL } }
{ {ALTERNATE OR TERMINAL} }
{ {TERMINAL } }
{ {TERMINAL OR ALTERNATE} }
IN
{ screen-identifier } [,]... [ DEPENDING [ON] identifier ]
[ SHADOWED ]
Note. During execution of a SCREEN COBOL program, the TCP controls the MDTs (modified
data tag) in the same way it controls display attributes, with two important exceptions:
•
When a TURN TEMP statement selects an input field for changing display attributes, the
MDT bit is always set.
•
When a RESET TEMP statement selects an input field for resetting of attributes, the MDT
bit is set, regardless of the initial MDT attribute of the field.
These two exceptions apply only to the TURN and RESET statements that have the TEMP
modifier. Note also that the field’s MDT bit is not reset after the completion of the ACCEPT
statement. Once the MDT bit is set, it stays set until the next DISPLAY BASE, TURN, RESET,
or CLEAR INPUT operation.