SQL Programming Manual for TAL
Host Variables and Parameters
HP NonStop SQL Programming Manual for TAL—527887-001
2-22
Creating Host Variables With the INVOKE Directive
The generated structure template is:
struct types^rec(*);
BEGIN
string a^char[0:9];
struct b^varchar;
begin
int len;
string val [0:9];
end;
To use the table in your program, declare a structure as:
STRUCT .tbl(types^rec); ! Declare an instance, tbl, of
! the template, types^rec
int c^num4^s;
int d^num4^u /SMALLINT UNSIGNED/;
int(32) e^num9^s; !scale is 2
int(32) f^num9^u /INTEGER UNSIGNED/; !scale is 2
fixed(2) g^num18^s; !scale is 2
int h^small^s;
int j^small^u /SMALLINT UNSIGNED/;
int(32) k^int^s;
int(32) l^int^u /INTEGER UNSIGNED/;
fixed(0) m^large^s;
string n^dec^s [0:17] /DECIMAL(18)/; !scale is 2
string o^dec^u [0:8] /DECIMAL(9)UNSIGNED/; !scale is 2
int(32) p^cob^p9 /INTEGER UNSIGNED/;
string q^cob^px [0:9];
string z^long [0:19];
real a^dbl;
real(64) b^dbl;
real c^dbl;
real(64) d^dbl;
string a^dt^time [0:9];
string b^dt^time [0:9];
string c^dt^time [0:7];
string d^dt^time [0:25];
string e^dt^time [0:6];
END;