Try this code... 0475.00 0476.00 C/EXEC SQL 0477.00 C+ delete fromwhere xx = 'value' 0478.00 C/END-exec 0479.00 0480.00 C/EXEC SQL commit 0481.00 C/END-exec 0482.00
Try this code... 0475.00 0476.00 C/EXEC SQL 0477.00 C+ delete fromwhere xx = 'value' 0478.00 C/END-exec 0479.00 0480.00 C/EXEC SQL commit 0481.00 C/END-exec 0482.00
That would be nice, if the information was hard coded, but this is a batch job, and names change.
In Mary's example above, where needed, replace any constants with a variable name. The variable name must be preceded with a colon (. Is that what you're looking for? Fro your first post, it seems like you have another problem. Where is the variable $JOB coming from? -dan
I am doing a delete of records from a file specifying where job name is equal to a field, see code. But the sql statement does not work. Anyone have any insight? I am on V5R2. In debug, putting cursor on the field and hitting command 11 results in EVAL $JOB Identifier does not exist. Anyone care to hazard a guess on this?
But one of the two examples below should work for you. The First example if you are always deleting from the same file based on a particular key. The Second example if you're creating the SQL statement on the fly.
Code