We need to list the contents of the IFS and then list the contents of each directory. We need to output this to a file so that we can put it on a PC. We can see how to read a directory when we know the path. However we can’t see how to list the IFS to a file. Does anyone know how to do this?
Software/Hardware used:
ASKED:
August 5, 2008 2:39 PM
UPDATED:
August 6, 2008 3:03 PM
A while back, I was wanting to do this as well, and saved some good links to sites about the IFS. One of them is here, which seems exactly what you’d need:
http://systeminetwork.com/article/ifs-directory-listing-cl
Unfortunately, that site now requires registration, which I don’t recall it needing when I first found it.
Also, about a year ago, I had also downloaded a utility to do this, but I don’t remember the site from where I got it. It’s an RPG ILE program which writes the output to a printer file, which is conditionally overridden to a data file, if the option is chosen. It uses some of the IFS functions/APIs available in the C runtime library, which can be accessed in an RPG (or other ILE language) via the QC2LE binding directory.
lstat (List status)
opendir
readdir
closedir