Thanks Dennis,

I tried that and  no error is generated, regardless of the ERROR MESSAGES 
setting.

I'm using 9.1 (32).

I don't understand why ERROR MESSAGES needs to be on. I certainly don't want 
error messages appearing in my applications.

Specifically, with the file "test.txt" open...

SET ERROR MESSAGES ON
SET ERROR VARIABLE ev
OUTPUT test.txt
SET V x=.ev
OUTPUT SCREEN
SHOW V x

...displays 0.

What is the value of the error variable that you get?


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

From: [email protected] [mailto:[email protected]] On Behalf Of Dennis McGrath
Sent: Monday, January 28, 2013 12:02 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Is a file Open?

SET ERROR MESSAGES ON
This should be left on permanently.

I like to test the file before the print


OUTPUT .vFileSpec
Set var vHoldError = .MyErrorVariable
OUTPUT SCREEN
if vHoldError <> 0 then -- file cannot be opened
    --whatever
endif




Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
From: [email protected] [mailto:[email protected]] On Behalf Of Stephen Markson
Sent: Monday, January 28, 2013 10:28 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Is a file Open?

Good day,

How does one check if a file is open (in use)?

If you do R> OUTPUT somefile,
or R> PRINT reportname OPTION PDF|FILENAME somefile,
and someone has the file open, then nothing is produced.

As far as I can tell, the error variable is not set and SQLCODE is not affected.


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251


Reply via email to