Return to the IFS Tips
AS/400 DIR for IFS directories
Q. I'm trying to programmatically generate a list of objects in an IFS directory. I'm trying to use opendir() and readdir(), but since I am not a C programmer, I wasn't able to understand how to define these APIs' parameters in RPG. Any ideas?
A. There's a freeware DIR command for the IFS that will list the contents of an IFS directory on the screen, to a printer, or in an outfile. The program comes in two versions, one for V3R7 and one for V4R4, and each comes with source code.
You can download the DIR programs from the following page http://www.ediconsulting.com/EDIdownloads.htm.
Adapted from an answer by Carl J. Galgano
DIR was written by Peter Connell
[report a broken link by clicking here]