×

Good News Everybody!

The new search engine is LIVE!

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




Hi Fabio,

It seems to me that the trigger programs run in the job that triggers them, so you can get that in the PSDS.

-----Message d'origine-----
De : RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> De la part de Fabio Mascelloni
Envoyé : mercredi 25 octobre 2023 13:01
À : rpg400-l@xxxxxxxxxxxxxxxxxx
Objet : QMHRCVPM Api, not all fiels of receiver DS get a value



ATTENTION : Ce message provient d'une source EXTERNE. Veuillez n'ouvrir les liens ou pièces jointes que si vous êtes sûr de l'expéditeur.



As read somewhere else, I use QMHSNDPM/QMHRCVPM in a trigger program to find out which program fired the trigger.

C CallP SndMsg( '':'':'TEST': %len('TEST'):'*RQS': '*':
C StackCUR:MsgKey:ApiErr)

C CallP RcvMsg( MsgInf:%Size(MsgInf):'RCVM0200':'*':
C StackCUR:'*RQS':MsgKey:0:
C '*REMOVE': ApiErr)

with MsgInf defined as

D MsgInf DS
D MiBytesRetd 1 4B 0
D MiBytesAvl 5 8B 0 Inz( 120 )
D MiJobNam 56 65
D MiUsrPrf 66 75
D MiJobNbr 76 79B 0
D MiStmtNum 94 97
D MiPgmName 111 120

Program name field 'MiPgmName' is correctly filled, but I need to know also the Job name and User profile under which 'MiPgmName' is runnimg.

'MiJobNam' and 'MiUsrPrf' are unluckly empty, what's the problem with this approach?
Thanks,
Fabio

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinfo/rpg400-l__;!!J76aczzK!xRx73XlId8XNXA4Uto9EdyQGF7G_bA0U3trrguwCz5K6TZSqt-8Vl13Oqx_pKAl7vX1RB6Otzw6XKDoY2x5D4SH3OtSq9fiPyQ$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!J76aczzK!xRx73XlId8XNXA4Uto9EdyQGF7G_bA0U3trrguwCz5K6TZSqt-8Vl13Oqx_pKAl7vX1RB6Otzw6XKDoY2x5D4SH3OtSvvcSJnw$ .

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


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.