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
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
https://protect.checkpoint.com/v2/r01/___https://lists.midrange.com/mailman/listinfo/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzplNTAzOTY2ODA3ZmIxZDM4MjM3MjNlMWMzMWExNDczMTo3OjQzNDg6MDBlOGNiMGI4MzFlNWFmNGIzMjA4YTI5YTA2MTczYmFlODVlOGU2MDVkY2JmNTk4ZmUzOTk3MDQzY2MxZWUxYzpwOlQ6Rg<
https://protect.checkpoint.com/v2/r01/___https:/lists.midrange.com/mailman/listinfo/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzplNTAzOTY2ODA3ZmIxZDM4MjM3MjNlMWMzMWExNDczMTo3OjQzNDg6MDBlOGNiMGI4MzFlNWFmNGIzMjA4YTI5YTA2MTczYmFlODVlOGU2MDVkY2JmNTk4ZmUzOTk3MDQzY2MxZWUxYzpwOlQ6Rg>
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
https://protect.checkpoint.com/v2/r01/___https://archive.midrange.com/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzplNTAzOTY2ODA3ZmIxZDM4MjM3MjNlMWMzMWExNDczMTo3OjY1Y2Y6OTU0MjE5ZTI3MjIwNDU2OWQwNzc3YWRjZDU5M2M3NTNjYTk3MGE3ZTc3ZDcxZDZlYTdlMWI4ZjYyNTczZGY3YzpwOlQ6Rg<
https://protect.checkpoint.com/v2/r01/___https:/archive.midrange.com/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzplNTAzOTY2ODA3ZmIxZDM4MjM3MjNlMWMzMWExNDczMTo3OjY1Y2Y6OTU0MjE5ZTI3MjIwNDU2OWQwNzc3YWRjZDU5M2M3NTNjYTk3MGE3ZTc3ZDcxZDZlYTdlMWI4ZjYyNTczZGY3YzpwOlQ6Rg>.
Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.
[CAUTION! This email originated outside of the organization. Please do not open attachments or click links from an unknown or suspicious origin.]
Greg Wilburn
Director of IT
301.895.3792 ext. 1231
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 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.