This article provides information on how to set the directories where the RM/COBOL Runtime will search for COBOL object, data, and library files.
Problem:
When deploying an application it is sometimes necessary to place COBOL objects, data, and library files in different directories. Since, by default, the Runtime only searches the current working directory for files, you will need to configure the file search path (RUNPATH) in order to instruct the Runtime to search alternate directory paths.
Resolution:
- UNIX/WINDOWS: Create an environment variable named "RUNPATH", and, set it equal to the directory path(s) where your files are located. On Windows platforms, separate the directory paths with a semicolon (;). On Unix platforms separate the directory paths with a colon (:).
-
WINDOWS ONLY: Create a synonym named RUNPATH using the RM/COBOL Configuration (rmconfig.exe) Utility. Start the RM/COBOL Configuration Utility by clicking on the Registry Configuration icon in the RM/COBOL Start Menu group. From there, select the Synonyms Properties tab, and create a new synonym named "RUNPATH". Set your RUNPATH synonym equal to the directory path(s) where your files are located. Separate the directory paths with a semicolon (;).
Note: Each program and user account can have its own configuration settings.
- WINDOWS ONLY: Right-click the mouse button on a .cbl file and select the Properties from the right-click menu. Next, select the Synonyms Properties tab, and create a new synonym named "RUNPATH". Set your RUNPATH synonym equal to the directory path(s) where your files are located. Separate the directory paths with a semicolon (;).
On Windows platforms the RUNPATH synonym will supersede the RUNPATH environment variable.