SAGQDECO
Description
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.
Examples
sagqdeco (
int sqllen,
int sqlprecision,
int sqlscale,
int sqllength
);

sqllen | Input | SQLVAR->SQLLEN to be decoded.
sqlprecision | Output | SQLPRECISION
sqlscale | Output | SQLSCALE
sqllength | Output | SQLLENGTH

C/C++
#include <aceapic.h>
sagqdeco (&API_OUTPUT_SQLDA->sqlvar[column].sqllen,
&API_SQLPRECISION,
&API_SQLSCALE,
&API_SQLLENGTH);
COBOL
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
PL/I
%INCLUDE aceapip ;
CALL sagqdeco(
API_OUTPUT_SQLDA_PTR->API_OUTPUT_SQLDA.SQLVAR(column).SQLLEN,
API_SQLPRECISION,
API_SQLSCALE,
API_SQLLENGTH) ;