I suppose you have a Msg subfile in the Window DSPF
A R MSGSFL SFL
A SFLMSGRCD(19)
A ZMSGKEY SFLMSGKEY
A ZMSGPGMQ SFLPGMQ
A R MSGCTL SFLCTL(MSGSFL)
A WINDOW(WINDOW)
A OVERLAY
A SFLDSP
A SFLDSPCTL
A SFLINZ
A N99 SFLEND
A SFLSIZ(0002)
A SFLPAG(0001)
A ZMSGPGMQ SFLPGMQ
CALLP QMHSNDPM ('CPF9897':'QCPFMSG *LIBL':
'You must select a file.':
23:'*DIAG':'*':0:MSGKEY:ERRORCODE);
Notice the '*' for MsgQue parm. '*' is used for Current MsgQue
and must be same value as ZMSGPGMQ - the DSPF field for SFLPGMQ. This field
is set by the program using the DSPF.
Hope this helps.
-----Oprindelig meddelelse-----
Fra: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> På vegne af James H. H.
Lampert via RPG400-L
Sendt: 29. september 2021 00:57
Til: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: James H. H. Lampert <jamesl@xxxxxxxxxxxxxxxxx>
Emne: Re: Message line of a window with a subfile: can somebody refresh my
memory?
Could somebody please remind me of just how I would send something to
the window's message line?
On 9/28/21 1:13 AM, Patrik Schindler wrote:
If you send a message to the *EXT program queue, the message appears
in the next record format being written by the application. If it's
the window, then the message will appear in the window's *MSGLIN, if
there is one.
I tried this, with INFO, STATUS, DIAG, and COMP:
C CALLP QMHSNDPM ('CPF9897':'QCPFMSG *LIBL':
C 'You must select a file.':
C 23:'*COMP':'*EXT':0:MSGKEY:ERRORCODE)
INFO put it up as if it were a break message. STATUS caused it to flash
momentarily and disappear. DIAG and COMP didn't do anything visible.
Help?
--
JHHL
--
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@xxxxxxxxxxxxxxxxxxxx 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.