title: Is the cursor variable updated when updating a row?
body: <p>In the code below (stored procedure body), whether the value of the cursor field is automatically updated after UPDATE or not? If not, is the Close / Open command sufficient again or not?</p>
  <p>I didn't find any description that included this, it was just the FOR SELECT cursors in all of them.</p>
  <pre><code>DECLARE VARIABLE FCU_VALIDATE TYPE OF COLUMN FCU_CTRL.FCU_VAL_WHEN_IMP;
  
  DECLARE FCU_DOC_MSTR CURSOR FOR
      (SELECT * FROM FCU_DOC_MSTR
       WHERE FCU_DOC_APN = :APNUMBER
         AND FCU_DOC_ID  = :DOCID);
  BEGIN
       OPEN FCU_DOC_MSTR;
       
       FETCH FIRST FROM FCU_DOC_MSTR;
       -- CHECK CONTROL FILE SETTINGS
       
       FCU_VALIDATE = COALESCE((SELECT FCU_VAL_WHEN_IMP FROM FCU_CTRL
                                WHERE FCU_INDEX1 = 1), FALSE);
       
       IF (FCU_VALIDATE = TRUE) THEN
       BEGIN
            -- IF EXIST INVALID ITEM DETAIL LINE, SET DOCUMENT STATUS TO INVALID
            IF ((SELECT COUNT(*) FROM FCU_ITEM_DET
                 WHERE FCU_ITEM_APN     = :FCU_DOC_MSTR.FCU_DOC_APN
                   AND FCU_ITEM_DOC_ID  = :FCU_DOC_MSTR.FCU_DOC_ID 
                   AND FCU_ITEM_STATUS != '0') &gt; 0) THEN
                UPDATE FCU_DOC_MSTR
                   SET FCU_DOC_STATUS = '90'
                WHERE CURRENT OF FCU_DOC_MSTR;  
       END
  
       -- CHECK DOCUMENT STATUS IS IMPORTED AND NO ERROR EXIST SET STATUS TO IMPORTED
       IF (FCU_DOC_MSTR.FCU_DOC_STATUS = '99') THEN
          UPDATE FCU_DOC_MSTR
             SET FCU_DOC_STATUS = '0'
          WHERE CURRENT OF FCU_DOC_MSTR;   
        
       IF (FCU_VALIDATE = TRUE) THEN
       BEGIN   
           IF (FCU_DOC_MSTR.FCU_DOC_STATUS = '0') THEN
              UPDATE FCU_DOC_MSTR
                 SET FCU_DOC_STATUS = '1'
              WHERE CURRENT OF FCU_DOC_MSTR;     
           
           -- UPDATE FILE STATUS   
           IF ((SELECT COUNT(*) FROM FCU_DOC_MSTR
                WHERE FCU_DOC_FILE_ID = :FCU_DOC_MSTR.FCU_DOC_FILE_ID
                  AND FCU_DOC_STATUS != '1') &gt; 0) THEN
               UPDATE FCU_FILE_MSTR
                  SET FCU_FILE_STATUS = '90'
               WHERE FCU_FILE_ID = :FCU_DOC_MSTR.FCU_DOC_FILE_ID;
           ELSE
               UPDATE FCU_FILE_MSTR
                  SET FCU_FILE_STATUS = '1'
               WHERE FCU_FILE_ID = :FCU_DOC_MSTR.FCU_DOC_FILE_ID;
       END   
        
       CLOSE FCU_DOC_MSTR;
  END
  </code></pre>