You could use the error var, or you could make variable holders for the sqlcode.
FETCH C1 INTO somelist SET VAR sql_1 = .#sqlcode FETCH C2 INTO comelest SET VAR sql_2 = .#sqlcode --- or you could use the error var SET ERROR VAR VERR FETCH C1 INTO somelist set var verr_hold1 = .verr FETCH C2 INTO somelist set ver verr_hold2 = .verr The error var will be -100 at the end of your data. Personally, I would use sqlcode method, but depending on what you are doing you might need the error var method. Troy Sosamon ===== Original Message from [EMAIL PROTECTED] at 9/27/02 11:46 am >I have a situation where, at least f/now, it seems best to CURSOR into one >table, then, f/ea record, CURSOR into another table f/matching records. My >problem is managing SQLCODE values. Is it possible to use something other >than ... > >WHILE SQLCODE <> 100 THEN >... >ENDWHILE > >That is, could I set a variable equal to SQLCODE at the appropriate points, >such as after a FETCH, and test that variable? > >Thanks, >Steve in Memphis > >================================================ >TO SEE MESSAGE POSTING GUIDELINES: >Send a plain text email to [EMAIL PROTECTED] >In the message body, put just two words: INTRO rbase-l >================================================ >TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] >In the message body, put just two words: UNSUBSCRIBE rbase-l >================================================ >TO SEARCH ARCHIVES: >http://www.mail-archive.com/rbase-l%40sonetmail.com/ ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
