Vikas Taskar <> 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 * 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)


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
| To subscribe to this list send email to
| To unsubscribe from this list send email to
| Questions should be directed to the list owner/operator:

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by 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].