Show message on line 24 of interactive display after RPG program ends

Discussions relating to writing software in ILE RPG (RPG IV). This includes both fixed and free format RPG.
Post Reply
nelsong1997
Posts: 1
Joined: Thu Jul 10, 2025 5:00 pm

Show message on line 24 of interactive display after RPG program ends

Post by nelsong1997 »

Hello,

I am having trouble showing a message on line 24 of an interactive display that persists after an RPG program ends.

I was able to get this to work with SNDPGMMSG in a CL program.

Code: Select all

SNDPGMMSG  MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA('EXAMPLE') TOPGMQ(*EXT) MSGTYPE(*COMP)
However, if I call this CL program from within an RPG program, the message goes away when the RPG program ends.

The closest I can get is to get a message to show on a separate screen with "Display Program Messages."

I was able to do this in two ways:

1. Calling a CL program that does a SNDPGMMSG like this:

Code: Select all

SNDPGMMSG  MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA('EXAMPLE') TOPGMQ(*EXT) MSGTYPE(*INFO)
2. Using SND-MSG within the RPG program itself:

Code: Select all

SND-MSG *INFO 'EXAMPLE' %TARGET(*EXT); 


Is there any way to get the message to show on line 24, the same way it works with a CL program?

Please let me know if there is any more information I should provide about the scenario I am describing.

Thanks!
Post Reply