Previous Topic: OverviewNext Topic: Converting DBOMP Load and Maintenance Programs


Converting Data

To convert and transfer data from a DBOMP database to a CA IDMS/DB database, you write a conversion program that issues calls to DBOMP and to IDMSDBLU.

Note: For more information on IDMSDBLU, see the FASTLOAD section in the CA IDMS Utilities Guide.

What the Conversion Program Does

A conversion program does the following:

Note: It is recommended that you retain low-level codes when you transfer DBOMP data to a CA IDMS/DB database. If you want to retain sequential dependencies, convert and transfer the DBOMP data as outlined above and describe the record as being stored via its owner, as described under the clause via set-name set of the record statement of Schema statements in the Database Administration manual. To keep all occurrences of a given record type in physical sequence, they must be stored via a system owned index.

COBOL Example of Conversion Program

The following is an example of a COBOL program that converts DBOMP data to CA IDMS/DB records and loads them into the CA IDMS/DB database.

data division.
working-storage section.
01 dbomp-item.
   03 item-pi.
   03 item-key.

01 CA IDMS/db-item             Refer to CA IDMS Utilities Guide 
   03 part-no.                 for information on occurrence descriptors. 
01 dbomp-prodstr.

01 idms-prodstr.

01 dbomp-workctr.

01 idms-workctr.
   03 work-no.

01 dbomp-routing.

01 idms-routing.

01 owner-1.                    Refer to CA IDMS Utilities Guide 
   03 set-1.                   for information on owner descriptors. 
   03 key-1.
01 owner-2.
   03 set-2.
   03 key-2.

procedure division.
   call 'bmpeof' using dbomp-item end-job.
next-item.
   call 'bmpget' using dbomp-item.
   reformat dbomp-item, giving idms-item 
   call 'idmsdblu' using idms-item.
   move part-no to key-1.
   move 'item-struct' to set-1.
   move 'where-used' to set-2.
next-structure.
   end-of-chain go to first-route.
   call 'chase' using anlnk nxlnk addnf dbomp-prodstr dbomp-item.
   reformat dbomp-prodstr, giving idms-prodstr 
   move part-no to key-2.
   call 'idmsdblu' using idms-prodstr owner-1 owner-2.
   go to next-structure.
first-route.
   move key-1 to item-key.
   move 'mran' to item-pi.
   call 'bmpcall' using dbomp-item.
   move 'item-routing' to set-1.
   move 'work-routing' to set-2.
next-route.
   end-of-chain go to next-item.
   call 'chase' using anlnk nxlnk addnf dbomp-routing dbomp-workctr.
   reformat dbomp-routing, giving idms-routing 
   call 'idmsdblu' using idms-routing owner-1 owner-2.
   reformat dbomp-workctr, giving idms-workctr 
   call 'idmsdblu' using idms-workctr.
   go to next-route.