Closed ManjulaPatilMVP closed 6 years ago
The COBOL program provided by you is not valid, as the initial line IDENTIFICATION DIVISION
is missing. It should be something like:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
...
Perhaps this is due to a copy and paste error. If you need any help, let me know.
for the input program
PROGRAM-ID. HELLO.
DATA DIVISION. WORKING-STORAGE SECTION. EXEC SQL INCLUDE SQLCA END-EXEC.
EXEC SQL INCLUDE STUDENT END-EXEC.
EXEC SQL BEGIN DECLARE SECTION END-EXEC. 01 WS-STUDENT-REC. 05 WS-STUDENT-ID PIC 9(4). 05 WS-STUDENT-NAME PIC X(25). 05 WS-STUDENT-ADDRESS X(50). EXEC SQL END DECLARE SECTION END-EXEC.
PROCEDURE DIVISION. EXEC SQL SELECT STUDENT-ID, STUDENT-NAME, STUDENT-ADDRESS INTO :WS-STUDENT-ID, :WS-STUDENT-NAME, WS-STUDENT-ADDRESS FROM STUDENT WHERE STUDENT-ID=1004 END-EXEC.
IF SQLCODE=0 DISPLAY WS-STUDENT-RECORD ELSE DISPLAY 'Error' END-IF. STOP RUN.
i am not getting the Procedure division under program unit. i am getting only identification division , environment division and data division. Please help to resolve this. i have taken the latest cobol85.g4