ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

record lock

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

  • record lock

    Hi!

    I am using a file in Update Mode in a program, when i execute program to test my application, i will enter some records present in the file, now wt is happening is tht the records which i am using for testing the application gets locked and when i execute my program again and enter the same record value it is getting stuck up, wt to do to avoid this situation.

    If am using CHAINs and SETLLs in the prg but not READ, if i have used READ then i can avoid by keeping N in the READ stmt but now how to avoid record locking.

  • #2
    Re: record lock

    You can have (N) in chain as well. But a better way will be to while ending ur program end it the foll way..

    PHP Code:
    C                   SETON                                        LR
    C                   
    RETURN 
    Regards,
    KR

    Comment


    • #3
      Re: record lock

      Im gussing your not setting on LR but using return????/?

      this might be an interesting example for you
      Attached Files
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment

      Working...
      X