Search code examples
openedgeprogress-4gl

Variable file name for an include file


I have an application using Openedge that has 3 environments: live, test and training. I’ve inherited a number of 4GL programs that need to be converted from a legacy version of the application that uses include files. The include files currently reside in a shared directory but will need to be placed in directories specific to the environment for the new version I’m working with (/live/files, /test/files, /train/files). Is there a valid function to set the include file with a variable file name?

I have a way to query the environment name in the 4GL code to set the path but using VALUE() in the include statement doesn’t work. The output mentioned not being able to find a file name called VALUE().


Solution

  • The correct way to do this in my opinion would be to add /live, /test, /train to the PROPATH in that environment. Then you can reference the include file with files/filename.i.