EXECUTE UPDATE
Use the EXECUTE UPDATE command to execute UPDATE, INSERT or DELETE statements.
The update count will be returned in the JSM command message field.
If you want to use a very large SQL statement then you have the option of preparing the statement using the SET PARAMETER(*SQL) command, then using the EXECUTE UPDATE(*SQLPARAMETER) command.
Syntax:
Command |
Keyword |
Value |
Developer notes |
EXECUTE |
UPDATE |
statement |
Required. Execute UPDATE, INSERT or DELETE statement. |
*SQLPARAMETER |
Execute previously prepared SQL statement using the PARAMETER(*SQL) keyword on the SET command. |
Example
SET PARAMETER(*SQL) #WRKLST(TXT)
EXECUTE UPDATE(*SQLPARAMETER)
EXECUTE UPDATE(UPDATE EMPLOYEE SET AGE=25)
EXECUTE UPDATE(DELETE FROM EMPLOYEE WHERE AGE=25)