SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)

C Sample Programs
HP NonStop SQL/MX Programming Manual for C and COBOL523627-004
A-29
Using SQL Descriptor Areas to Select SQL/MP
KANJI and KSC5601 Data
Using SQL Descriptor Areas to Select SQL/MP KANJI and
KSC5601 Data
Example A-10 on page A-30 selects KANJI and KSC5601 data from SQL/MP tables by
using SQL descriptor areas.
(3,
_UCS2'Allen Jones',
_UCS2'LA Blvd',
_UCS2'Houston',
_UCS2'USA',
'39189'
);
DROP TABLE usa_customer;
CREATE TABLE usa_customer (
custnum numeric(4) unsigned
no default not NULL not droppable,
custname CHARACTER(18)
no default not NULL not droppable,
street CHARACTER(22)
no default not NULL not droppable,
city CHARACTER(14)
state CHARACTER(12)
no default not NULL not droppable,
postcode CHARACTER(10)
no default not NULL not droppable,
credit CHARACTER(2) default 'c1'
not NULL not droppable,
primary key (custnum) not droppable
);
INSERT INTO usa_customer values
(1,
'John Smith',
'102 Main Street',
'Houston',
'TX',
'56789',
'C1'
),
(2,
'John Smith',
'102 Jefferson Street',
'Cupertino',
'CA',
'23189',
'C1'
),
(3,
'Allen Jones',
'LA Blvd',
'Richmond',
'VA',
'39189',
'C1'
);
Example A-9. DDL for KANJI and KSC4501 Table Columns (page2of2)