Can the file system (iscobol.file.index) be set programmatically?
Question ID : 90
Created on 2009-09-02 at 2:02 PM
Author : Veryant Support [firstname.lastname@example.org]
Online URL : http://support.veryant.com/support/phpkb/question.php?ID=90
Can I set the iscobol.file.index or iscobol.file.index.FileName variables inside my COBOL program? With ACUCOBOL I can set the corresponding variables using SET ENVIRONMENT. Can I do the same with isCOBOL?
My application reads a file which has information about which file system to use for each data file. Some data files are Vision. Others are in Oracle. My application allows the user to choose which files to create in the database. So I need to set this programmatically. How do I do that in isCOBOL?
You can set 'file.index' and 'file.index.filename' using SET ENVIRONMENT.
When you use SET ENVIRONMENT you must not write 'iscobol.' at the beginning of the property name.
Another way to associate file handlers to your files is by using the CLASS clause in FILE-CONTROL. This allows to act on the logical-name instead of the physical-name of the file.
Back to Original Question