Kbase P105304: OUTPUT TO <direcory name> throws error 98 with errno=21 on Unix, errno=13 on Windows
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/13/2008 |
|
Status: Verified
SYMPTOM(s):
OUTPUT TO <direcory name> throws error 98 with errno=21 on Unix
** Unable to open file: <file-name>. Errno=21. (98)
OUTPUT TO <direcory name> throws error 98 with errno=13 on Windows
** Unable to open file: <file-name>. Errno=13. (98)
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
CAUSE:
UNIX: Errno=21 in the error message translates to:
#define EISDIR 21 /* Is a directory */ in the /usr/include/sys/errno.h lookup.
WINDOWS: Error 13 translates to "The data is invalid"
The file specified in a "OUTPUT TO" statement points to a directory instead of a file, which leads to an /empty/ filename and the Progress error message 98. The operation therefore, gets the directory rather than a file path. ie: tries to open it as a regular (data) file.
FIX:
Examine the 4GL that is causing this error to analyse why the session data leads to an empty filename.
For example:
- Look at a listing of all the files in the current directory (listed in the error mesage) and try again, specifying a file instead of a directory.
- it could be that the program is looking in directory x and if there is a file, the program makes a workfile/temp-table with the name of the original file in directory x, translates the file, creates a new translated file and puts the new file in directory y. If there is no file in dir x the workfile/temp-table would then be empty and raises errno 21 or errno 13 depending on the environment.
- on Windows environments specifically, it could be that the file is being accessed by an_other utilitiy, even temporarily, at the time the file is needed.