SQL Programming Manual for TAL

Error and Status Processing
HP NonStop SQL Programming Manual for TAL527887-001
6-11
Getting Performance and Statistics Information
Figure 6-5 shows the SQLSA structure generated in a TAL program by the INCLUDE
SQLSA directive. NonStop SQL generates this structure and inserts it in the program
following the INCLUDE SQLSA directive.
Table 6-3
describes the fields in the SQLSA data structure.
Figure 6-5. SQLSA Structure Description
Table 6-3. SQLSA Fields (page1of3)
Field Name Description
EYE^CATCHER Identification field, set by the system to SA.
VERSION Current version of the SQLSA; subsequent NonStop SQL
software releases can change this version ID.
DML Structure where statistics on DML statement execution are
returned.
STRUCT .sqlsa;
BEGIN
STRING eye^catcher[0:1];
INT version;
STRUCT dml;
BEGIN
INT num^tables;
STRUCT stats[0:15];
BEGIN
STRING table^name[0:23];
INT(32) records^accessed;
INT(32) records^used;
INT(32) disc^reads;
INT(32) messages;
INT(32) message^bytes;
INT waits;
INT escalations;
STRING sqlsa^reserved[0:3];
END; -- stats
END; -- dml
STRUCT prepare = dml;
BEGIN
INT input^num;
INT input^names^len;
INT output^num;
INT output^names^len;
INT name^map^len;
INT sql^statement^type;
END; -- prepare
END; -- sqlsa
VST0605.vsd