Problem:
Unable to open files that have embedded colons (:) in the filename when assigning these files via an environment variable.
The SELECT phrase assigns the file names as EXTERNAL and they are set via an environment variable to point to the physical file.
This used to work fine in OCDS v4.1 but now fails in Server Express.
Resolution:
The problem is that we treat the colon as a multi-path separator. If the colon would be in a working-storage variable instead of an environment variable, this would work.
This work-around will work for assinging these filenames via an environment variable:
So lets say you set an environment variable called INFILE:
INFILE=abc:def.dat
In the program you use to have:
SELECT BLABLA ASSIGN TO EXTERNAL INFILE
You would change the SELECT statement as follows instead:
SELECT BLABLA ASSIGN TO DYNAMIC WS-INFILE
You would then add these 2 lines before you open the file for the first time (this will read the contents of the INFILE environment variable and copy them to the WS-INFILE variable):
DISPLAY 'INFILE' UPON ENVIRONMENT-NAME
ACCEPT WS-INFILE FROM ENVIRONMENT-VALUE