How to use the ADISCTRL file in a different folder?
In general, the ADISCTRL file is placed in the same folder as the application, and it gets picked up automatically at execution time. What if this file is located in a different folder?
The main reason for having the ADISCTRL file in a different folder is when multiple applications are using this same file. It then becomes easier to manage one single file instead of managing the same copy in each one of the application folders.
There is one location in Visual COBOL or COBOL Server where the file can be picked up automatically, and that location is %COBDIR%\etc\
If the ADISCTRL file must be in a location other than the application folder and %COBDIR\etc, then setting the dd_ADISCTRL environment variable to point to the ADISCTRL file (not to its location) will allow the COBOL runtime to find it, e.g.
Note: The COBDIR environment variable (i.e. %COBDIR%) can only be used to point to the location of the COBOL system folder in Visual COBOL or COBOL Server.