× 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.



Paul,
Just an idea: You do not have to write the list of IFS files to a database.
You can use Qshell to process them one by one.

The following qshell script loops through the files and lists on the screen
their names, just like ls.

for ifs in *     ; do
    echo  $ifs
done


Now, look at these possibilities:

call a program for each file
---------------------------
for ifs in *     ; do
    system "call as400pgm parm('$ifs')"
done

append all files to a database file
---------------------------------
for ifs in *     ; do
    cat $ifs | rfile -awQ AS400LIB/AS400FILE
done

many more options are available.

Shalom Carmel
----------------
www.venera.com - Exposing iSeries insecurity




----- Original Message ----- 
From: "Shalom Carmel" <shalom@xxxxxxxxxx>
To: <midrange-l@xxxxxxxxxxxx>
Sent: Wednesday, April 27, 2005 2:13 PM
Subject: Re: Output the contents of an IFS directory to a flat file


> CRTPF FILE(yourlib/flatfile) RCDLEN(132)
> qsh cmd('ls -l | sed ''1d'' >
> /qsys.lib/yourlib.lib/flatfile.file/flatfile.mbr')
>
> Shalom Carmel
> --------------
> www.venera.com - Exposing iSeries insecurity
>
>
> ----- Original Message ----- 
> > date: Tue, 26 Apr 2005 19:56:35 -0400
> > from: pnelson@xxxxxxxxxx
> > subject: Output the contents of an IFS directory to a flat file
> >
> >
> > 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
> >
> >
> >
> >
> > ------------------------------
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.