PASE to the rescue..

I was working with a client over the Holidays looking at an issue where our save processes for the IFS kept failing to get a lock on a couple of IFS objects. The problem meant that the Sync Manager would constantly reload the request trying to get a hold of the objects which were never released so the request could never be fulfilled.

The objects only get updated a couple of times a day but the program which does the updating holds an exclusive lock on the objects at all times. Normally we could run the Save While Active request through the Sync Manager and it would capture the object OK, unfortunately in this instance (may be an IFS feature) the Save While Active process failed to capture the content of the file. Even if we ran a SAV command with the Save While Active parameters set the from the command line the save always failed with an “Object in Use” error.

Having spent a lot of time in the PASE environment recently I decide to try the pipe lining capabilities against the file to see if I could capture the content. I ran the command “cat FileName > NewFile”, this returned an error stating that it failed to copy the content but on review of the file I could see that the content had actually been copied. The directory is set up to automatically capture new object creations so when I checked the remote system I could see that the NewFile had been created in the directory on the target system, again in the PASE environment on the target system I ran a command to empty the file, this would ensure the content I captured would be the same once the second request completed. I changed to the working directory and ran the command “cat ” > FileName” which truncated the file to 0 bytes, I then copied the content of the NewFile to the FileName object using “cat NewFile > FileName”. I compared the content of the files on both systems which showed that everything was now in sync. To clean up all I had to do was delete the object on the source system and let HA4i clean up the target. Now the file is in sync between the systems and the client is happy.

I do not know the security implications of what we achieved and maybe its not meant to work that way, why the save process fails and yet the cat command is allowed access to the file is not clear. But maybe in the future it could find its way into the HA4i product as a method of re-syncing an IFS file without the Save While Active process, it may even work on objects in the /QSYS.LIB directories?

Chris…