Re: Getting joblog messages in a program

Vern Hamberg via MIDRANGE-L <[email protected]> Thu, 11 Jun 2026 16:58:15 -0500
Newsgroups gmane.comp.hardware.ibm.midrange
Message-ID <[email protected]>
Hi James

I can't find the article that gives details, but the basic idea is to 
get everything in the job log using the message key. In RPG you'd use 
the QMHRCVPM API, in CL, RCVMSG. Everything in the job can be retrieved 
using the message key, some messages come from other sources. Buck 
Calabro gave some details in a post in these lists at 
https://archive.midrange.com/midrange-l/201108/msg00492.html - that's 
right, 1 years ago.

The method does involve a loop but is pretty simple in concept.

*Regards*

*Vern Hamberg*

IBM Champion 2025 <cid:[email protected]> CAAC 
(COMMON Americas Advisory Council) IBM Influencer 2023


On 6/11/2026 2:00 PM, James H. H. Lampert via MIDRANGE-L wrote:
> What's the easiest (non-SQL) way to get joblog messages in a program.
>
> I've shelled out a command via QCAPCMD, but the exception it returned 
> in the error parameter simply says that the command failed. Looking at 
> the joblog, I can see *why* it failed, but I want the program to be 
> able to see that.
>
> -- 
> JHHL
-- 
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related questions.