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



Halt indicators return RNX0233, and the &6 var of the MSGDTA contains the 2-byte INT with the Halt Indicator.
The code below worked to test retrieving the halt indicator number used.


Message ID . . . . . . . . . : RNX0233
Message file . . . . . . . . : QRNXMSG
Library . . . . . . . . . : QSYS

Message . . . . : RPG procedure &1 returned with halt indicator &6 on.
Cause . . . . . : The halt indicator &6 in RPG procedure &1 in program &3/&2
was set on and a return was requested.
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.

Message ID . . . . . . . . . : RNX0233
Message file . . . . . . . . : QRNXMSG
Library . . . . . . . . . : QSYS
Decimal Vary
Field Data Type Length Positions Length Dump
&1 *CHAR 10 *NO
&2 *CHAR 10 *NO
&3 *CHAR 10 *NO
&4 *CHAR 10 *NO
&5 *CHAR 7 *NO
&6 *BIN 2 *NO



PGM

DCL VAR(&MSGDTALEN) TYPE(*DEC) LEN(5)
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(100)
DCL VAR(&HALTIND) TYPE(*INT) STG(*DEFINED) LEN(2) +
DEFVAR(&MSGDTA 48)

DCL VAR(&MSGID) TYPE(*CHAR) LEN(7)

CALL THEPGMNAME
MONMSG MSGID(RNX0233) EXEC(DO)

CHGVAR VAR(&MSGDTALEN) VALUE(%SIZE(&MSGDTA))
RCVMSG MSGTYPE(*LAST) RMV(*NO) MSGDTA(&MSGDTA) +
MSGDTALEN(&MSGDTALEN) MSGID(&MSGID)

ENDDO

ENDPGM

Chris Hiebert
Winco Foods, LLC
Applications Development
(208) 672-2047
Chris.Hiebert@xxxxxxxxxxxxxx<mailto:Chris.Hiebert@xxxxxxxxxxxxxx>

From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of James H. H. Lampert via MIDRANGE-L
Sent: Thursday, August 11, 2022 11:20 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: James H. H. Lampert <jamesl@xxxxxxxxxxxxxxxxx>
Subject: Re: Detecting dumps in a CL program?


On 8/10/22 4:50 PM, Roger Harman wrote:

Inside the DO(), test H1 and make your processing contingent on that?



Ok.

(1) It actually doesn't matter whether a dump is taken or not, on an

unexpected error. It's the unexpected nature of the error that I want to

catch.

(2) I actually managed to find out how to determine whether *a* halt

indicator was set, from the calling CL program. Which is really all I

need, since I'm only using the one halt indicator.



But out of pure morbid curiosity (and I think everybody here knows I

have plenty of that!), is there a way from a calling CL program to see

*which* halt indicator a called RPGLE program set?



--

JHHL

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.