Record Lock while debugging of RPGLE

110 pts.
Tags:
AS/400
RPGLE
How to identify which one of file and record is being locked by the program while in the debugging of RPGLE?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • deepu9321

    Would you like to check whether the record being processed is locked or Not?

    or, the Job/User who is locking the record?

    4,980 pointsBadges:
    report
  • csuoaananth
    I would like to know which record of file is being locked.

    110 pointsBadges:
    report
  • TheRealRaven
    If you are debugging, it is the record that the current I/O statement is trying to access. The I/O statement also tells which file.

    Since you're debugging, you have access to the statement and the variables. For keyed access, look at the key variables. For sequential access, it'll be the record after the one that last returned values. (Unless it's the very first record, in which case there are no previous values to see.)

    Best would probably be to code INFDSs for your files. When I/O problems show up, look the the related INFDS.
    36,025 pointsBadges:
    report
  • philpl1jb

    Immediately after your chain or read

    in debug you can display any file field values to help you determine which record you have accessed.  Before you step on, you can get the record locking data using the CL command DSPRCDLCK for file(S) you are checking .. probably from a second session.

    54,090 pointsBadges:
    report
  • ToddN2000
    If you have access to a second session, try a WRKACTJOB and find your job. Open it with a 5 and then try a 14. This will show all the open file and the RRN of the record of the file in it's current state.
    134,690 pointsBadges:
    report
  • csuoaananth
    Thanks... Helpful ans... actually i would like to know the RRN of record only.... :)

    110 pointsBadges:
    report
  • ToddN2000
    Can't verify this. I think if you check the second level of the error messages It gives you the file and RRN. If not then the WRKACTJOB and finding the debug session, open the active files and the RRN will be displayed there.
    134,690 pointsBadges:
    report
  • Splat
    An INFDS associated with the file would give you the RRN.
    12,915 pointsBadges:
    report
  • TheRealRaven
    ...actually i would like to know the RRN...

    Does that mean that you are still looking for how to determine the RRN? Or is it just acknowledging that that was all you needed so the thread can be ended?
    36,025 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: