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



Well,

My pointer arithmetic is slightly different to yours and at first I was
confused by your offset + 1 but I think it all comes out in the wash.

I don't think you need to define the array if you are just using pointer
arithmetic e.g:

//‚This Program

Dcl-Pi *N;

TrgBuf LikeDS( TrgBufDS );

TrgBufLen Int( 10 );

End-Pi;

Dcl-Ds TrgBufDS Qualified Template;

File Char( 10 );

Library Char( 10 );

Member Char( 10 );

TrgEvent Char( 1 );

TrgTime Char( 1 );

CmtLckLvl Char( 1 );

*N Char( 3 );

CCSID Int( 10 );

RRN Int( 10 );

*N Char( 4 );

OrgRecOfs Int( 10 );

OrgRecLen Int( 10 );

OrgRecNBOff Int( 10 );

OrgRecNBLen Int( 10 );

NewRecOfs Int( 10 );

NewRecLen Int( 10 );

NewRecNBOff Int( 10 );

NewRecNBLen Int( 10 );

End-Ds;



//‚Before Image

Dcl-Ds Before ExtName( 'MYFILE' ) Qualified Based( pBefore );

End-Ds;



//‚After Image

Dcl-Ds After ExtName( 'MYFILE' ) Qualified Based( pAfter );

End-Ds;

pBefore = %Addr( TrgBuf ) + TrgBuf.OrgRecOfs;

pAfter = %Addr( TrgBuf ) + TrgBuf.NewRecOfs;

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.