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
As an Amazon Associate we earn from qualifying purchases.