Also forgot to mention.
Use my QSHEXEC CL command to run ls, smbclient, python app, etc and automatically redirect results to an outfile.
https://www.github.com/richardschoen/qshoni
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
-----Original Message-----
From: Richard Schoen
Sent: Thursday, September 02, 2021 9:57 AM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: RE: How to provide an RPG ILE program with a list of files in a QNTC directory
ls command in QSH/PASE perhaps.
Samba smbclient app in QSH/PASE perhaps (QNTC not needed)
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
------------------------------
message: 3
date: Thu, 2 Sep 2021 14:34:00 +0200
from: Maria Lucia Stoppa <mlstoppa@xxxxxxxxx>
subject: How to provide an RPG ILE program with a list of files in a
QNTC directory
Hi all,
Hope you are all fine.
For a new RPG ILE procedure, I have to list the content of a directory defined under QNTC.
The directory is reachable and readable by a specific user and from within WRKLNK everything works fine.
Now, I am looking for the right technique, or simply the most appropriate, to list the directory content inside an RPG ILE program.
These are my unsuccessful tries, all executed under the owner control and
authorization:
1. RTVDIRINF DIR('/QNTC/FS1-21/myFolder') -> final files are empty
2. ftp '127.0.0.1' -> ls -l /QNTC/FS1-21/myFolder -> "Path does not
exist"
3. via SQL from TABLE(IFS_OBJECT_STATISTICS) -> explicitly won't work
and I couldn't find a better choice
The only successful try was:
DSPLNK OBJ('/QNTC/FS1-21/myFolder/*') OUTPUT(*PRINT) which obliges me to read the spool file right after.
I unsuccessfully looked through midrange.com archives and neither was the IBM official documentation of help.
Is coding using API the only alternative?
Thank you all and have a great day
Lucia
As an Amazon Associate we earn from qualifying purchases.