I'm guessing that you're using the Monitor opcode to monitor for this
error? Monitor opcode auto replied with C and therefore you are getting
the unable to allocate a record in file error message.
Try use the (e) extender on the chain/read statement to see if that will
resolve your problem.
Chain(e) (mykey) myFile;
If %error;
...showUserTheErrorText...
Endif;
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
KSwanso@xxxxxxxxxxxxxxxxxxxxx
Sent: Monday, April 28, 2008 10:49 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Unable to allocate record in Physical File
Currently users are receiving this message in production. What I am
trying to do is monitor for %status 1218 and use the Program Status Data
Structure to get the Exception error information fields 91 - 170.
Numerous posts on various forums indicate that this field should contain
the a message along the lines of " Record 125059 in use by job
070608/USERNAME/WPDP609AS4."
However the only message that I see in fields 91 - 170 is: "Unable to
allocate a record in file CDIARYP"
Here is a copy of my job log after the run with a locked record.
Record 125059 in use by job 070608/KSWANSO/WPDP609AS4.
? C
Record 125059 in use by job 070608/KSWANSO/WPDP609AS4.
? C
Unable to allocate a record in file CDIARYP.
Now it looks like I have responded to the record in use by job error
message, but I am not responding, it appears to be doing it by itself...
Any suggestions on to how I can get it to either A, not auto reply to
the error message, or B retrieve the prior message using the PSDS?
Thanks
Kevin Swanson
-----------------------------------------
The contents of this email may be confidential. If you are not the
intended recipient of this email, any access to, disclosure, copying, or
distribution of this information, is prohibited and may be unlawful. If
you receive this email in error please reply to the sender immediately
to advise him/her of the error, and then delete this email and any
attachments.
--
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.