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



Hi all,

Instead of saying the program works differently in OPM vs ILE. I probably should say the behavior is different when called from a cycle-main or linear-main.

The service program uses QMHSNDPM to send a CPF9898 Escape message.

In all the old cycle main programs this works as expected. The program hard-halts with an inquiry message.

However some of us in the shop are starting to write linear-main programs. And when QMHSNDPM is issued we do not get the inquiry message.

I've been spending a lot of time reading the manuals and my conclusion was that the cycle main programs are handling the errors like OPM.
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzasc/sc092507329.htm%23opmdiff?lang=en

I asked about determining OPM vs ILE because I was assuming if I knew the environment I could either issue the QMHSNDPM differently.

The original service program is a program that checks sql state. As we moved to more embedded sql folks were getting burned because they weren't always checking the state.
The service program checks the state and issues the QMHSNDPM when the sqlstate is an error.
It was inspired from:
https://www.ibm.com/developerworks/community/forums/html/topic?id=d2c49b79-5a01-46f7-9a11-b9de0f2b0e02#3b47a829-e864-44db-99c4-653a7547add2
http://www.ibmsystemsmag.com/ibmi/developer/rpg/unexpected_errors/

This whole exercise leaves me with a lot of questions. My guess is an awful lot of folks out there rely on hard-halts or crashes even though the code is running in "ILE."

Vicki

"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 10/16/2015
01:00:02
PM:
----- Message from Vicki Wilson <VWilson@xxxxxxxxxxxxx> on Thu, 15
Oct 2015 23:13:25 +0000 -----

To:

"RPG400-L@xxxxxxxxxxxx" <RPG400-L@xxxxxxxxxxxx>

Subject:

Is the progam OPM or ILE?

Hi all,

I wrote a generic service program for some error handling. It works
as expected if calling program is OPM. It does not behave as desired
if the calling program is ILE - some of us are writing more programs
by declaring MAIN.

One option is to change the behavior if the calling program is ILE.
How would I determine if the calling program is OPM or ILE?

If you are curious - I wrote a CHECK_SQL_STATE which uses QMHSNDPM to
issue a CPF9898 when there is an sql error. Basically folks were
used to seeing a hard-halt on I/O errors and since the CPF9898 wasn't
handled we ended up with an inquiry message RNQ0202.

Essentially what I am trying to do is re-create a hard-halt in ILE.
Which is sooo wrong. And definitely not the end game.

Vic




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.