× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



To expand on this, you can run QShell utilities from a CL program, the example given would be

qsh cmd('ls > myfile')

But it gets even better, since RCVF does not work against an IFS file, which the example's output file would be. The good news is, you can have the redirection (the right arrow) go to a physical file.

qsh cmd('ls > /qsys.lib/vern.lib/splf.file/splf.mbr')

puts the contents of your current directory (dspcurdir will tell you what it is) into member SPLF of file SPLF in library VERN. The member has to exist before running the command. It could be in QTEMP.

If you know the path where the files live, put it right after the "ls" . Take folder "/tmp", e.g.

qsh cmd('ls /tmp > /qsys.lib/vern.lib/splf.file/splf.mbr')

which gave me

Express51
brms
dlfm_QZDFMSVR_2b2.log
dlfm_QZDFMSVR_427.log
jakarta-tomcat-4.1.30.zip
s.slapd
stdio
templates
tomcat5028.zip

on one of our machines.

But this does not tell you which are directories. For that, use the following

qsh cmd('ls -F /tmp > /qsys.lib/vern.lib/splf.file/splf.mbr')

which gave me

Express51/
brms/
dlfm_QZDFMSVR_2b2.log*
dlfm_QZDFMSVR_427.log*
jakarta-tomcat-4.1.30.zip*
s.slapd=
stdio*
templates/
tomcat5028.zip*

I don't remember all the symbols, but the "/" means that entry is a directory. I checked, and the "=" means a socket. The "*" is supposed to mean an executable - not sure why a zip file is executable, but, oh well.

qsh cmd('ls -Fl /tmp > /qsys.lib/vern.lib/splf.file/splf.mbr')

gives you

total: 23.196 megabytes
drwxrwsrwx 2 DICK 0 45056 Apr 14 09:50 Express51/
drwxrwsrwx 2 QBRMS 0 53248 Apr 16 04:02 brms/
-rwxrwxrwx 1 QSYS 0 0 Jan 19 14:27 dlfm_QZDFMSVR_2b2.log*
-rwxrwxrwx 1 QSYS 0 0 Jun 10 2004 dlfm_QZDFMSVR_427.log*
-rwxrwxrwx 1 DICK 0 9719416 Jul 13 2004 jakarta-tomcat-4.1.30.zip*
srwxrwxrwx 1 QDIRSRV 0 0 Mar 23 21:01 s.slapd=
-rwxrwxrwx 1 DICK 0 0 Jun 26 2003 stdio*
drwxrwsrwx 4 DICK 0 45056 Dec 21 11:03 templates/
-rwxrwxrwx 1 QPGMR 0 13033613 Mar 5 04:38 tomcat5028.zip*


The "d" in column 1 means a directory - leave the "F" off the command if you want this "long" layout without the suffixes.

All this is in the QShell utilities manual - can be seen on InfoCenter - somewhere.

HTH
Vern


At 07:55 PM 4/26/2005, you wrote:

If you want the file names, do a ls > myfile in Qshell. I do this stuff a
lot when processing IFS stuff. Drop me a line if you want some code.

On 4/26/05 07:56 PM, "pnelson@xxxxxxxxxx" <pnelson@xxxxxxxxxx> wrote:

>
> I'm working on a method to automate the use of the GUNZIP utility Scott
> Klement pointed me to. Simply put, when I receive a bunch of these zipped
> files into a directory, I need to unzip them, and use the CPYFRMSTMF
> command to place them into a flat file. I would like to know if there is a
> way to output these file names into a file that could be read by a CL
> program (sorta like DSPFD permits using an outfile). DSPLNK wil only permit
> display to the screen and to a spool file. I really don't want to mess with
> CPYSPLF.
>
> TIA
>
> Paul Nelson
> Arbor Solutions, Inc.
> 708-670-6978  Cell
> pnelson@xxxxxxxxxx
>

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.