Can anyone help? Kindly cc replies to my e-mail address.
Thanks
--
S. Hussain Akbar
email: hus...@myself.com
web: http://www.wp.com/Hussain
I think you need to check the message type. *STATUS messages do not
remain in the queue like other messages. If you send them to *EXT, I
think they are automatically displayed at the bottom of the screen,
otherwise, if you don't monitor for them (such as at your control
boundary) I think they are just ignored.
You'll probably get what you need with *INFO or *ESCAPE message types.
Also note that you can call the QMHSNDPM API directly from the RPG
program to eliminate the need for a separate CL module.
Hope this helps ...
-Ian.
Hussain Akbar wrote:
>
> I am trying to get a CLLE module to work to send messages from ILE
> programs.
> I have a CLLE module with:
> SNDPGMMSG MSGID(&ID) TOPGMQ(*PRV (*CTLBDY)) TYPE(*STATUS)
> I bind this with a simple RPGLE module so I can send error messages
> etc.
> I get an error saying that *CTLBDY was not found. In other
> combinations, the
> message just doesn't appear anywhere.
> I tried all combinations I could think of but can't get messages to
> stay on
> the message line after a program terminates.
--
Ian Stewart
i...@incognito.co.nz
Nils
Hussain Akbar skrev i meddelelsen <35c2c...@news1.ibm.net>...
>I am trying to get a CLLE module to work to send messages from ILE programs.
>I have a CLLE module with:
> SNDPGMMSG MSGID(&ID) TOPGMQ(*PRV (*CTLBDY)) TYPE(*STATUS)
>I bind this with a simple RPGLE module so I can send error messages etc.
>I get an error saying that *CTLBDY was not found. In other combinations, the
>message just doesn't appear anywhere.
>I tried all combinations I could think of but can't get messages to stay on
>the message line after a program terminates.
>
My RPGLE program calls a bound CLLE module which has the command:
SNDPGMMSG MSGID(&ID) TYPE(*INFO) TOPGMQ(*PRV (CTLBDY)
It worked. The message type has to be INFO
> If you're using ILE programs with procedures, you have to supply the
> procedure name which
> displays the message, AND it has to be somewhere in the call stack.
> Which makes it
> virtually unusable in ILE using procedures.
> If on the other hand, you're not using procedures it should work, but
> I suspect you are.
Hmm ... I think Hussain got that bit right. Specifying *CTLBDY instead
of a specific procedure will work in most cases to aim the message back
to the caller. I specify this now even in OPM CL programs, so that they
will work as required if recompiled as ILE. Not that I've tried using
procedures within an RPG program yet ...
--
Ian Stewart
i...@incognito.co.nz
In ILE, control boundaries are odd things. They are the place where
one activation group transitions into another. You also have an ILE
control boundary at the point where an ILE program running in the
default activation group calls an OPM program or vice verse. What is
the usefulness of sending a message relative to a control boundary? I
escape know messages are percolated to control boundaries until a
function check is issued but so what?
Mike Cravitz
NEWS/400 Technical Editor
You're right. I just went and did a search of a few recent programs
(should have done that before posting earlier), and indeed, I've been
using *PGMBDY. When I saw *CTLBDY in his example, I didn't remember the
details, and presumed it was the same :-( Sorry for any confusion ...
Either way, I'm sure that sending messages from ILE programs *IS* quite
possible (well, at least it seems to work for me!) His biggest problem
was the message type, which is easily fixed ...
I wonder how many people out there are using ILE much so far? I've been
trying to go further than just converting the old RPG to the new format
and compiling it DFTACTGRP(*YES) ... some of the issues are easier to
deal with than others, but I suffer from what I presume is a common
problem (too much real work to do to really spend the time needed to get
to know it inside out ...)
Having said that, I no longer like going back to RPG III ... the data
definitions etc are much better in the ILE version (especially basing
pointers, which can make things much more straight forward, at the
expense of incurring the wrath of others less adventurous!)
--
Ian Stewart
i...@incognito.co.nz