Although I don’t have a specific example, I’ve found these articles and sites quite informative, and they may give you some ideas about how to proceed.
This is for the IFS toolset from IBM.
I ran across this article a while back, but the site now requires membership, which wasn’t the case when I first found. Would you happen to be a member of System i Network?
This one may also help, as it discusses how to use the various IFS APIs that are available. Through these, you can process IFS files. Quoted from the article: “For a complete list of the IFS APIs, see the source file member named IFS in the source file named H in library QSYSINC: SRCFILE(QSYSINC/H) MBR(IFS)”
Thanks for the answer Cwc, this gives me a starting point.