SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-109
Examples—CONVERT
subvolume $VOL1.SALES. ORDERTAB resides on the current default subvolume 
and is described by the record definition ORDER in a DDL dictionary. The SQL 
catalog in which you want ORDERS to be described also resides on the 
subvolume $VOL1.SALES. This command creates an EDIT file named CNVSRC 
that contains the commands needed to perform the conversion:
>> CONVERT RECORD ORDER TO TABLE $VOL1.SALES.ORDERS
>+ CATALOG $VOL1.SALES;
CNVSRC contains these commands:
?SECTION CREATE_ORDERS
CREATE TABLE \NODE.$VOL1.SALES.ORDERS
( ORDERNUM PIC 9(3) NOT NULL,
 MONTH PIC 9(2) NOT NULL,
 DAY PIC 9(2) NOT NULL,
 YEAR PIC 9(2) NOT NULL,
 MONTH2 PIC 9(2) NOT NULL,
 DAY2 PIC 9(2) NOT NULL,
 YEAR2 PIC 9(2) NOT NULL,
 SALES_PERSON PIC X(4) NOT NULL,
 BRANCHNUM INTEGER
 DEFAULT 9999,
 CUSTNAME VARCHAR(30)
 DEFAULT "INTERNAL" NOT NULL,
 CUSTNUM PIC 9(4) NOT NULL,
 STATUS PIC X(8)
 DEFAULT "ON HOLD" NOT NULL,
 TOTAL_AMOUNT PIC 9(5)V9(2),
 PRIMARY KEY ORDERNUM
)
 ORGANIZATION KEY SEQUENCED
 CATALOG \NODE.$VOL1.SALES
 BLOCKSIZE 4096
 EXTENT (4,32)
 MAXEXTENTS 100
 TABLECODE 0
 NO AUDIT
 NO CLEARONPURGE
 NO DCOMPRESS
 NO ICOMPRESS
 NO SERIALWRITES
 NO VERIFIEDWRITES
 NO BUFFERED;
CREATE INDEX \NODE.$VOL1.SALES.ORDERS0
 ON \NODE.$VOL1.SALES.ORDERS (CUSTNUM)
 CATALOG \SYSTEM.$VOL1.SALES
 KEYTAG "oc"
 EXTENT (4,32)
 MAXEXTENTS 100;
?SECTION LOAD_ORDERS
LOAD \NODE.$VOL3.DDL.ORDERTAB, \SYSTEM.$VOL1.SALES.ORDERS,
SOURCEDICT \NODE.$VOL3.DDL,










