Purpose
Specifies the prefix to be used in conjunction with the cursor ID. The prefix and cursor ID identify the cursor that is used in these cursor manipulation statements:
- CLOSE
- DECLARE
- FETCH
- OPEN
- POSITION
Usage Notes
The abbreviation for CURPREFIX is CP.
CURPREFIX is required for a C program precompilation that contains a cursor type request. CURPREFIX is optional for COBOL and PL/I.
In the absence of this option, PP2 does the following:
Language | Action Taken by PP2 |
---|---|
C | Issues an error as each cursor request is processed. |
COBOL | Uses as a default value the name found in the PROGRAM-ID COBOL statement. |
PL/I | Uses as a default value the name found on the first PROC statement. |
For DB2 compatibility in cursor processing, the CURPREFIX option must specify different prefixes for each compile unit of the executable module.
To maintain compatibility with earlier releases of PP2, the CURPREFIX value must be the same for all compile units of an executable module.
The prefix must be no longer than eight characters and must not include any of these characters:
- Apostrophe
- Quote
- Space