SQL/MP Programming Manual for COBOL

SQL/MP Sample Database
HP NonStop SQL/MP Programming Manual for COBOL529758-003
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 COBOL85 TO COPYLIB (DEPT) ;
For more information about SQLCI, see the SQL/MP Reference Manual.
The COPYLIB was edited to change the descriptions generated from VARCHAR
columns to fixed-length data item descriptions, which are more appropriate for COBOL
applications. 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) *
*****************************************************
?SECTION EMPLOYEE
* Record Definition for \SYS1.$VOL1.PERSNL.EMPLOYEE
* Definition current at 17:09:06 - 10/10/94
01 EMPLOYEE.
02 EMPNUM PIC 9(4) COMP.
02 FIRST-NAME PIC X(15).
02 LAST-NAME PIC X(20).
02 DEPTNUM PIC 9(4) COMP.
02 JOBCODE PIC 9(4) COMP.
02 SALARY PIC 9(6)V9(2) COMP.
?SECTION DEPT
* Record Definition for \SYS1.$VOL1.PERSNL.DEPT
* Definition current at 17:09:07 - 10/10/94
01 DEPT.
02 DEPTNUM PIC 9(4) COMP.
02 DEPTNAME PIC X(12).
02 MANAGER PIC 9(4) COMP.
02 RPTDEPT PIC 9(4) COMP.
* 02 LOCATION. <-- VARCHAR edited to be fixed-length
item.
* 03 LEN PIC S9(4) COMP.
* 03 VAL PIC X(18).
02 LOCATION PIC X(18).
?SECTION JOB
* Record Definition for \SYS1.$VOL1.PERSNL.JOB
* Definition current at 17:09:09 - 10/10/94
01 JOB.
02 JOBCODE PIC 9(4) COMP.
* 02 JOBDESC. <-- VARCHAR edited to be fixed-length
item.
* 03 LEN PIC S9(4) COMP.
* 03 VAL PIC X(18).
02 JOBDESC PIC X(18).