ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Message on lock waiting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • as400boy
    replied
    Re: Message on lock waiting

    Originally posted by danlong005 View Post
    I do it like this. This would be in any program that tries to read the record when it is locked.

    Code:
    D PROGDS         SDS
    D  CPFMSG                91    170
    
    chain(E) record_id myfile;            
    dow %STATUS = 1218;
       locked_by_user = %subst(CPFMSG:first_slash_location+1:second_slash_location - first_slash_location);
       . . .
    enddo;
    thanx a lot!

    Leave a comment:


  • danlong005
    replied
    Re: Message on lock waiting

    I do it like this. This would be in any program that tries to read the record when it is locked.

    Code:
    D PROGDS         SDS
    D  CPFMSG                91    170
    
    chain(E) record_id myfile;            
    dow %STATUS = 1218;
       locked_by_user = %subst(CPFMSG:first_slash_location+1:second_slash_location - first_slash_location);
       . . .
    enddo;

    Leave a comment:


  • as400boy
    started a topic Message on lock waiting

    Message on lock waiting

    Hello all,
    i have a program used by many people in the company, that many time is in lockwaiting because the user don't release the record. To avoid continuous calls i would like to show a window that display which is the user that lock you the record... I thought to put the update in a monitor statement, but how can i retrive the username that lock the record?

    thanx in advance
Working...
X