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



You don't know C# or vb or Java. Simple to do what you in PC language. Just
map a network drive to get access to the folder. If one shot deal is it
worth messing with rpg?


On Jan 20, 2017 7:39 PM, "midrange" <franz9000@xxxxxxxxx> wrote:

Justin,

You may get a cleaner simpler response, but here are two ways
1. qshell LS command
The -lT (- lower case L and upper case T -lT) parms see docs for other
parms
CHGVAR VAR(&LSCOMMAND) VALUE('LS -l /bncf/ > +
/QSYS.LIB/' *TCAT 'BAAFIL' *TCAT +
'.LIB/listfile.FILE/listfile.MBR')
QSH CMD(&LSCOMMAND)

Will give you a file with records like this
-rwx---rwx 1 JIMF 0 5465 Jan 14 21:56:05 2017
00982340.pdf

I don't know how to get LS to do a better date format.

Option 2 is the RPG read the IFS and you can get a better date format
(with
a few lines of code)
Several sites have IFS Listing programs, or I can post one I copied off
this
list in 2001 (old style)
You would end up either using array, data structure, or writing to a file
to
then RPG or sql to select the files to DEL

Jim Franz




-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Justin Taylor
Sent: Friday, January 20, 2017 7:21 PM
To: MIDRANGE-L (midrange-l@xxxxxxxxxxxx)
Subject: Read stream files by data/time?

Is there an API that will process all stream files within a dir by
date/time?


I'm inheriting a number of PDF files (about 625k) from our Windows team. I
need to catalogue and remove redundant files. I'm thinking that if I can
read the files in descending order by date/time, I can keep the first file
and just delete future redundant files.
--
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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
http://amzn.to/2dEadiD

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

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.