Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (i - m) longlong_to_dec(3)
NAME
longlong_to_dec - Converts a C long long value to a SQL DECIMAL value and stores it in a C
array of type decimal
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <sql.h>
int longlong_to_dec (
long long ll_val,
decimal *dec_ary,
int ary_size,
int sign_type);
PARAMETERS
ll_val Specifies the long long value to convert.
dec_ary Points to the first character of the decimal array where longlong_to_dec( ) stores
the converted DECIMAL value.
ary_size dec_ary.
sign_type Specifies the type of sign representation to use for the converted DECIMAL
value. Valid sign_type values are:
0 Convert to an unsigned DECIMAL value.
1 Convert to a DECIMAL value with an embedded leading sign.
2 Convert to a DECIMAL value with a separate leading sign char-
acter.
3 Convert to a DECIMAL value with an embedded trailing sign.
4 Convert to a DECIMAL value with a separate trailing sign char-
acter.
DESCRIPTION
The longlong_to_dec( ) function converts a C long long value to an SQL DECIMAL value and
stores the converted value in a C array of type decimal.
For more information regarding the representation of SQL DECIMAL values in C arrays of
decimal, refer to the NonStop SQL/MP Programming Manual for C.
RETURN VALUES
Upon successful completion, the value 0 (zero) is returned. Otherwise, longlong_to_dec( )
returns one of the following values:
1 Indicates that significant digits of ll_val were truncated in the conversion. The
converted value exceeds the specified size of the decimal array.
527187-017 Hewlett-Packard Company 4−139