Vikas Taskar <vtaskar@wipsys.ge.com> wrote:

>When a message is to be displayed using the SNDPGMMSG
>command in a CL program, the "Call Stack level Entry" can be
>either *PRV or *SAME...by default, it is *PRV.But if we specify
>the option as *SAME, the message does not get displayed on
>the screen, when we run the program...Why? (If *PRV is given,
>message is displayed)

Vikas,

This parameter is actually in 2 parts. When you specify *SAME or *PRV and
allow the rest to default you are actually specifying TOPGMQ(*SAME (*)) or
TOPGMQ(*PRV (*)). The second asterisk means the program or procedure
running the SNDPGMMSG command. Specifying (*PRV (*)) therefore means send
the message to the program message queue of the program or procedure
preceding the current one in the stack. It is this program (written by IBM
in most cases) that handles the message and displays it on the screen.

Specifying (*SAME (*)) means send the message to the program message queue
of the current program or procedure. Unless you then have some more code in
the program to handle the message it's just sent to itself nothing more
will happen to it.

Dave Kahn, ABB Steward Ltd.


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.