
This post continues yesterday's theme of doing things to files in the IFS with SQL. Then it was how to read an IFS file, today will be the opposite writing to an IFS file.
This was added in the latest round of Technology Refreshes, IBM i 7.4 TR3 and 7.4 TR3. Prior to these TRs I had used C APIs embedded in a RPG program. Having played with this this is so much easier using these new SQL procedures.
As with the IFS read table function there are three different SQL procedures to write to an IFS file:
- IFS_WRITE: Write plain text to the IFS file
- IFS_WRITE_UTF8: Write UTF8 text
- IFS_WRITE_BINARY: Write binary text
All of these procedure have the same parameters: