× 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.



Thanks Scott, I tried that but I still am getting nothing, I even changed
the message file to QCPFMSG *LIBL and the errorDs is reporting a
CPF2407....I thought it was related to the message file QCPFMSG not being
in QSYS but I checked and its there.


I would set the call stack entry to *PGMBDY, and the count to 1. The
goal is to send the message to your program's caller, thus, one level
before your program.

On 11/8/2013 8:57 AM, RPGLIST wrote:
in working with my web service, it was recommended that I use escape
messages to send back error messages to the soap client.

I have been trying to test this out this morning and here is what I've
got
for code:

0066.01 *** Escape Message Prototype Declaration
0066.02 D SendEscMsg pr extpgm('QMHSNDPM')
0066.03 D MsgId 7 const
0066.04 D MsgFile 20 const
0066.05 D MsgDta 80 const
0066.06 D MsgDtaLen 10i 0 const
0066.07 D MsgType 10 const
0066.08 D MsgQ 10 const
0066.09 D MsgQNbr 10i 0 const
0066.10 D MsgKey 4 const
0066.11 D ErrorDs 16 const

0066.14 D ErrorDs ds 16
0066.15 D BytesProv 10i 0 inz(16)
0066.16 D BytesAvail 10i 0
0066.17 D ExceptionID 7
0066.18
0066.19 D MsgDta s 80
0066.20 D Msgkey s 4
0066.21


0097.00 P SendError b
0098.00 D pi
0098.01 /Free
0098.02 MsgDta = 'Something went wrong';
0098.03
0098.04 SendEscMsg ('CPF9898':
0098.05 'QCPFMSG QSYS':
0098.06 MsgDta:
0098.07 %Len(MsgDta):
0098.08 '*ESCAPE':
0098.09 '*':
0098.10 1:
0098.11 MsgKey:
0098.12 ErrorDs);
0098.13 /End-Free
0100.00 P SendError e


I'm just calling it with a simple SendError();
but that never seems to generate anything. I'm sure I have something
wrong so any help would be appreciated.

Dutch




--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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 ...

Follow-Ups:
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.