Specify an I-O-FEEDBACK area in your program and use ACCEPT to fill the feedback area. The format of the area is in I/O feedback area for ICF and display files in the Information Center. The same feedback area is available in all HLLs.
Is this example what you are loking for?
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT MYSCREEN ASSIGN TO WORKSTATION-MYSCREEN
ORGANIZATION IS TRANSACTION
CONTROL-AREA IS TRANSACTION-CONTROL-AREA.
...
DATA DIVISION.
FILE SECTION.
FD MYSCREEN LABEL RECORDS STANDARD.
01 MYSCREEN-REC.
COPY DDS-ALL-FORMATS OF MYSCREEN.
...
WORKING-STORAGE SECTION.
*---------- Transaction Control Area ---------------------------
* FT: 00=Enter. 01..24=FunctionKeys. 90=PageUp 91=PageDown
* 92=Print etc.
01 TRANSACTION-CONTROL-AREA.
02 FT PIC XX.
02 TERMINAL-ID PIC X(10).
02 FORMAT-NAME PIC X(10).
...
PROCEDURE DIVISION.
WRITE MYSCREEN-REC FORMAT "MYSCREEN".
READ MYSCREEN FORMAT "MYSCREEN".
IF FT = 03 THEN STOP RUN.
IF FT = 11 THEN PERFORM SUBPGM-FKEY-11.
If you understand the use of the I-O feedback area, then the use of the CONTROL-AREA clause in a FILE-CONTROL paragraph for a transaction file can simplify it.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 4  Replies