Kbase P117365: RUN with NO-ERROR still generates an error when calling a program that does not exist
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/07/2006 |
|
Status: Unverified
SYMPTOM(s):
RUN with NO-ERROR still generates an error when calling a program that does not exist
** "<file-name>" was not found. (293)
Running a procedure that does not exist
Specifying the NO-ERROR option with the RUN 4GL Statement
CAUSE:
The problem here is that the error is being generated at the called routine level, not the caller level, so the NO-ERROR scope is too high. The NO-ERROR option on the RUN statement is not intended to cover anything on the called side of things
FIX:
In order to avoid this error, one just have to use the SEARCH function together with the RUN statement. e.g.:
IF SEARCH("FileDoesNotExist.p") = ? THEN
.... error handling......
ELSE
RUN FileDoesNotExist.p.