|
I just posted this same message to the general Midrange list by mistake, so I'm re-posting to the rpg group... Sorry... =========== I'm attempting to write some embedded sql skeleton code, and I want to make sure I do it right... I was wondering, if I could have someone look at this, and make any suggestion, that would make the process better than what I have... >From what I read from the infocenter, there are a few sql variables to check to make sure there were no errors... But I was wondering if sqlcod was enough... Thanks, tim c/exec sql c+ declare c1 cursor for DynSqlStmt c/end-exec c eval sql = 'SELECT DISTINCT prpoid '+ c 'FROM pmppr WHERE prhreq = '+ c %editc(julian:'Z') + c ' and prco < '' 090''' c/exec sql c+ Prepare DynSqlStmt from :sql c/end-exec c/EXEC SQL OPEN C1 c/END-EXEC c dow 1=1 c/EXEC SQL c+ FETCH next from c1 INTO :po# c/END-EXEC c if sqlcod <> 0 c leave c endif .... work with po# here.... c enddo c/EXEC SQL c+ CLOSE C1 c/END-EXEC This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.