SQL Programming Manual for TAL

Error and Status Processing
HP NonStop SQL Programming Manual for TAL527887-001
6-15
Declaring the SQLDA and Names Buffer
Figure 6-6 and Figure 6-7 on page 6-16 show structure templates generated by the
INCLUDE SQLDA directive for NonStop SQL Release 1 and Release 2.
Figure 6-6. Release C30 SQLDA Template and Names Buffer
LITERAL SQLDA^EYE^CATCHER = "D1";
STRUCT sqlda-name (*) ;
BEGIN
STRING eye^catcher[0:1];
INT num^entries;
STRUCT sqlvar[0: sqlvar-count - 1];
BEGIN
INT data^type;
INT data^len;
! fields for NUMBERS:
! scale = data^len.<0:7>
! length = data^len.<8:15>
! fields for DATETIME or INTERVAL:
! qualifier = data^len.<0:7>
! length = data^len.<8:15>
INT precision;
! fields for DATETIME or INTERVAL:
! leading field precision = precision.<0:7>
! fraction precision = precision.<8:15>
INT null^info;
INT(32) var^ptr;
INT(32) ind^ptr;
FIXED reserved;
END;
END;
STRING . names-buffer-name[ 0 : length - 1 ];
VST0606.vsd