NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-104
Examples—CONVERT
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. The following 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 the following 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