Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Passing pointers as arguments in ODBC calls

If you specify a pointer argument to one of the data types acceptable to ODBC, then you must either pass the target of the pointer BY REFERENCE, define a pointer item that points to the target item and pass that BY VALUE, or pass the ADDRESS OF the target BY VALUE.

To illustrate, assume the function is defined as:

RETCODE SQLSomeFunction(PSomeArgument)

Here PSomeArgument is defined as an argument that points to SomeArgument. You can pass the argument to SQLSomeFunction in one of the following ways:

You can use the last approach only if the target argument, SomeArgument, is a level-01 item in the LINKAGE SECTION. If so, you can set the addressability to SomeArgument in one of the following ways:

Example: passing pointers as arguments in ODBC calls


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)