Variable Length Records

From: <amerar_at_iwc.net>
Date: Wed, 6 Feb 2008 09:12:19 -0800 (PST)
Message-ID: <4b75747b-6f1f-4d1c-9000-b38dbecf8638@q39g2000hsf.googlegroups.com>

Hi Again,

Sorry to ask another question, but this is a hard one. I'm trying to replace all the reading of flat files (UTL_FILE.GET_LINE) with external tables.

We have a file with variable length records. I do not think that is an issue with external tables.

What is a problem is how they reference the different fields in the data file line:

recnt_flag := LTRIM ( SUBSTR ( line, (loop_cnt * 24 + 113) + 1, 1) );
chg_ind := LTRIM ( SUBSTR ( line, (loop_cnt * 24 + 114) + 1, 1) );
chg_dayoffset := LTRIM ( SUBSTR ( line, (loop_cnt * 24 + 115) + 1, 1) );
cnfrm_dayoffset := LTRIM ( SUBSTR ( line, (loop_cnt * 24 + 118) + 1, 1) );
broker_code := LTRIM ( SUBSTR ( line, (loop_cnt * 24 + 121) + 1, 1) );

So, it is a loop, with a calculated position. I highly doubt that can be done in a table...... Received on Wed Feb 06 2008 - 11:12:19 CST

Original text of this message