I know I can use the DIR (disk command, and it will put the data in *CURLIB/DIROUTPUT.DIROUTPUT, but it is a replacement,...
not an add, so I can only get one directory listing per FTP session.
I don't want to have to end the session, and restart it three times. Any suggestions? Am I missing something?
DIR direct1/*.* > DIROUTPUT.DIROUTPUT
The > symbol redirects the output to the file specified. This will, as you say, replace any data in the file. So, use this for the FIRST directory listing in your session, then for the OTHER two, use :
DIR direct2/*.* >> DIROUTPUT.DIROUTPUT
DIR direct3/*.* >> DIROUTPUT.DIROUTPUT
Using the > symbol twice means 'append the data to the file'.
Dig Deeper on FTP
Related Q&A from John Blenkinsop
When an error occurs on an IBM command, the diagnostic messages are sent first, then an escape message, which you can monitor. On AS/400 you see the ...continue reading
RPGIV will 'think of' incoming integer fields as binary, and then will redefine them in the program structures as PACKED. So, when you chain a record...continue reading
When AS/400 running STOP gives the error message 'Space offset X'0015FF00' or X'0000000000000000' is outside current limit for object QIGC2424C', the...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.