Problem:
Application uses the extfh.cfg file with IDXNAME=0. The apllication interfaces with a 3rd party vendors application that used MF 5.0 with IDXNAME=1.
The 3rd party vendor uses a MF 5.0 Cobol program to create CISAM files. That program generates cisam files with the format <file name>.DAT and <file name>.DAT.idx.
The mainline application uses IDXNAME=0 and creates CISAM files with naming convention of <file name>.DAT and <file name>.idx.
What is the proper procedure for making an application that uses IDXNAME=0 call a subprogram from another vendors application that is using IDSNAME=1?
Resolution:
There are two methods of using files that have been created using differing naming conventions:
1) COPY or rename one of the sets of files to use names and extensions that agree with the naming convention you want to use when the application executes.
2) Dynamically alter the naming convention during program execution, this will require making a CALL to "CBL_CFGREAD_EXTFH" ,
The API for this call is documented in the Server Express documentation and it looks like this:
call "CBL_CFGREAD_EXTFH" using cfgfilename
Where cfgfilename is the name for the file handler configuration file which you would like to set as active now.
There is an example of this method attached which can be downloaded and tested.
Attachments:
#ServerExpress
#RMCOBOL
#COBOL
#netexpress
#AcuCobol