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



You can accomplish this by using the "Move Program Messages (QMHMOVPM)" API
that you mentioned.

Here are 2 methods to call the API.

1) After your save command, call the API as follows

CALL PGM(QMHMOVPM) PARM((' ')
('*COMP *DIAG *ESCAPE *INFO ')
(X'00000004') ('*PGMBDY') (X'00000001')
(X'0000000000000000'))

2) Create a command to call the API. Then after your save command, run
the command. No command parameters are necessary.
The command calls the API directly, you don't have to create a CPP.

SAVOBJ OBJ(XYZ) ..
MOVPGMMSGS


/* Command ...... : MOVPGMMSGS - Move Program Messages */
/* CPP .......... : QMHMOVPM */
/* */
/* Compile Command: */
/* CRTCMD CMD(QTEMP/MOVPGMMSGS) */
/* PGM(*LIBL/QMHMOVPM) */
/* SRCFILE(QTEMP/QCMDSRC) */
/* SRCMBR(MOVPGMMSGS) */
/* ALLOW(*BPGM *IPGM *BMOD *IMOD) */
/* REPLACE(*YES) */

CMD PROMPT('Move Program Messages')

PARM KWD(MSGKEY) TYPE(*CHAR) LEN(4) CONSTANT(' ')

PARM KWD(MSGTYPE) TYPE(*CHAR) LEN(30) +
CONSTANT('*COMP *DIAG *INFO ')

PARM KWD(NBRTYPS) TYPE(*INT4) CONSTANT(3)

PARM KWD(TOPGMQ) TYPE(*CHAR) LEN(10) RSTD(*YES) +
DFT(*PGMBDY) VALUES(* *CTLBDY *PGMBDY) +
PROMPT('Call stack entry')

PARM KWD(UPSTKCNT) TYPE(*INT4) CONSTANT(1)

PARM KWD(ERRCOD) TYPE(*CHAR) LEN(8) +
CONSTANT(X'0000000000000000')


Note, the above command was created based on an article from Ted Holt named
"CL Error-Handling with APIs" and can be found using the following link.

https://www.itjungle.com/2012/05/02/fhg050212-story01/

Ted's article dealt with Diagnostic and Escape Messages. The above command
is a slight modification to send multiple message types in one call.


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Mark
Waterbury
Sent: Tuesday, December 19, 2023 3:19 PM
To: James H. H. Lampert via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Percolating message from SAVOBJ within CL Program

QMHMOVPM API?
> On Tuesday, December 19, 2023 at 06:09:12 PM EST, James H. H. Lampert
via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

Quick question (because I'm too lazy to RTFM myself)

I have a CL program that simply does a SAVOBJ to a save file. It's a save
file that I frequently have to regenerate, and it's a fairly complex SAVOBJ,
with a lengthy OBJ() parameter.

How do I get the "xx objects saved from library yyyyyyyyyy" message to
percolate back to the terminal session message line, the way it comes up on
the message line when I type the SAVOBJ directly on a command line?

JHHL


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

.


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.