ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Help with LCKW and STACK_INFO

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

  • Help with LCKW and STACK_INFO

    I'm not sure that this is the correct forum but I thought I'd try here first.This may be more of a systems question.

    We're tracking down a record LCKW situation. We make use of the STACK_INFO table function to list the information of the job that is waiting for a record lock and for the job that is locking the record. Sometimes the statement number of the waiting program is ".DRVRKxx" or ".DRVRExx", where xx is a number. What do those statement numbers mean and where do they come from?

    I've searched all around and can find virtually nothing.

    Thanks in advance,
    Mike

  • #2
    I recognize names like that from when I used to work on the OPM RPG compiler. They are names in the generated code for the program. You can see the generated code for the OPM RPG compiler with CRTRPGPGM GENOPT(*LIST). The spool file will have the code generated by the compiler after the usual stuff in the listing.

    I'll try to explain how to find which RPG statement is related to the .DRV locations in the generated code.

    My program is stopped at .DRVRK01.

    1. I search for .DRVRK01 in my listing. When I find it, I look up a few lines to find the ENTRY line.
    Code:
            BRK '.DRVRE01'              
    .DRVRE01:                            
             ENTRY .XRVRE01 INT          
             CPYBLA .RN01004,.EXTRECN    
             SETSPP .CO01004,.OC01004    
             SETIP ..GNKEBR,.DRVRK01    
             B .DR01004
    XRVRE01 is what I am interested in now.

    2. Now, I go back to the top and search for .XRVRE01, and I find this:
    Code:
    CALLI .XRVRE01,*,.DRIVRTN​
    3. i scroll back up a couple of pages until I get to a line with BRK
    Code:
    BRK '400     '
    4. I go back up to the RPG code section of the listing and find statement 400:
    Code:
    400 C           KLIST1    READEREC                      10

    Comment


    • #3
      Thank you, Barbara. That's very informative.

      My inspection doesn't fit your analysis exactly, most likely because it's an Autoreport program. But I think I should be able to follow it through.

      Thanks again,
      Mike​

      Comment

      Working...
      X