× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Tim

Let's see - documentation says it returns an integer

int access(const char /*path/, int /amode/);


It returns 0 if your test is good. path is a regular character variable, null-terminated - can use something like what you have with stat. amode is by value, integer again. To test for existence, set amode = 0.

From Scott Klement's site - http://www.scottklement.com/rpg/ifs_ebook/morecmds.html

That'll give you what you need.

HTH
Vern

tim wrote:
Thanks Vern,

Do you have any sample code for this?



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: Friday, September 18, 2009 5:04 PM
To: Midrange Systems Technical Discussion
Subject: Re: ExtProc('stat') and a timeout

Hi Tim

I usually use "access" function for checking existence on the IFS. Unless there is something you need from "stat", "access" is lighter-weight, I believe. If it returns a zero, the object exists. That object can be a *DIR (folder). I don't know whether "access" will lock it up, however.

HTH
Vern

tim wrote:
I am using stat to determine if a folder exists. The folder is located on
a
windows server. Command works great when the server is up, but when the
server is down, the command locks up.
Code to check if folder exists...
statstr = '/qntc/11.0.0.15/flr/' + %char(name) + x'00';

xxyy = stat(statstr:mystat);

Is there a some kind of timeout value I can set so that this wont lock the
user screens?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.