ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

DSPF file is left LOCKED after use...

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

  • DSPF file is left LOCKED after use...

    Any idea why after exit the RPG which displays DSPF file - the file is still left LOCKED as:



    Work with Object Locks
    System: CITROEN
    Object: GLDSPF Library: UTIL Type: *FILE-DSP

    Type options, press Enter.
    4=End job 5=Work with job 8=Work with job locks

    Opt Job User Lock Status
    QPADEV000P ESGONEN *SHRNUP HELD



    is there anyway to release it ? what happens is that I cannot recompile the DSPF if anyone is using it...


    thanks !!











    Bottom
    F3=Exit F5=Refresh F12=Cancel

  • #2
    Re: DSPF file is left LOCKED after use...

    Hi Gonen,

    Looks like u r ending ur RPG program with Return opcode.
    Bcse in this case files will not be closed and will stay open by ur program even though execution is completed.


    If this is the case, end ur program with *INLR or explicitly close ur display file.
    Thanks,
    Giri

    Comment


    • #3
      Re: DSPF file is left LOCKED after use...

      Thats the nature of display files....as programs are called with that display file.
      that display file is locked by that program. In most cases you have to send a message to the user with the lock and ask them to back out of the program as you recompile the display. This is how it has been since the beginning.

      jamie
      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


      • #4
        Re: DSPF file is left LOCKED after use...

        a bit confused...


        1. Does the user have to actually LOGOFF so that I can re-compile the DSPF file ?
        2. Is there a command he can run to RELEASE the DSP file without LOGOFF ?

        I exit the RPG as:

        C if *in03 or *in12
        C eval @Scrn1 = 'N'
        C return
        C endif


        thanks for any idea !!

        Comment


        • #5
          Re: DSPF file is left LOCKED after use...

          I see said the spider to the fly!!!

          When you use return instead of
          Eval *INLR = *on

          *all files in the program are left in an open status.

          either use eval *inlr = *On --or--

          make your display file usropn

          then change your exit to this

          C if *in03 or *in12
          C eval @Scrn1 = 'N'
          c close mydisplay
          C return
          C endif

          remember you will have to open the display before you
          do any action against it.
          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


          • #6
            Re: DSPF file is left LOCKED after use...

            perfect - thanks !!

            Comment

            Working...
            X