Title: How do I migrate indexed files to a format that is supported by isCOBOL?
Question:

I have indexed files from my legacy application and want to migrate them to either isCOBOL JISAM or c-treeRTG. What are my options for doing this?

Answer:

There are two basic ways to migrate files to an isCOBOL ISAM file format such as isCOBOL JISAM or c-treeRTG. 
  1. Use a utility provided with the original ISAM file system to dump all of the records into a binary sequential file, and then use the corresponding utility from the target ISAM file system to load those records into an empty file. This method is known as "Unload/Load".

  2. Use the isCOBOL ISMIGRATE utility or run a COBOL program that reads records from the original ISAM file and writes them out to the target ISAM file.
First Method - Unload/Load

Here are the instructions for using the unload/load method to migrate for example a Vision file to isCOBOL JISAM:
  1. Run a program that creates an empty file in JISAM format. Just set iscobol.file.index=jisam and then OPEN OUTPUT and CLOSE the file.

  2. Unload the records from the Vision file into a binary sequential file

    vutil -unload

  3. Load the records from the binary sequential file into JISAM file

    java JUTIL -load
For example,
  1. Run a program to create the empty JISAM file:
           select jisamfile assign to "jisamfile"
                  organization indexed
                  record key jisamfile-key.
     
           fd jisamfile.
           01 jisamfile-rec.
            03 jisamfile-key pic 9(5).
            03 jisamfile-data pic x(100).
     
               set environment "file.index" to "jisam".
               open output jisamfile.
               close jisamfile.
    
  2. Run vutil -unload

    vutil32 -unload visionfile seqfile 

  3. Run JUTIL -load

    java JUTIL -load jisamfile seqfile 

    When you run vutil and JUTIL specify the ISAM file name without the extensions added by the file system (e.g. visionfile instead of visionfile.vix). 

    For further information see the documentation for vutil in the Acucorp docs and for JUTIL in the isCOBOL docs (User Guide : Utilities : JUTIL).
Second Method - ISMIGRATE

The ISMIGRATE utility can migrate files from and to any of the following file systems: isCOBOL JISAM, c-treeRTG, Acucorp's Vision and others.

The steps to run ISMIGRATE in background mode to migrate a Vision file to isCOBOL JISAM are as follows:
  1. Create an ismigrate.properties text file and copy/paste the following in it:

    iscobol.ismigrate_input_file_index=com.iscobol.io.ScanVision
    iscobol.ismigrate_output_file_index=jisam

  2. Run ISMIGRATE

    java -Discobol.conf=ismigrate.properties ISMIGRATE visionfile outputdirectory 

  3. If you prefer, you can run ISMIGRATE without parameters, so the wizard interface appears and you need to set the correct input file index type:
    "ACUCOBOL Vision (com.iscobol.io.ScanVision)" for Vision 
    "RM/COBOL (com.iscobol.io.ScanRMKF)" for RM files 
    "Micro Focus (com.iscobol.io.ScanMF)" from MF files 

  4. For further information on ISMIGRATE please review the documentation in the isCOBOL SDK User Guide.
Migrating to c-treeRTG

If you need to migrate to c-tree, the same instructions apply except for the following:

Unload/load method

  1. Set iscobol.file.index to ctreej

    iscobol.file.index=ctreej

    In the COBOL program that creates the empty file

    set environment "file.index" to "ctreej".

  2. Instead of JUTIL, use ctutil as follows:

    ctutil -load /datadirectory/ctreefile seqfile -b

    Note: Unless configured otherwise, ctreeRTG uses the directory where the server (ctreesql) was started as the data directory. Paths are relative to that directory. If you get errors running ctutil, then try specifying the c-tree filename using an absolute path, but still without the file extension.

ISMIGRATE method

  1. Set the iscobol.ismigrate_output_file_index to ctree in the ismigrate.properties file

    iscobol.ismigrate_output_file_index=ctreej

  2. If running ISMIGRATE with the wizard interface, choose "c-tree RTG - Java Interface (ctreej)" in the destination indexed file type.
Authored by: Veryant Support on Fri, Aug 28th, 2009 at 7:00 PM
This question has been viewed 16459 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=8

Powered by PHPKB Knowledge Base Software