Please let me know if there are any mistakes in the below program. I did not get this executed when i tried to.
49 WS-LEN PIC S9(4) COMPT.
49 WS-TXT PIC X(100).
MOVE 45 TO WS-LEN.
MOVE 'DELETE * FROM EMP WHERE EMPNO = 1200' TO WS-TXT.
PREPARE DYN FROM WS-REC
In the above program EMP table is existing with a record 1200. I could run and execute error-free, but in the EMP table that particular record is not getting deleted. What is the error in the above pgm.
Also observe below........
after moving the statements like the above pgm i want to execute directly without preparing...... is the below one enough and correct