support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > Data Access > Handling the extension on indexed data files
Question Title Handling the extension on indexed data files

The extension on indexed data files may become an issue especially when coming from other legacy COBOL brands.
Here we will analyze the different alternatives isCOBOL provides to handle the extension and how it affects several areas of the application during migration, maintenance and deployment time.

First: Migrating indexed data files that already contain an extension (.dat for example).

Whether the indexed data file comes in a single .dat file or on a dual form of .dat and .index (the .index extension may vary from COBOL to brand to brand) the main case is when the SELECT statement explicitly and static or dynamically defines the physical name with the .dat extension.
Something like:

    select myfile assign to random "myfile.dat" ...
Or like:
    select myfile assign to ws-filename ...
    procedure division. 
       Move "myfile.dat" to ws-filename 
       Open input myfile 
On this case the physical file migrated to Jisam or C-Tree, ends up having what looks like a double extension: myfile.dat.dat and myfile.dat.idx
This could be avoided by running the ISMIGRATE utility with the following option enabled:

If ISMIGRATE is used in background (called from a cobol program), the following runtime property should be set:

iscobol.ismigrate_strip_extension=1
And, to avoid having to change the select statement on the copybooks and/or programs, the following runtime property should be used to run the programs:
iscobol.file.index.strip_extension=1 

Second: Create an indexed data file from scratch using Jisam or C-tree directly.

In this case it's better to avoid the .dat extension in the physical filename on the select, so Jisam or C-Tree will by default generate the .dat extension for the data file part and the .idx on the index file.
For example this Select:

    select myfile assign to  "myfile" ...
will create: myfile.dat and myfile.idx There are 2 runtime properties that allow to customize these extensions for the indexed data files. For example using:
iscobol.file.index.data_suffix=
iscobol.file.index.index_suffix=.fil
the same Select will create: myfile and myfile.fil

Authored by: Veryant Support This question has been viewed 424 times so far.
Click Here to View all the questions in Data Access category.
File Attachments File Attachments
There are no attachment file(s) related to this question.
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. File Types Comparison : isCOBOL - Micro Focus COBOL - ACUCOBOL-GT - RM/COBOL
  2. How do I interpret file status 9? and other EXFS extended file status codes (e.g. 9i,105)?
  3. What format does isCOBOL use for ORGANIZATION RELATIVE files?
  4. What is 9l,10 error and why is it happening?
  5. Does isCOBOL supports Data General file status codes?
  6. Can we use Micro Focus data format and indexed files directly or do they need some type of conversion?
  7. Can I install the UDBC 32 bit on my 64 bit computer in order to have the Veryant * driver for ODBC32 bits Administrator?
  8. Can I call from an isCobol program a stored procedure?
  9. Why do I get the error message “java.lang.ClassNotFoundException: ctree2" ?
  10. Why do I get 'ct_init ERROR 19:133:0' ?
  11. Did you know you can use an alias to map a different disk file name to an existing "assign to" clause of the select statement without source code changes?
  12. Did you know you can encrypt an indexed file?
  13. How to hide the user and password used to connect to an RDBMS
Article Information Additional Information
Article Number: 299
Created: 2019-03-15 8:47 AM
Rating: No Rating
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.