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



If you are trying to make this determination DIRECTLY in an RPG program, it
is fairly simple:

1) Code an error indicator on the operation code that you are using to read
the record (CHAIN, READ, READE, etc.).

2) AFTER executing the file operation, if the error indicator is *ON, there
are a couple of fields in the Program Status Data Structure that have the
information that you are looking for:

Positions 91 - 170 will contain a message that looks like 'Record 1 in use
by job 955737/USERID/JOBNAME.'
Positions 201 - 208 will have the name of the file where the error occurred
(the file name as it is known in the RPG program)
Positions 209 - 213 will have the RPG status code of either '01218' (Record
already locked) or '01299' (Other I/O error occurred).  You can find the
status codes documented in the RPG/400 Reference

I haven't tried this in an RPGLE program, but I feel quite confident in
saving that it will work the same way when using the 'E' extender and the
%ERROR BIF to check for the error condition.

Hope this helps...


----- Original Message -----
From: <kmskeele@mail.volusia.k12.fl.us>
To: <midrange-l@midrange.com>
Sent: Thursday, October 10, 2002 9:10 AM
Subject: locked record


A somewhat newbie question.... Is there a way to display the user id that
has a specific
record locked for update ?



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-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.