I am having problems reading and verifying-what am I doing wrong.
one program.
PROCEDURE DIVISION using HMFN-COUNTY, HMFN-LOCATION,
CNTY-LOC-TABLE, CNTY-LOC-NAME.
A000-BEGIN.
MOVE SPACES TO countys, cnty-loc-table.
OPEN INPUT CNTY-LOC-FILE.
PERFORM B000-READ.
CLOSE CNTY-LOC-FILE.
STOP RUN.
B000-READ.
display message 'cnty-loc-.cbl reading '.
PERFORM UNTIL ENDOFFILE
READ CNTY-LOC-FILE INTO CNTY-LOC-TABLE
INVALID KEY
MOVE "E" TO END-OF-FILE
DISPLAY MESSAGE 'INVALID KEY'
CLOSE CNTY-LOC-FILE
END-READ
ADD 1 TO CL-KEY
END-PERFORM.
B000-EXIT.
EXIT.
2 program
IF HMFN-COUNTY > SPACE
MOVE 'COUNTY.TBL ' TO CL-FILE
CALL "CNTY-LOC" USING HMFN-COUNTY, HMFN-LOCATION,
CNTY-LOC-TABLE, CNTY-LOC-NAME
CANCEL "CNTY-LOC"
display message 'cnty-loc-table=' cnty-loc-table
display message 'hmfn-county=' hmfn-county
DISPLAY MESSAGE 'CLV-(HHIDX)' CLV(HH-IDX)
IF HMFN-COUNTY NOT = CLV(HH-IDX)
DISPLAY MESSAGE ' INVALID COUNTY CODE '
END-IF
END-IF
.
one program.
PROCEDURE DIVISION using HMFN-COUNTY, HMFN-LOCATION,
CNTY-LOC-TABLE, CNTY-LOC-NAME.
A000-BEGIN.
MOVE SPACES TO countys, cnty-loc-table.
OPEN INPUT CNTY-LOC-FILE.
PERFORM B000-READ.
CLOSE CNTY-LOC-FILE.
STOP RUN.
B000-READ.
display message 'cnty-loc-.cbl reading '.
PERFORM UNTIL ENDOFFILE
READ CNTY-LOC-FILE INTO CNTY-LOC-TABLE
INVALID KEY
MOVE "E" TO END-OF-FILE
DISPLAY MESSAGE 'INVALID KEY'
CLOSE CNTY-LOC-FILE
END-READ
ADD 1 TO CL-KEY
END-PERFORM.
B000-EXIT.
EXIT.
2 program
IF HMFN-COUNTY > SPACE
MOVE 'COUNTY.TBL ' TO CL-FILE
CALL "CNTY-LOC" USING HMFN-COUNTY, HMFN-LOCATION,
CNTY-LOC-TABLE, CNTY-LOC-NAME
CANCEL "CNTY-LOC"
display message 'cnty-loc-table=' cnty-loc-table
display message 'hmfn-county=' hmfn-county
DISPLAY MESSAGE 'CLV-(HHIDX)' CLV(HH-IDX)
IF HMFN-COUNTY NOT = CLV(HH-IDX)
DISPLAY MESSAGE ' INVALID COUNTY CODE '
END-IF
END-IF
.