Pathmaker Programming Guide
Coding Custom Services
Creating Services and Servers
4–24 067868 Tandem Computers Incorporated
Table 4-3. Pathmaker Common Service Utility Library (Page 1 of 5)
Function Name Description Parameters Description Return Value
cobstr_to_cstr Converts a COBOL-style
character string to a C-
style character string.
char *outbuff
size_t outlen
char *inbuff
size_t inlen
Pointer to null-terminated string
converted from ‘inbuff’.
Maximum size of out buffer.
Pointer to fixed-length, blank-
padded string to convert into
‘outbuff’.
Size of the input string.
Pointer to char
Address of result
returned if not
truncated; NULL if
truncated.
cstr_to_cobstr Converts a C-style
character string to a
COBOL-style character
string.
char *outbuff
size_t outlen
char *inbuff
Pointer to fixed-length, blank-
padded string converted from
‘inbuff’.
Maximum size of out buffer.
Pointer to null-terminated string to
convert into ‘outbuff’.
Pointer to char
Address of result
returned if not
truncated; NULL if
truncated.
cobstr_to_longlong Converts a COBOL-style
numeric character string
to a binary integer.
long long *outval
char *inbuff
size_t inlen
short signtype
Pointer to binary integer converted
from ‘inbuff’.
Pointer to fixed-length, zero-padded
string to convert into ‘outval’.
Size of the input string.
Sign representation used in ‘inbuff’.
Short
0=Conversion OK;
1=Input overflows
output; 2=Input
negative or too
small; 3=Input has
invalid digit or sign
char; 4=Invalid sign
type.
longlong_to_cobstr Converts a binary integer
to a COBOL-style
numeric character string.
char *outbuff
size_t outlen
long long *inval
short signtype
Pointer to fixed-length, zero-padded
string converted from ‘inval’.
Maximum size of out buffer.
Integer to convert into ‘outbuff’.
Sign representation to use in
‘outbuff’.
Short
0=Conversion OK;
1=Input overflows
output; 2=Output
negative or too
small; 3=Input is
negative, output
must be unsigned;
4=Invalid sign type.
cobstr_trim Returns the current length
of a COBOL-style
character string.
char *inbuff
size_t maxlen
Pointer to fixed-length, blank-
padded string whose trimmed
length is desired.
Size of the input string buffer.
Short
cobstr_pad Pads a COBOL-style
character string with
trailing blanks.
char *inbuff
size_t maxlen
short curlen
Pointer to the string buffer to be
padded.
Size of the input string buffer.
Current length of the string data.
Void