|
It has been working for a year or more. I think you're just not seeing my full routine: D szRtnData DS D msgInfo Like(QMHM0300) D sndInfo Like(QMHRS) D szExtraData 300A D szSenderInfo S Like(QMHRS) BASED(pSender) C eval QMHM0300 = szRtnData C eval nOffset = C QMHLDRTN01 + QMHLMRTN01 + QMHLHRTN01 C eval pSender = %addr(sndInfo) C eval pSender = pSender + nOffset ** Copy the virtual data to a true data structure to ** get at the subfield data. C eval QMHRS = szSenderInfo "The offsets to these fields equal the offset to the last fixed-length field plus the length of the previous variable length fields." - API Manual Besides, he got it working already. -Bob Cozzi www.RPGxTools.com Use xTools and Enjoy programming... again! -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Barbara Morris Sent: Monday, August 22, 2005 1:00 PM To: rpg400-l@xxxxxxxxxxxx Subject: Re: Get name of current procdeure Bob Cozzi wrote: > > Right, you need the sender data structure too. > If you coded this, instead of hand coding it, you'll have it. > > /copy qsysinc/qrpglesrc,qmhrcvpm > > D szRtnData DS > D msgInfo LikeDS(QMHM0300) > D senderData LikeDS(QMHRS) > D szExtraData 500A > I don't think that will work. QMHM0300 doesn't include the sections that precede the sender data, so the senderData subfield would be in the wrong position in the szRtnData structure. I think the only way to do this reliably is to use the way that Scott suggested, to define the sender data as a separate based structure, and set the basing pointer using the "Length" fields in the msgInfo part of the structure.
As an Amazon Associate we earn from qualifying purchases.
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.