Problem:
Background information:
Indexed files in Micro Focus COBOL can have different formats or organizations. An indexed file's format is decided at the time the file is created, under the control of the IDXFORMAT compiler directive.
The default IDXFORMAT value is "1", meaning "C-ISAM", whereas the value "4" means, "an optimized form of Micro Focus indexed file format". Here is a table summarizing common formats:
1 C-ISAM format.
3 Micro Focus indexed file format.
4 An optimized form of Micro Focus indexed file format, for fast duplicate key handling.
8 Large indexed.
Once a file is created with a certain format, it retains that format for life (unless it is converted using the "rebuild" command). For more information, look in the main index of the Server Express documentation, under the keyword "IDXFORMAT", and check each of the references there.
In this case, a customer's COBOL application opens several data files simultaneously. In the past the files were all IDXFORMAT"4" but now some of them are expected to grow large, so the customer intends to convert some of them to IDXFORMAT"8".
The question is, must all files be converted to the same format, or can a COBOL program simultaneously handle files having a mixture of different file formats?
Resolution:
The answer is that the COBOL system can simultaneously handle a mixture of file formats. When a COBOL program opens an existing file, it examines the file (especially the header) to determine the file format, then it handles the file according to that format for the rest of the run unit. If several files are opened, it handles each according to its format.
A customer considering converting an application's data files need not convert them all at once; a few files can be converted at a time and others can remain in their original format.
#AcuCobol
#ServerExpress
#RMCOBOL
#netexpress
#COBOL




