Interface Data Types
C data types included as parameters are unsigned integers (u32), byte arrays (u8 *) and strings (u8 *). Representing these parameters in C is no problem; but representing them in COBOL requires choosing COBOL data types that are compatible.
Binary values that are passed to Sunaccess functions must be of comp-5 type and passed BY VALUE:
|
| ||
|
|
| |
|
|
| |
|
| ||
|
|
| |
|
|
|
|
|
|
|
|
Strings and byte arrays must either be passed BY REFERENCE or as pointers:
|
| ||
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
| ||
|
|
| |
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
The above example assumes that string1-ptr was set to point at string1. For more information on setting up pointers, see Dealing with Pointers in COBOL.
![]() |