× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



From: derek gonsalves

Hi,

I have a Qcmdexc statement in a program.
OVRDBF FILE(ABC) TOFILE( )
Now for eg.
the TOFILE is DXGO/ABC. If MPPMP100 does not exist in DXGO, can i capture
this error?(Or is there any other way of doing it)

Derek, the override command (OVRDBF) doesn't actually check for the file.
It simply tells the operating system that any programs trying to open file
ABC should instead open MPPMP100 in DXGO. (I assume you meant that your
TOFILE is DXGO/MPPMP100.)

An error doesn't actually occur until a program tries to open file ABC. At
that point, the operating system sees the override and attempts to open the
TOFILE. Typically, this is when your RPG program first loads (or if you
have defined the USROPN keyword for the file, it happens when you issue the
OPEN opcode to the file).

The easiest way to handle this is probably with a USROPN file. You could
put an error indicator on your OPEN statement, or put a MONITOR block around
it.

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.