Assuming you are trying to update SROCTLRB , the CHAIN(N) is not locking the record for update , remove the 'N' from Chain.
Update requires exclusive record which it is not getting hence it is not working.
The (N) extender should be used while loading the subfile and not while actually updating it.
Thanks,
Ashwani
Please consider the environment before printing this e-mail
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Hoteltravelfundotcom
Sent: Friday, April 08, 2016 12:00 PM
To: RPG programming on the IBM i / System i
Subject: Subfile update problem
This update is never getting run, because 91 is on. I try to update with option 2 this brings the record to a single screen, this i change the amt, it closes but does not actually update. My question is, why is add working and not update.
This is a subfile list that i select the record to update. the add works.
c *inKJ ifeq *on
c CurrentUser ifeq 'SIMONK'
c CurrentUser oreq 'RABEB'
C WRITE CTLRB
c endif
c goto ends32
0624.00 C* Update or add record
0624.02 C KKCTRB CHAIN(N) SROCTLRB 91
0625.00 C *IN91 IFEQ *OFF
0626.00 C eval CTUserChg = CurrentUser
0627.00 C eval CTDateChg
=%dec(%char(%date():*iso0):8:0)
0
0629.00 C UPDATE CTLRB
0630.00 C ELSE
0633.00 C Time CTTimeAdd
0633.01 c endif
0633.02 C Time CTTimeAdd
0633.03 C eval CTUserAdd = CurrentUser
0633.04 C eval CTDateAdd
=%dec(%char(%date():*iso0):8:0)
0633.05 C END
--
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.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.