I have a problem trying to read in my stream file and brain freeze on how to resolve it.
In my RPG ILE program I am creating a stream file in the IFS using the CGIDEV2 procedure WrtHtmlToStmf. Not sure if that has any relevance here.
In the same program I am then trying to read the same file using IFS_file2Var thanks to Aaron Bartell.
When it gets to the open statement on the given stream file the handle returns -1. It is unable to open the file.
I have looked at so many things including file permissions and code pages. It just won't open it.
I have a mapped network drive from windows to the IFS. I can see the file but am unable to copy or open it.
I have tried CPYFRMIMPF FROMSTMF and get "File system error occurred. Error number 3025."
I am able to view and copy the file to my pc using iSeries Nav for some strange reason?
I can also use WRKLNK and view the file that way.
Now if I substitute the file path & name created in the program with a file I have created myself the IFS_file2Var procedure happily works, as does CPYFRMIMPF and any other way I wish to access it.
What I thought may be the case is the file written using the CGIDEV2 proc was remaining open/locked? But if I sign off from the session which created it I am still unable to CPYFRMIMPF.
Any more ideas of what I can look at? Thanks.
In my RPG ILE program I am creating a stream file in the IFS using the CGIDEV2 procedure WrtHtmlToStmf. Not sure if that has any relevance here.
In the same program I am then trying to read the same file using IFS_file2Var thanks to Aaron Bartell.
When it gets to the open statement on the given stream file the handle returns -1. It is unable to open the file.
I have looked at so many things including file permissions and code pages. It just won't open it.
I have a mapped network drive from windows to the IFS. I can see the file but am unable to copy or open it.
I have tried CPYFRMIMPF FROMSTMF and get "File system error occurred. Error number 3025."
I am able to view and copy the file to my pc using iSeries Nav for some strange reason?
I can also use WRKLNK and view the file that way.
Now if I substitute the file path & name created in the program with a file I have created myself the IFS_file2Var procedure happily works, as does CPYFRMIMPF and any other way I wish to access it.
What I thought may be the case is the file written using the CGIDEV2 proc was remaining open/locked? But if I sign off from the session which created it I am still unable to CPYFRMIMPF.
Any more ideas of what I can look at? Thanks.
Comment