Kbase P49788: Getting error 201 when using SYSTEM-DIALOG GET-FILE
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/10/2003 |
|
Status: Unverified
SYMPTOM(s):
Getting error 201 when using SYSTEM-DIALOG GET-FILE
** Unknown Field or Variable name - <field-name>. (201)
** Unknown Field or Variable name - must-exist. (201)
CAUSE:
The FILTERS option of the SYSTEM-DIALOG GET-FILE statement was specified with only one string (*.txt) rather than two strings. For example, the following statement would cause the compilation error
SYSTEM-DIALOG GET-FILE cFileName FILTERS "*.txt" MUST-EXIST USE-FILENAME.
because the MUST-EXIST phrase was taken by the compiler to be the second string required by the FILTERS phrase and since it was not a quoted string it was assumed to be a reference to a character variable. Since the compiler could find no character variable with the name of "MUST-EXIST" the 201 error was generated.
FIX:
Modify the source code and specify two string values for the FILTERS phrase. For example, the following code would compile and execute correctly:
SYSTEM-DIALOG GET-FILE cFileName FILTERS "Text Files (*.txt)" "*.txt" MUST-EXIST USE-FILENAME.