cob2sql program
converts Cobol statements like e.g.:
10 COMPANY PIC X(4).
10 APP-NBR-S PIC X.
10 APP-NBR PIC 9(10)V.
10 SCR-MATRIX-S PIC X.
10 SCR-MATRIX PIC 9(2)V.
10 BONE-CUST-CDE PIC X(3).
10 BONE-CK1-CDE PIC X(3).
10 BONE-CK2-CDE PIC X(3).
10 BONE-SAV1-CDE PIC X(3).
10 BONE-SAV2-CDE PIC X(3).
10 ITM-PRINFIN-AMT-S PIC X.
10 ITM-PRINFIN-AMT PIC 9(7)V9(2).
10 CLO-NOTE-DT PIC X(10).
10 CLO-IPYMT-DUEDT PIC X(10).
10 CLO-ADVANCE-DT PIC X(10).
10 CLO-RPYMT-DUEDY-S PIC X.
10 CLO-RPYMT-DUEDY PIC 9(2)V.
10 CLO-APPRVD-RTE-S PIC X.
10 CLO-APPRVD-RTE PIC 9(2)V9(3).
into either a syntax for SQL CREATE TABLE command
(if used with '-s' flag):
COMPANY VARCHAR2(4),
APP_NBR_S CHAR(1),
APP_NBR NUMBER(10,0),
SCR_MATRIX_S CHAR(1),
SCR_MATRIX NUMBER(2,0),
BONE_CUST_CDE VARCHAR2(3),
BONE_CK1_CDE VARCHAR2(3),
BONE_CK2_CDE VARCHAR2(3),
BONE_SAV1_CDE VARCHAR2(3),
BONE_SAV2_CDE VARCHAR2(3),
ITM_PRINFIN_AMT_S CHAR(1),
ITM_PRINFIN_AMT NUMBER(9,2),
CLO_NOTE_DT VARCHAR2(10),
CLO_IPYMT_DUEDT VARCHAR2(10),
CLO_ADVANCE_DT VARCHAR2(10),
CLO_RPYMT_DUEDY_S CHAR(1),
CLO_RPYMT_DUEDY NUMBER(2,0),
CLO_APPRVD_RTE_S CHAR(1),
CLO_APPRVD_RTE NUMBER(5,3),
or into a syntax for SQL*Loader control file (if used with '-l' flag):
COMPANY POSITION(1:4) NULLIF (1:4)=BLANKS,
APP_NBR_S POSITION(5:5) NULLIF (5:5)=BLANKS,
APP_NBR POSITION(6:15) INTEGER EXTERNAL NULLIF (6:15)=BLANKS,
SCR_MATRIX_S POSITION(16:16) NULLIF (16:16)=BLANKS,
SCR_MATRIX POSITION(17:18) INTEGER EXTERNAL NULLIF (17:18)=BLANKS,
BONE_CUST_CDE POSITION(19:21) NULLIF (19:21)=BLANKS,
BONE_CK1_CDE POSITION(22:24) NULLIF (22:24)=BLANKS,
BONE_CK2_CDE POSITION(25:27) NULLIF (25:27)=BLANKS,
BONE_SAV1_CDE POSITION(28:30) NULLIF (28:30)=BLANKS,
BONE_SAV2_CDE POSITION(31:33) NULLIF (31:33)=BLANKS,
ITM_PRINFIN_AMT_S POSITION(34:34) NULLIF (34:34)=BLANKS,
ITM_PRINFIN_AMT POSITION(35:43) FLOAT EXTERNAL NULLIF (35:43)=BLANKS,
CLO_NOTE_DT POSITION(44:53) NULLIF (44:53)=BLANKS,
CLO_IPYMT_DUEDT POSITION(54:63) NULLIF (54:63)=BLANKS,
CLO_ADVANCE_DT POSITION(64:73) NULLIF (64:73)=BLANKS,
CLO_RPYMT_DUEDY_S POSITION(74:74) NULLIF (74:74)=BLANKS,
CLO_RPYMT_DUEDY POSITION(75:76) INTEGER EXTERNAL NULLIF (75:76)=BLANKS,
CLO_APPRVD_RTE_S POSITION(77:77) NULLIF (77:77)=BLANKS,
CLO_APPRVD_RTE POSITION(78:82) FLOAT EXTERNAL NULLIF (78:82)=BLANKS,
phystech@hotmail.com
©1998 PhysTech, Inc. All rights reserved. Last change: June 26, 1998