SQL/MP Programming Manual for C

SQL/MP Sample Database
HP NonStop SQL/MP Programming Manual for C429847-008
A-3
Example A-1 shows the COPYLIB file containing the record descriptions of the sample
database tables. This file was generated using INVOKE directives executed from
SQLCI. For example, this INVOKE directive generates the DEPT table:
INVOKE PERSNL.DEPT FORMAT C TO COPYLIB (DEPT);
For more information about SQLCI, see the SQL/MP Reference Manual. For a
description of the SUPPKANJ table, see the ZTSQLMSG.DOCUMENT file.
Example A-1. COPYLIB File for Sample Database (page 1 of 3)
/* Personnel (PERSNL) */
/* */
#pragma SECTION EMPLOYEE
/* Record Definition for \SYS1.$VOL1.PERSNL.EMPLOYEE */
/* Definition current at 09:53:58 - 11/10/96 */
struct employee_type {
unsigned short empnum;
char first_name[16];
char last_name[21];
unsigned short deptnum;
unsigned short jobcode;
unsigned long salary; /* scale is 2 */
};
#pragma SECTION DEPT
/* Record Definition for \SYS1.$VOL1.PERSNL.DEPT */
/* Definition current at 09:54:00 - 11/10/96 */
struct dept_type {
unsigned short deptnum;
char deptname[13];
unsigned short manager;
unsigned short rptdept;
struct {
short len;
char val[19];
} location;
};
#pragma SECTION JOB
/* Record Definition for \SYS1.$VOL1.PERSNL.JOB */
/* Definition current at 09:54:02 - 11/10/96 */
struct job_type {
unsigned short jobcode;
struct {
short len;
char val[19];
} jobdesc;
};
/* */
/* Sales (SALES) */
/* */