Title: Did you know you can use an alias to map a different disk file name to an existing "assign to" clause of the select statement without source code changes?

To do so, you need to add 2 new properties to your configuration file:

iscobol.file.env_naming=true
iscobol.=

where:

is the physical file name declared in the "assign to" clause of the "select". You need to specify the name with some normalization: you need to replace "-" with "_" and the name must be written in lower case

is the actual file name on the file system

For example, in the file with the following select

       select FILE1 assign to "file-1"
           organization indexed
           access dynamic
           record key f1-key
           status file-status
           .

the following properties must be set to use the new name "new-file-1"

iscobol.file.env_naming=true
iscobol.file_1=new-file-1

If the "assign to" contains a full or a relative path name, the path needs to be specified in the properties.

For example

       select FILE1 assign to "subdir/file-1"
           organization indexed
           access dynamic
           record key f1-key
           status file-status
           .
iscobol.file.env_naming=true
iscobol.subdir/file_1=subdir/new-file-1
Authored by: Veryant Support on Mon, May 30th, 2016 at 7:00 PM
This question has been viewed 2193 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=273

Powered by PHPKB Knowledge Base Software