z/OS Language Environment Writing Interlanguage Communication Applications
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Passing by value (direct)

z/OS Language Environment Writing Interlanguage Communication Applications
SA38-0684-00

To pass data by value (direct) from C to COBOL, the variables are passed by C as arguments on a function call and received by COBOL as BY VALUE parameters. Conversely, to pass data by value (direct) from COBOL to C, the variables are passed by COBOL as BY VALUE arguments and received by C as function parameters. In all cases, the variable must be declared in C and COBOL with compatible base data types. For example, if a C function called FROMCOB is to receive a parameter passed by value (direct) of type int, the function prototype declaration would look like this:
void FROMCOB(int)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014