Hi everyone,
I have designed a screen display program using an externally described Transaction File prompting to key an account. This program points to another program defined in the procedure division using the linkage parameter as follows.
LINKAGE SECTION.
01 LK-PARM-FIELDS.
05 LK-DEAL LIKE F-DEAL.
PROCEDURE DIVISION USING LK-PARM-FIELDS.
This works and the information correctly displayed. When the second program is ended with the GOBACK as follows returns back to the calling program and the prompt screen is again displayed.
000-MAIN-MODULE.
PERFORM 100-INITIALIZATION-RTN
PERFORM 200-PROMPT-SCREEN-RTN
UNTIL WS-FUNCTION-KEY-03.
PERFORM 300-TERMINATION-RTN.
GOBACK.
However when I attempt to select another account number in the first program nothing happens, but if I exit the program and rerun the program once again it works. The program looks like this.
PROCEDURE DIVISION.
PROCEDURE DIVISION. PROCEDURE DIVISION.
MAIN-PROCESS.
OPEN I-O DISPFILE.
ACCEPT CURRENT-DATE FROM DATE.
MOVE IND-OFF TO IN99 IN FORMAT1-I-INDIC.
PERFORM DISPLAY-SCREEN THRU READ-AND-PROCESS-SCREEN
UNTIL IN99 IN FORMAT1-I-INDIC = IND-ON.
CLOSE DISPFILE.
STOP RUN.
DISPLAY-SCREEN.
WRITE DISP-REC FORMAT IS "FORMAT1"
INDICATORS ARE FORMAT1-O-INDIC.
READ-AND-PROCESS-SCREEN.
MOVE ZEROS TO FORMAT1-I-INDIC.
READ DISPFILE FORMAT IS "FORMAT1"
INDICATORS ARE FORMAT1-I-INDIC.
IF IN51 IN FORMAT1-I-INDIC = IND-ON THEN
CALL "TESTINQ1" USING DEAL
ELSE
IF IN52 IN FORMAT1-I-INDIC = IND-ON THEN
CALL "DELCHGINQ2".
Can anyone kindly correct me if I have erred somewhere in my source please.
Thanks.
Tony
I have designed a screen display program using an externally described Transaction File prompting to key an account. This program points to another program defined in the procedure division using the linkage parameter as follows.
LINKAGE SECTION.
01 LK-PARM-FIELDS.
05 LK-DEAL LIKE F-DEAL.
PROCEDURE DIVISION USING LK-PARM-FIELDS.
This works and the information correctly displayed. When the second program is ended with the GOBACK as follows returns back to the calling program and the prompt screen is again displayed.
000-MAIN-MODULE.
PERFORM 100-INITIALIZATION-RTN
PERFORM 200-PROMPT-SCREEN-RTN
UNTIL WS-FUNCTION-KEY-03.
PERFORM 300-TERMINATION-RTN.
GOBACK.
However when I attempt to select another account number in the first program nothing happens, but if I exit the program and rerun the program once again it works. The program looks like this.
PROCEDURE DIVISION.
PROCEDURE DIVISION. PROCEDURE DIVISION.
MAIN-PROCESS.
OPEN I-O DISPFILE.
ACCEPT CURRENT-DATE FROM DATE.
MOVE IND-OFF TO IN99 IN FORMAT1-I-INDIC.
PERFORM DISPLAY-SCREEN THRU READ-AND-PROCESS-SCREEN
UNTIL IN99 IN FORMAT1-I-INDIC = IND-ON.
CLOSE DISPFILE.
STOP RUN.
DISPLAY-SCREEN.
WRITE DISP-REC FORMAT IS "FORMAT1"
INDICATORS ARE FORMAT1-O-INDIC.
READ-AND-PROCESS-SCREEN.
MOVE ZEROS TO FORMAT1-I-INDIC.
READ DISPFILE FORMAT IS "FORMAT1"
INDICATORS ARE FORMAT1-I-INDIC.
IF IN51 IN FORMAT1-I-INDIC = IND-ON THEN
CALL "TESTINQ1" USING DEAL
ELSE
IF IN52 IN FORMAT1-I-INDIC = IND-ON THEN
CALL "DELCHGINQ2".
Can anyone kindly correct me if I have erred somewhere in my source please.
Thanks.
Tony