Back to Blog
Ifs servicecenter fn6/23/2023 ![]() ![]() Providing I have the end of line parameter in my statement I can keep adding line to my file. Now I get the results I want, as the first statement just added a CRLF to the fifth line: In the first statement I am writing a null value to the file, which is two apostrophes next to each other ( '' ). Again I replace the file with my saved copy.Ġ1 CALL QSYS2.IFS_WRITE('/home/MyFolder/test.txt',Ġ2 CALL QSYS2.IFS_WRITE('/home/MyFolder/test.txt', Let me write a line to the file with just a CRLF character, and then write the line I want to add to the file. This must mean that the fifth line does not end with a character that IFS_WRITE understands as an end of line character. The line was appended to the end of the last line: Let me try to write again this time with the end of line character CRLF.Īlas, the same happened to the file as before. I deleted the file test.txt, and uploaded saved copy from my PC to the IFS folder. The line was appended to the file, but not as a new line, just as a continuation of the last line. SELECT * FROM TABLE(QSYS2.IFS_READ('/home/MyFolder/test.txt'))ĬALL QSYS2.IFS_WRITE('/home/MyFolder/test.txt', When I use the IFS_READ table function it shows the file's contents: I am going to start by using the file I was reading yesterday: test.txt. END_OF_LINE: Is not supported if IFS_WRITE_BINARY is used.REPLACE An existing file is replaced, deleted and a new one created. ![]()
0 Comments
Read More
Leave a Reply. |