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



midrange-l-request@xxxxxxxxxxxx wrote:

>   1. Output the contents of an IFS directory to a flat file
>      (pnelson@xxxxxxxxxx)
>
>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.

Paul:

Lots of ways I suppose... some that come to mind quickly:

1) Use a QShell utility such as ls to list the streamfiles into a temporary 
streamfile. Then use CPYFRMSTMF to copy that into a workfile.

2) Use the same QShell utility to list into a *USRSPC and then access the 
*USRSPC from CL. At least from the ls utility, each name will be delimited by 
x'25', i.e., a newline/linefeed character. Use the IFS name format to name the 
*USRSPC like </qsys.lib/mylib.lib/myspc.usrspc>.

3) If you have V5R2 (or I think a properly PTF'd V5R1), you could perhaps feed 
lines out of ls into an INSERT statement in the QShell db2 utility. That might 
insert the lines directly into a file CL could read. (Bonus: The db2 symlnk 
points to program QSYS/QZDFMDB2 and that program can be called from CL -- the 
SQL statement goes into the first parm. Most QSH utilities can be accessed 
similarly.)

Tom Liotta

-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertech.com


__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

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.