Scope of inline usage of IDXFORMAT.
What happens with IDXFORMAT when combining its usages and using it
- as a compile time directive.
- as an inline directive.
- it inside a file handler configuration file.
This is a complex example but hopefully shows how
the IDXFORMAT directive and
the external file handler IDXFORMAT option
can be used together.
This examples shows
- A compile directive IDXFORMAT will override a file handler configuration file IDXFORMAT.
- An inline directive will affect all index files declared below it in the source file.
- Other coding techniques like copy with the replace statement and piped file input and output.
OUTPUT from running doit.sh
Here is a doit.sh script that will create several files and will show what the IDXFORMAT of the files is set to.
This demo is using Visual COBOL using a UNIX platform.
To download the doit.sh script, click the link and save as < doit.sh > then
Create a test directory.
Cut and paste doit.sh script into this directory
You need to change the doit.sh to have the location of your Cobol installation.
Then execute the doit.sh script.
Look at the listings after running to see the copy book statements working with the replace statements.
Look at the EXTFH config file, to see how to make the C-ISAM file the default, as some old systems use this.