Background documentation-770: Macro in FETCH set SQLOPT="-B 0" Locate this document in the navigation structure

 

Explanation

FETCH statements are executed as ARRAY statements, whenever possible. If macros are used in the FETCH statement, errors may occur and records be lost.

User Response

When using macros within FETCH statements, set the runtime option MFETCH(0). This option prevents FETCH statements from being executed as ARRAY statements.