RSC/MP Programming Manual
Language Conversion for RSC/MP Function Calls
Parameter Syntax
Parameter Syntax
Ta ble B-2 lists the C and COBOL parameter passing syntax.
Table B-2. C and COBOL Parameter Passing Syntax
C Parameter
Passing Syntax
COBOL Parameter Passing Syntax
Description
*name
USING name BY REFERENCE
The address of (or pointer to)
the variable.
VOID *name
USING name BY REFERENCE
A pointer to a nonspecific
data type.
String Termination
In the C programming language, the ends of character strings (character strings are
PIC X fields) are identified by a numeric 0 as the last character (called the NULL
terminator). To aid COBOL programmers, the RSC/MP API functions also recognize a
space at the end of the string as the end-of-string terminator. You must place blanks at
the end of all character strings to fill out the character strings passed to RSC/MP
functions. See the SERVER-NAME va lue in the COBOL example on page B-4.
COBOL Programs
UNIX COBOL programs prefix the function name with C_ to use the C calli ng
sequence.
Note. In some Microsoft COBOL versions, programs must prefix the function name with an
underscore (_) instead of C_. Check your COBOL manual for more information.
HP NonStop Remote Server Call (RSC/MP) Programming Manual — 522360-006
B- 2