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



Hi,

this is quite easy. The iSeries system itself sends a message that contains
the relative record no and the qualified job name that locks the record. You
only have to catch this message and show it in the message line
This message is returned in the program status datastructure position
91-170.

D PGMDS          SDS
D  MsgText               91    170

 /Free
  //First Version
    Monitor;
       Chain MyKeyList MyFileFmt;
    On-Error 1218; //Record Lock, if 1218 is not specified all Errors are
handled
       SndPgmMsg('CPF9898': MsgText);  //Wrapper around QMHSNDPM
    EndMon;

  //Second version
    Chain(E) MyKeyList MyFileFmt;
    If %Status = 1218; //Record Lock
       SndPgmMsg('CPF9898': MsgText);  //Wrapper around QMHSNDPM
    EndIf;
 /End-Free

Mit freundlichen Gru?en / Best regards

Birgitta

"Shoot for the moon, even if you miss, you'll land among the stars."
(Les Brown)

-----Ursprungliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von D.W.
Gesendet: Montag, 30. Januar 2006 04:38
An: rpg400-l@xxxxxxxxxxxx
Betreff: Determining who has a record locked


I have a need to determine which user has a record locked and display it
on the message line for the user receiving the error.

Any suggestions on the easiest way to handle this?

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

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.