Requesting persistent binding for all cursor host variables

If you use both the -b and -p options when precompiling the preceding example, the generated code binds the host variables of the fetch statement only the first time that the statement executes. Unlike other Embedded SQL statements (as described in “When binding occurs”), it does not matter whether there are one or more identical fetch statements in a series, or a simple fetch statement executed in a loop. Using both options together causes the bindings to persist even when the program closes the cursor; the host variables do not need to be rebound when the cursor is reopened. The bindings persist until the program deallocates the cursor—typically, with the deallocate cursor or disconnect statement.