Mike,
This is what I user after a input/output operation.
//**********************************************************************
Switches
D DupRecord S 1N Inz(*Off)
D EndOfFile S 1N Inz(*Off)
D RcdFound S 1N Inz(*Off)
D RcdLocked S 1N Inz(*Off)
D RcdNotFound S 1N Inz(*Off)
D UpdateError S 1N Inz(*Off)
D UnKnownError S 1N Inz(*Off)
Select;
When %Status = 00000;
RcdFound = *On;
When %Status = 00011;
EndOfFile = *On;
When %Status = 00012 Or %Status = 01241;
RcdNotFound = *On;
When %Status = 01021;
DupRecord = *On;
When %Status = 01218;
RcdLocked = *On;
When %Status = 01221;
UpdateError = *On;
Other;
UnKnownError = *On;
Endsl;
Regards,
Pat Landrum
Senior Programmer/Analyst
Hanover County Public Schools
200 Berkley Street
Ashland, Va 23005
Phone: 804-365-4658 Email: plandrum@xxxxxxx
Notice: This message or any accompanying documents may contain
confidential or privileged information of Hanover County Public Schools.
If you are not the intended recipient, disclosure, copying or
distribution is strictly prohibited by state and federal law. If you
received this message in error, please notify the sender as soon as
possible.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Cunningham
Sent: Friday, September 04, 2009 8:26 AM
To: 'RPG programming on the IBM i / System i'
Subject: testing for record locks without using indicators
How can I test for a read lock on a CHAIN or READ without using
indicators and using %error instead?
--
This is the RPG programming on the IBM i / System i (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.