RSC/MP 7.2 Programming Manual

Language Conversion for RSC/MP Function Calls
HP NonStop Remote Server Call (RSC/MP) Programming Manual522360-004
B-2
Parameter Syntax
Parameter Syntax
Table B-2 lists the C and COBOL parameter passing syntax.
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 value in the COBOL example on page B-4.
COBOL Programs
UNIX COBOL programs prefix the function name with C_ to use the C calling
sequence.
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.
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.