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



We're missing something here. Rpgle on 7.1. I'm working with another programmer on his pgm.

Created trigger with
ADDPFTRG FILE(AUTUSERS) TRGTIME(*BEFORE) TRGEVENT(*UPDATE)
PGM(AUTUSERE00) RPLTRG(*YES) ALWREPCHG(*YES)

Data is moved from buffer to a ds:

NewStart = NewRcdOff - 96 + 1;
OrgStart = OrgRcdOff - 96 + 1;

NewFileDS = %Subst( DataRcds : NewStart : NewRcdLen );
OrgFileDS = %Subst( DataRcds : OrgStart : OrgRcdLen );

Everything lines up in the DSs so the pointers and %subst seems to have worked.

New (actually changed) record is copied to another DS

NewFileSav = NewFileDS;

Some changes are made and applied to NewFileSav. Then that ds moved back into trigger new or after part of buffer:

%Subst( DataRcds : NewStart : NewRcdLen ) = NewFileSav;

In debug, I can see the changed data in datarcds, but it's not being applied to the record when the trigger ends. Only my original changes that fired the trigger.

I've looked in the redbook (changed the addpftgr to alwrepchg(*yes)). Googled this. Any other suggestions?


TIA
Jack

This email, including any documents, files, or previous email messages attached to it, has been sent from an email account of College Foundation Inc., (CFI) and may contain confidential, proprietary, or legally privileged information belonging to CFI. If you are not the intended recipient, any dissemination, distribution, or copying of this email or its attachments is strictly prohibited. If you have received this email in error, please immediately notify the sender by email and destroy the original email and any attachments.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.