× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mike, what are you trying to accomplish?

If you are trying to _send_ a message, then you may need to use the
SNDPGMMSG command (or possibly the QMHSNDPM API) to format and send the
message.

When using SNDPGMMSG, you specify the message data (MSGDTA)  that is to be
mapped into the substitution parameters that are defined for the message.
Example (very simple):

If I use SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG)  MSGDTA('Hello')
TOMSGQ(QSYSOPR)

I have just sent the message 'Hello.' to the system operator.

The value 'Hello' is substituted in place of &1 in the message text,
followed by the '.' (period) which is hard-coded in the message text.

Another example:

Use WRKMSGD to view message id CPF9849 in message file QCPFMSG:

Error while processing file &1 in library &2 member &3.

Notice that it has 3 substitution parameters (&1, &2, &3)

Now, use option 5 (Display details), then option 2 (display field data).
Notice that &1 (file name)  represents the first ten positions of the
message data, &2 (library name) represents the next 10 positions of the
message data, and &3 (member name) represents the final 10 bytes of the
message data.

If I wanted to use SNDPGMMSG send a message using this msgid, it would look
like this:

SNDPGMMSG MSGID(CPF9849) MSGF(QCPFMSG)
MSGDTA('XXXXXXXXXXYYYYYYYYYYZZZZZZZZZZ')  TOMSGQ(QSYSOPR)

I have just sent the message:

Error while processing file XXXXXXXXXX in library YYYYYYYYYY member
ZZZZZZZZZ
to the system operator.

Hope this helps,

Steve Landess
Austin, Texas
(512) 423-0935

----- Original Message -----
From: "Wills, Mike N. (TC)" <MNWills@taylorcorp.com>
To: "Midrange - RPG (E-mail)" <RPG400-L@midrange.com>
Sent: Thursday, December 19, 2002 3:37 PM
Subject: RTVMSG


> I am trying to figure out how to add the phone # to the fax messages.
>
>  RTVMSG     MSGID(&ERRORMSG) MSGF(QFAX/QFAXMSG) +
>               MSGDTA(1234567) MSG(&FAXMSG)
>
> How do I pass parms into the message? The one I am trying to enter data
into
> is &11.
>
> Mike Wills
> iSeries Programmer
> mnwills@taylorcorp.com
> (507) 386-3187
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.