View Full Version : SQLRPGLE and referencing fields
Mary Mudido
06-16-2004, 07:03 AM
Try this code... 0475.00 0476.00 C/EXEC SQL 0477.00 C+ delete from <file name> where xx = 'value' 0478.00 C/END-exec 0479.00 0480.00 C/EXEC SQL commit 0481.00 C/END-exec 0482.00
Guest.Visitor
06-21-2004, 05:00 AM
That would be nice, if the information was hard coded, but this is a batch job, and names change.
dacust
06-21-2004, 05:35 AM
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
Guest.Visitor
06-22-2004, 09:42 AM
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?
M.Savino
06-22-2004, 09:42 AM
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. <hr width=50 align=left>Code ('http://www.mcpressonline.com/mc/showcode@@.6aec2872/3')
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.