|
I knew everyone would state to use the offsets, as that is why I even stated in my previous message that , that is the route I would go. However, as I have always done, I want to know why I had to add the extra buffer field when it wasn't in any documentation? I mean, if the offsets are the only way to go, then why don't the buffer example just have one big field that contains the old/new record values and tell you to use the offsets to determine the starting and ending points, rather than show individual fields? I am going to use the offsets, but it still "bothers" me that I had to do that and I don't know why. The other thing I left out is that the second parm length said the first parm was 288 characters when I only came up with 266. Thanks for the input, as I know I have more work to do. I was just curious if there was an actual reason why I needed to input the extra field when it wasn't illustrated in any documented examples. How many times have we fixed a program, and then not really understood why or how we fixed it?? Tracy L. Ball The Jackson Group Sr. Programmer/Analyst (317) 781-4600 ext. 3107 -----Original Message----- From: Scott Klement [mailto:klemscot@xxxxxxxxxxxx] Sent: Thursday, March 20, 2003 7:37 PM To: RPG programming on the AS400 / iSeries Subject: Re: Programming a trigger audit in ILE Tracy, In the data structure that's passed to your trigger program there's some fields that give you offset of where the record, null maps, etc are located in memory. You need to use those numbers to locate the data. If you use something like a "filler field" what will happen if they pass you a different number on the next call? Or maybe on the next release of OS/400? I posted a (really old and somewhat outdated) example of this type of code here: http://archive.midrange.com/rpg400-l/199908/msg00110.html Keep in mind that in newer releases of OS/400 you can eliminate the awkward array logic and replace it with pointer arithmetic... but this code will still work. On Thu, 20 Mar 2003, Tracy Ball wrote: > > I have just done my first trigger program in ILE. I could not get my > program to work until I inserted (what seems) is an extra filler field > in the parameter 1 buffer field between the old record null map and the > new record field. > > I just downloaded the redbook from V5R1 and it has no mention of this > spacing issue. Here is my program, can someone tell me what I am > missing or if that is the way I needed to do it. Once I understand this > process more, I will use the offset fields to pick up the start/end > positions of the old/new records, however, I am still puzzled why I > needed this additional field. > _______________________________________________ This is the RPG programming on the AS400 / 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 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.