ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

ifs file in use

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

  • ifs file in use

    I have an RPG program which creates a .csv file in my /home directory. When I attempt to open this file in Excel I get a message that the file is in use and can only be opened read-only. When I end the job which created the file, the lock on the file is released. What do I need to do to release the file without ending the job?

  • #2
    Re: ifs file in use

    Can you provide more information about how you created it? Did you use one of the many CSV utilities? Did you use the JDBC CSV support? The IFS APIs? The C file APIs? ... or how id you do it?

    I'm going to guess that you used one of the APIs, and for some reason, you never called the API to close the file.

    Comment


    • #3
      Re: ifs file in use

      I am using the IFS APIs, and the file is being closed.

      I have tried two ways to open the file in Excel, launching Excel by clicking on the file in Windows Explorer and by using STRPCO/STRPCCMD(start Excel...) from my RPG program with QCMDEXC.
      .
      The program was running in the *CALLER activation group and neither method could access the file. The first method resulted in a panel saying the file was in use and giving the option to open the file read-only. The second method resulted in a panel saying the file could not be accessed and gave 3-4 reasons that might explain the situation.

      I changed the activation group to *NEW and can now open the file in Excel using the first method, but only following an extended wait of 60-90 seconds (I am accessing the iSeries via the internet). The second method still fails, but there is no 60-90 second delay before I see the error panel.

      Comment

      Working...
      X