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



What does the PI look like?

Charles


On Fri, May 2, 2014 at 5:41 PM, Jack Prucha <Jack.Prucha@xxxxxxx> wrote:

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.
--
This is the RPG programming on the IBM i (AS/400 and 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 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.