× 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.



Awesome Jon... started out with the CEEHDRL api and just thought it was too
much for what I needed this for... I'll check out your link

thanks

Jay

On Fri, May 31, 2019 at 10:06 AM Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

It depends on what you want to do and why.

COBOL really doesn't have an exact equivalent to MONITOR. At least not
without a lot of set handler (MONITOR) clear handler (ENDMON) operations.

As others have noted the ILE CEExxxx routines can be used but COBOL also
has its own mechanism that basically allows you to programmatically respond
to error messages. This involves the use of the QlnSetCobolErrorHandler
family of APIs. This API and its use are described here
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/apis/QLNSETCE.htm
<
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/apis/QLNSETCE.htm>.
You may find this to be a simpler option as it is COBOL specific. Typically
it is used to programatically respond to error messages.

There is also an equivalent for OPM COBOL as well.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On May 31, 2019, at 8:06 AM, Jay Vaughn <jeffersonvaughn@xxxxxxxxx>
wrote:

I know this is the RPG list but hoping there are some RPG'rs with some
COBOL knowledge as well (I'm sure there are)

I'm simply looking for a MONITOR equivalent for COBOL.

In some of our rpg pgms we do the following in the mainline...

monitor;
process();
on-error;
dump(a);
send DumpEmail();
endpgm();
endmon;

I simply want to implement the same mainline monitoring strategy in COBOL
but not sure if the capability exists.
Can anyone advise?

Couldn't find much of use via Google.
This link is probably about the best reference... but hoping of a working
example if anyone has done something similar before?

https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/rzase/errhnd.htm

tia

jay
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.