Hi
Have you ever tried the sql key word "QSYS2.IFS_OBJECT_STATISTICS" ?
Example: SELECT * FROM TABLE(QSYS2.IFS_OBJECT_STATISTICS(START_PATH_NAME =>
'yourIFSPath')) ORDER BY DATA_SIZE DESC;
Attention: May take some time, depending of the entries in the directory.
-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] Im Auftrag von
gio.cot via RPG400-L
Gesendet: Freitag, 14. Juni 2024 15:34
An: 'RPG programming on IBM i'
Cc: gio.cot
Betreff: Use SQL To Read IFS Directories
Hi all
I'm using the program written by Ted Holt at
https://www.itjungle.com/2014/08/27/fhg082714-story02/; i'm finding problems
(i think) when the size file i more than 1 GB. I try to better explain: in
a folder i have 3 files that the size is about more than 2 GB , when i run
SELECT *
FROM table (
rtvdir('/nascloud/XXXX') )
For these file grater than 2 GB, i find null values in the colunms
ACCESSTIME, MODIFYTIME , STATUSTIME etc etc and the side displayed is not
real size
I try to understand the problem reading the source .. possible that the
function "readdir" is obsolete ?
Can some help me to solve this problem
Thanks in advance
FILE SIZE ACCESSTIME MODIFYTIME STATUSTIME NBRLINKS
CCSID CODEPAGE OBJTYPE
QGPL_000000084.ZIP 1223904 <NULL> <NULL> <NULL> <NULL>
<NULL> <NULL> <NULL>
QGPL_000000104.ZIP 1223904 <NULL> <NULL> <NULL> <NULL>
<NULL> <NULL> <NULL>
QGPL_000000105.ZIP 1223904 <NULL> <NULL> <NULL> <NULL>
<NULL> <NULL> <NULL>
QGPL_000000115.ZIP 287695056 2024-06-14 11:38:57.000000 2024-06-14
11:38:57.000000 2024-06-14 11:38:57.000000 1 850 850 *STMF
As an Amazon Associate we earn from qualifying purchases.