If you have QShell installed, try
qsh cmd('ls -l /home/assessments > ls.txt')
This puts something like the following into file ls.txt in your home directory:
total: 3.476
megabytes
drwxrwsrwx 4 VERNNBT 0 12288 Jan 14 15:08 Assessment Docs
drwxrwsrwx 4 VERNNBT 0 28672 Dec 24 20:34 Assessment Reports
-rwxrwxrwx 1 MJD 0 599465 Nov 1 10:14 Assessment Tool.zip
This is the authorization (d means directory, - means not a directory, l
means a symbolic link), some number I don't remember, the owner, another
number, the size, date of last change, I think, and the name.
Then CPYFRMSTMF to a flat physical with a logical that uses SST to break
out the fields, or CPYFRMIMPF with a FFD to put it into a physical file.
qsh cmd('ls /home/assessments > ls.txt') gives you just the file names:
Assessment Docs
Assessment Reports
Assessment Tool.zip
qsh cmd('ls -lF /home/assessments > ls.txt') gives you the list with a
special character after the file name that tells you what it is:
total: 3.476
megabytes
drwxrwsrwx 4 VERNNBT 0 12288 Jan 14 15:08 Assessment
Docs/
drwxrwsrwx 4 VERNNBT 0 28672 Dec 24 20:34 Assessment
Reports/
-rwxrwxrwx 1 MJD 0 599465 Nov 1 10:14 Assessment
Tool.zip*
ls -R will go down through subdirectories. So ls -RlF in my home directory
makes:
total: 526.436 megabytes
drwxrwsrwx 2 VERN 0 8192 Sep 27 12:02
nextlevel/
-rwxrwxrwx 1 VERNNBT 0 95261 Dec 4 10:47
overlay.ovl*
-rwxrwxrwx 1 VERN 0 361367952 Nov 26 2001
q5733lst.savf*
lrwxrwxrwx 1 VERN 0 30 Nov 7 13:07 testxxx@ ->
/qsys.lib/vern.lib/testxxx.pgm
home/VERN/./nextlevel:
total: 1.792 megabytes
-rwx------ 1 VERN 0 1786278 Sep 27 12:02 xcaspi.txt*
There are other flags - check out the QShell utility reference.
HTH
Vern
At 01:33 PM 1/22/2003 -0500, you wrote:
I'd like to get a list (output to a file) of files in an IFS directory, so
I can run some queries against it. Something similar to the DSPFLR
FLR(xxxx) TYPE(*DOC) OUTPUT(*OUTFILE) command for QDLS. Is there such a
thing, and if so, what is it?
Thanks.
As an Amazon Associate we earn from qualifying purchases.