Dave,

I use a similar technique defining external datastructures (DS) with PREFIX; 
not pointers, but simple SUBSTR. The fields I would like to log in another file 
(for auditing, debugging) are named after the fields from the DS's with the 
prefix.

So, field CUSTNO will be OCUSTNO and NCUSTNO in the logfile.

This will work in all levels of RPG IV.

Regards,
Carel Teijgeler.

*********** REPLY SEPARATOR  ***********

On 4-9-03 at 6:55 Dave Murvin wrote:

>We will be creating several more trigger programs for some additional data 
>files.  Some of these files have hundreds of fields, but we are only 
>interested in changes to a small subset of these fields.  Is there a way to 
>easily group the fields we are interested in into another data structure 
>(besides the new/old record image) so we can determine if there was a 
>change we are interested in by comparing two data structures versus 
>checking every field we are interested in?  Ideally the field values would 
>be sucked into the data structures without having to code the moves.  The 
>fields we are interested in are spread throughout the filed and are not 
>usually contiguous.
>
>I have tried additional data structures, but program will not compile 
>because the fields are already defined in the old/new data structures.  We 
>are on V5R1.
>
>Snippet from existing trigger program follows:
>
>  * Record detail for old record
>D OldRecordDS   E DS                  ExtName(ECL)
>D                                     Prefix(Old)
>D                                     Based(OldRecordPtr)
>
>  * Record detail for new record
>D NewRecordDS   E DS                  ExtName(ECL)
>D                                     Prefix(New)
>D                                     Based(NewRecordPtr)
>
>C                   Eval      OldRecordPtr = %Addr(TrigBuf) + OldRcdOff
>C                   Eval      NewRecordPtr = %Addr(TrigBuf) + NewRcdOff




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.