Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Cobol redefine in SQL
At 13:34 26-11-03 -0800, you wrote:
>Hi all,
>
>We'll do a conversion from IMS to Oracle (817).
>The conversion team wants to move data on Oracle then processed it.
>
>Off course, in the file format, the cobol redefine command is used on a
>filler field (20 times). There is also a redefine command in a redefine
>command.
>
>For the younger ones, it means a zone (50 caracters) that can be defined
>in many ways depending on a key : 2 fields of 25 char or 5 fields of 10
>char or ....
>
>The programmers can always use substring to death to work this out but I
>was wandering if there was a more elegant and a less error prone solution,
>maybe using a record type or a function ...
>
>
>
>Stephane Paquette
Hi Stephane,
How are you loading the data into the Oracle database? Do you use SQL*Loader? Go to the manual and look at the examples, it is quite straightforward defining multiple record layouts, and have them loaded into defferent tables. This can be done based on the record-type indicator which will be in the record. You can handle your redefines and repeating groups with SQL*Loader.
Last year I've written a kind of replication mechanism which replicates a Cobol C-Isam system into an Oracle database on a daily basis. Different record layouts can be stored in differend tables, or in the same table in different columns. The latter I do not recommend. This will giive you a nice headstart converting the data into the ultimate datamodel.
Regards, Carel-Jan
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Carel-Jan INET: cjpengel.dbalert_at_xs4all.nl Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Nov 26 2003 - 16:29:25 CST