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



I know there are other ways to do this, but we dump the contents of the
directory into a file that we read in the program via a CL. Here is an
example of the CL program we use to populate the file with the contents from
a given directory:
DCL VAR(&LSCOMMAND) TYPE(*CHAR) LEN(200)
DCL VAR(&LIBRARY) TYPE(*CHAR) LEN(10) VALUE('QGPL')

CLRPFM FILE(TESTC)

CRTPF FILE(QGPL/TEMPMSDS) RCDLEN(200) +
OPTION(*NOSOURCE *NOLIST)

CHGVAR VAR(&LSCOMMAND) VALUE('LS +
/Reports/MSDSTEMP > +
/QSYS.LIB/QGPL.LIB/TEMPMSDS.FILE/TEMPMSDS.M+
BR')

QSH CMD(&LSCOMMAND)

CPYF FROMFILE(TEMPMSDS) TOFILE(TESTC) +
MBROPT(*ADD) FMTOPT(*NOCHK)

Hope this helps. I am pretty sure Scott Klement has some things on his
website about this.
Jeff Williams

On Tue, 17 Apr 2007 11:10:49 -0500, Steve Seroogy wrote
I know the way in a CL or RPG IV to see if there is a file that
exists in a specified path. But, I have a problem with a current
project I'm working on, I will not know the full name of the file.
I will only know the first 4 characters and the extension. Is
there a way to identify the existence of a file or the use of a wild
card (example: upld* or *.dat).

Steve Seroogy
Business Analyst
Phone: (262) 544-4811 x2734
Fax: (262) 968-9372

Generac Power System, Inc
Hwy 59 and Hillside Road
Waukesha, Wisconsin 53187

--
This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options, visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-
L-request@xxxxxxxxxxxx Before posting, please take a moment to
review the archives at http://archive.midrange.com/rpg400-l.


--
WOW! Homepage (http://www.wowway.com)


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.