sagqdeco (
int sqllen,
int sqlprecision,
int sqlscale,
int sqllength
);
The SAGQDECO function decodes the sqllen of decimal and numeric SQL data type columns into three components: sqlprecision, sqlscale and sqllength. The values for sqlprecision and sqllength are interchangeable.
sqllen |
Input |
SQLVAR->SQLLEN to be decoded. |
sqlprecision |
Output |
SQLPRECISION |
sqlscale |
Output |
SQLSCALE |
sqllength |
Output |
SQLLENGTH |
#include <aceapic.h>
sagqdeco (&API_OUTPUT_SQLDA->sqlvar[column].sqllen,
&API_SQLPRECISION,
&API_SQLSCALE,
&API_SQLLENGTH);
All parameters must be declared as COMP-5.
COPY ACEAPIB.
CALL "SAGQDECO" USING
BY REFERENCE SQLLEN OF SQLVAR OF API-OUTPUT-SQL(column)
BY REFERENCE API_SQLPRECISION
BY REFERENCE API_SQLSCALE
BY REFERENCE API_SQLLENGTH
%INCLUDE aceapip ;
CALL sagqdeco(
API_OUTPUT_SQLDA_PTR->API_OUTPUT_SQLDA.SQLVAR(column).SQLLEN,
API_SQLPRECISION,
API_SQLSCALE,
API_SQLLENGTH) ;