SHIFT-OUT and SHIFT-IN
You can specify the SHIFT-OUT and SHIFT-IN special registers in a function wherever an alphanumeric argument is allowed.
The SHIFT-OUT and SHIFT-IN special registers are implicitly defined as alphanumeric data items of the format:
01 SHIFT-OUT GLOBAL PICTURE X(1) USAGE DISPLAY VALUE X"0E".
01 SHIFT-IN GLOBAL PICTURE X(1) USAGE DISPLAY VALUE X"0F".
When used in nested programs, these special registers are implicitly defined with the global attribute in the outermost program.
These special registers represent EBCDIC shift-out and shift-in control characters, which are unprintable characters.
These special registers cannot be receiving items. SHIFT-OUT and SHIFT-IN cannot be used in place of the keyboard control characters when you are defining DBCS user-defined words or specifying EBCDIC DBCS literals.
The following example shows how SHIFT-OUT and SHIFT-IN might be used:
DATA DIVISION.
WORKING-STORAGE.
01 DBCSGRP.
05 SO PIC X.
05 DBCSITEM PIC G(3) USAGE DISPLAY-1.
05 SI PIC X.
...
PROCEDURE DIVISION.
MOVE SHIFT-OUT TO SO
MOVE G"<D1D2D3>" TO DBCSITEM
MOVE SHIFT-IN TO SI
DISPLAY DBCSGRP