Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Pathway Application Example
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
8-5
SCREEN COBOL Program for Block Mode
03 DATA-IN.
05 FILLER AT 5, 1 VALUE "NAME :".
05 NAME-IN AT 5, 8 PIC A(30) LENGTH 1 THRU 30
(6)
TO NAME-IN OF ENTRY-MSG, FILL "_". (6)
05 FILLER AT 6, 1 VALUE "ADDR :".
05 ADDR-IN AT 6, 8 PIC X(20) LENGTH 1 THRU 20
TO ADDR-IN OF ENTRY-MSG, FILL "_".
05 DATE-GRP AT 8, 1.
07 FILLER AT @, 1 VALUE "MONTH :".
(7)
07 MONTH-IN AT @, * + 2 PIC A(10) LENGTH 1 THRU 10
MUST BE "JANUARY", "FEBRUARY" USING MONTH-IN OF
ENTRY-MSG, UPSHIFT INPUT, VALUE "FEBRUARY".
07 FILLER AT @, * + 4 VALUE "DAY :".
07 DAY-IN AT @, * + 2 PIC Z9 LENGTH 1 THRU 2, VALUE "15"
MUST BE 1 THRU 31, USING DAY-IN OF ENTRY-MSG.
07 FILLER AT @, * + 4 VALUE "YEAR :".
07 YEAR-IN AT @, * + 2 PIC Z9 MUST BE 79, 82, 85 THRU 88
USING YEAR-IN OF ENTRY-MSG, VALUE "85".
03 FILLER AT 10, 1 VALUE "REPLY -".
03 SERVER-RECORD AT 10, * + 2 PIC X(64)
FROM SERVER-RECORD OF ENTRY-REPLY.
03 FILLER AT 18, 1 VALUE
"F1 - ENTER PASSWORD F5 - BLINK REPLY".
03 FILLER AT 19, 1 VALUE
"F2 - ENTER DATA F6 - RESET ATTR REPLY".
03 FILLER AT 20, 1 VALUE
"F3 - CLEAR INPUT F7 - RESET DATA REPLY".
03 FILLER AT 21, 1 VALUE
"F4 - RESET DATA SCREEN F16 - EXIT PROGRAM".
03 ERROR-MSG AT 24, 2 PIC X(76) ADVISORY
(8)
FROM ERROR-MSG OF WS. (8)
(1) The literal is displayed on the screen starting at line 1, column 20.
(2) The literal is displayed on the screen starting at line 3, column 1.
(3) If a data name is used in a screen section, a PIC clause must be associated with
that data name. The FROM (data association clause) specifies an output
association. Data is moved from DEPT-HEADER OF WS to this position on the
screen.
(4) The asterisk means relative to the current position; therefore, the literal
PASSWORD is displayed on the screen at line 3, column 26 (16 + 10).
(5) The data entered for PASSWORD is hidden from the operator as it is entered.
The password is upshifted and tested for the correct value. If the password is
correct, the password is moved to the data name PASSWORD of working
storage.
(6) The operator must type in from 1 to 30 alphabetic characters that are moved to
ENTRY-MSG. A fill character of underscore is present on the screen in these 30
positions.
(7) The at sign (@) indicates the position is relative to the home position of the
group. This literal is displayed on line 8, column 1.
(8) These lines identify the field to be used for information and error messages
generated by the TCP. The programmer also can use this field.