How do I set iscobol.file.index.FileName with variable file name assignments?


Question:

The ASSIGN TO name in my SELECT statement is a variable.
How can I set iscobol.file.index.FileName in the properties file when the file name is determined by the program at run time?

Answer:

The solution is to set the iscobol.file.index.FileName property programmatically. For example,

   ...
   77 file-name pic x(100).
   77 property-name pic x(100).
   ...
   
   string "file.index.", 
          file-name delimited by spaces 
          into property-name.
   set environment property-name to "easydb".

Notice that when you set an isCOBOL property using the SET verb, you do not specify the "iscobol." prefix in the variable name.



Article ID: 80
Created: September 2, 2009
Last Updated: January 27, 2023
Author: Support KB Author

Online URL: https://support.veryant.com/support/phpkb/article.php?id=80