Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: COBOL flat file to Oracle
On Wed, 15 Apr 1998 13:42:57 -0600, Abeeda_Mohammed_at_xn.xerox.com
wrote:
>Hello,
>
>I have a COBOL layout in which each field is defined as an array which occurs
>84 times.i.e Gross_qty occurs 84 times, net_qty occurs 84 times etc; I have
>to load this into an Oracle table. Is there a way to define arrays in Oracle
>tables ?
Define as oracle variables
01 ROWS-LOADED PIC S9(4) COMP. 01 GROSS-QTY PIC S9(8) COMP-3 OCCURS 84. Execute procedure MOVE WS-COUNTER TO ROWS-LOADED. EXEC SQL WHENEVER SQLERROR GOTO XXX99-ERROR END-EXEC. EXEC SQL FOR :ROWS-LOADED INSERT INTO X_TABLE (QTY_COLUMN), VALUES (:GROSS-QTY) END-EXEC.
Tom Skinner Received on Wed Apr 15 1998 - 23:47:27 CDT