×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




And maybe no spaces in the initialization string?


On Wed, Feb 12, 2014 at 2:37 PM, CRPence <CRPbottle@xxxxxxxxx> wrote:

On 12-Feb-2014 11:23 -0800, Gqcy wrote:
I am trying to use the QMHSNDPM api, but sending a message to the
history log (creating a CPF9898 text message)...

If I use *EXT instead of *HSTLOG, I do get the message to break to
my screen, but I can't get *HSTLOG to work...
D QMHSNDPM PR extpgm('QMHSNDPM')
D MessageId 7 const
D MessageFile 20 const
D MessageData 512 const options(*varsize)
D MessageDataL 9B 0 const
D MessageType 10 const
D CallStkEntry 128 const options(*varsize)
D CallStkCount 9B 0 const
D MessageKey 4 const
D ApiError 120 options(*varsize)
D* send program message
D sndpgmmsg ds
D msgid 7 inz('CPF9898')
D msgfile 20 inz('QCPFMSG QSYS ')
D msgdataL 9B 0 inz(512)
D msgtype 10 inz('*INFO ')
D msgmsgq 20 inz('*HSTLOG ')
D msgstack 9B 0 inz(1)
D msgkey 4
D msgtstmp s z
D msgdata s 512

msgtstmp = %timestamp();
msgdata = 'AUDIT: ' + @jobname +
' Top of MLT988R ' + %char(msgtstmp);
msgdataL = %len(%trim(msgdata));
QMHSNDPM (msgid:msgfile:msgdata:msgdataL:msgtype:msgmsgq:
msgstack:msgkey:apierror);


Given the special value *HSTLOG is an apparent attempt to direct the
message to the message queue object QHST in QSYS [though as I recall, I
had noticed that the OS may utilize incorrectly a value of QHST in
*LIBL], perhaps to circumvent an apparent issue with what presumably is
a supported special value, just code the value as?:
msgmsgq='QHST QSYS '

--
Regards, Chuck
--
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 ...

Replies:

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

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