5 pts.
 Listing the IFS to a file
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

Answer Wiki:
Hi, You should be able to use an ls -R from the qshell and then pipe it to an output file. Regards, Martin Gilbert.
Last Wiki Answer Submitted:  August 5, 2008  3:35 pm  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 4,275 pts.