For simple existence, Scott probably has a prototype of access() that does the trick. Now Rob's suggestion to use the SQL IFS info service is also excellent.
Vern
On Wed, 6 Sep, 2023 at 3:15 PM, Greg Wilburn <gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
To: midrange systems technical discussion
Inside a program, I just use a prototype of stat() from Scott's IFSIO_H
Tells you all kinds of stuff about the streamfile. If the return code is < 0 it doesn't exist.
dcl-s rc int(10);
dcl-ds mystat likeds(statds);
rc = stat(%trim(inStmf):mystat);
if rc < 0;
<file or directory doesn't exist>
Endif;
There's a large file version as well.
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx<mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx>> On Behalf Of Timothy Feldmeier
Sent: Wednesday, September 6, 2023 2:40 PM
To: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] What is the command to check if a file exists on the IFS Root directory
I only know the command to find if a file is in QDLS. But, how do I check the if the file is in the Root.
Thank You
Tim Feldmeier
Programmer Analyst, Applications Development
1431 Opus Place, Suite 530 | Downers Grove, IL 60515
Email: timothy.feldmeier@xxxxxxxx<mailto:timothy.feldmeier@xxxxxxxx><mailto:timothy.feldmeier@xxxxxxxx<mailto:timothy.feldmeier@xxxxxxxx>>
Phone: (331) 233-7921
[Email Logo]
[Graphical user interface, website Description automatically generated]<
https://www.shiproadrunnerfreight.com/newsweek-recognizes-roadrunner-as-one-of-americas-most-trustworthy-companies-2022/><
https://www.shiproadrunnerfreight.com/newsweek-recognizes-roadrunner-as-one-of-americas-most-trustworthy-companies-2022/>>
The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
--
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://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l.
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.]
As an Amazon Associate we earn from qualifying purchases.