Thinking out of the box a little in case the standard methods don’t work:
You could roll your own checker using JCIFS in Java or SMBPROTOCOL in Python perhaps.
Or if you have loaded Samba in the past on the i, you can use the smbclient to check things.
Or enable Windows server for SSH and use SSH for file transfer between the machines.
Or use JT400 functionality to transfer and check for files.
There are options other than QNTC these days.
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx<mailto:richard@xxxxxxxxxxxxxxxxx>
----------------------------------------------------------------------
message: 1
date: Fri, 8 May 2026 13:52:40 +0000
from: Greg Wilburn <gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
subject: RE: [EXTERNAL] How to check if exist in IFS (QTNC) a file
I use stat() to check for file size.
rc = stat(%trim(inStmf):mystat);
if rc < 0;
return rc;
endif;
Less than 0 is not found.
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of gio.cot via MIDRANGE-L
Sent: Friday, May 8, 2026 6:31 AM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: gio.cot <gio.cot@xxxxxxxxxxx>
Subject: [EXTERNAL] How to check if exist in IFS (QTNC) a file
EXTERNAL EMAIL - This email was sent by a person from outside your organization. Exercise caution when clicking links, opening attachments or taking further action, before validating its authenticity.
Secured by Check Point
Hi all
I would need to check in a windows server (mapped via QTNC), if exist a file
with partial name;
example: if i run "DSPLNK
OBJ('/qntc/zz-yy-appxx/XT/DOCS/TX/ORDERS/HIST/myfile_26_90501*') , i can
see that in the folder exist a file named "myfile_26_90501_11052026.txt"
can i do with clp or rpg run a command to check existance passing the file
partial name ?
usually i use extproc('access') File_Exists = access(pathptr:F_OK)
Thanks in advance
Gio
As an Amazon Associate we earn from qualifying purchases.