Thanks a bunch!!
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: Friday, September 18, 2009 5:46 PM
To: Midrange Systems Technical Discussion
Subject: Re: ExtProc('stat') and a timeout
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?