Nutangujar
750 pts. | Aug 25 2009 1:40AM GMT
yeah…i did that..Thanks….
also to be on the safer side, in my RPG i check if the file is %Open in initialize routine. If yes then i Close the file first and then open…but that sounds weird to me…….I’m thinking of a scenario at client site…wat if such kinda mystery happens…i dun want my program to bomb…
TomLiotta
7785 pts. | Oct 11 2009 9:48AM GMT
The RPG %open() BIF will report whether this program opened the file and has not yet closed it. That’s not the same as reporting if the file is open or closed. There are ways for other programs to close files. If your program opens a file, %open() will return ‘true’ until your program closes the file — even if the file was closed by a different program.
Note that actions such as RCLRSC can close files. With recent Java Toolkit distributed transactions, the server program can close all files after transaction completion (potentially causing trigger programs problems if they expect secondary files to remain open; PTFs are available to control this).
Make sure that you use features that are appropriate. RCLRSC buried somewhere in a job using ILE activation groups, for example, is not appropriate.
Tom






