Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 000001 IDENTIFICATION DIVISION.
- 000002 PROGRAM-ID. ZIEKC.
- 000003 ENVIRONMENT DIVISION.
- 000004 CONFIGURATION SECTION.
- 000005 DATA DIVISION.
- 000006 WORKING-STORAGE SECTION.
- 000007 EXEC SQL
- 000008 INCLUDE BEDG
- 000009 END-EXEC.
- 000010 EXEC SQL
- 000011 INCLUDE COPZIEK
- 000012 END-EXEC.
- 000013 EXEC SQL
- 000014 INCLUDE SQLCA
- 000015 END-EXEC.
- 000016 01 KAMERID PIC X(9).
- 000017 PROCEDURE DIVISION.
- 000018 ACCEPT KAMERID
- 000019 MOVE KAMERID TO ROOM-ID
- 000020 MOVE KAMERID TO BROOM-ID
- 000021 EXEC SQL
- 000022 DELETE FROM HOG0009.BED
- 000023 WHERE ROOM_ID = :BROOM-ID
- 000024 END-EXEC.
- 000025 EXEC SQL
- 000026 DELETE FROM HOG0009.ROOM
- 000027 WHERE ROOM_ID = :ROOM-ID
- 000028 END-EXEC.
- 000029 DISPLAY "ENTERED ROOM-ID " ROOM-ID
- 000030 DISPLAY "----------------------------------------"
- 000031 IF SQLCODE EQUAL 0
- 000032 DISPLAY "UPDATE EXECUTED SUCCESSFULLY"
- 000033 ELSE
- 000034 DISPLAY "FOUT"
- 000035 DISPLAY "SQLCODE: " SQLCODE
- 000036 DISPLAY "MESSAGE: " SQLERRM
- 000037 END-IF
- 000038 EXEC SQL
- 000039 COMMIT
- 000040 END-EXEC
- 000041 STOP RUN.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement