Subject: | |
From: | |
Reply To: | TRAPP,RICH (Non-A-Loveland,ex1) |
Date: | Fri, 14 Apr 2000 09:43:38 -0600 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Chris,
NO NO NO! Don't do it the HARD WAY!
In Transact, you have complete access to the file number (that you'd
normally get from a call to FOPEN). If you need to call fcontrol or fcheck
you can just call it & pass the file number as (FILEID(file-name)) & you
can skip the FOPEN and use the Transact READ & WRITE verbs.
Also note that Transact has some predefined error handling code (see the
section called "Using the STATUS Option" in chapter 7.) which is designed
for these kind of timeout checks. There's even an example of using
FILE(READ) with a timeout under the FILE(read) section!
Ok enough of the lecture. If you've already got it working, don't change
it on my account...just wanted to let you know that it's not as hard as we
make it sometimes.
If you're using Transact/ix, all you should need to do is make sure you've
got DEFINE(INTRINSIC) FCHECK; in the program so it knows it's an intrinsic,
then you can ignore the bitmap business.
If you're using compatibility mode (i.e. Transact/V) instead of
Transact/iX, it's a pain to call in Transact. FCHECK is an "option
variable" intrinsic which means you have to pass the extra "bitmap"
parameter to tell Transact which parameters you actually want to pass. (see
the PROC verb). If you only want the errorcode , I think the bitmap value
would be binary(11000) or decimal 24.(the 1's represent the parameters
you're passing) so the call should look something like this:
let (bitmap) = 24;
PROC FCHECK(#(filenumber), (errorcode), , , ,#(bitmap));
If you get more specific, I'd recommend subscribing the RAPID discussion
list at http://www.interex.org/cgi/lists.cgi?list=rapid. Once you're
subscribed, you can email your questions to the dedicated folks on that
list.
RAT
_______________________________________________________________________
Rich Trapp "RAT"
Managed Business Solutions [log in to unmask] http://www.mbsnav.com
Assigned to Design Automation Support at Agilent Technologies
Telnet or 970-679-2221 [log in to unmask] Loveland, CO USA
_______________________________________________________________________
-----Original Message-----
From: Chris Schofield [mailto:[log in to unmask]]
Sent: Friday, April 14, 2000 8:42 AM
To: [log in to unmask]
Subject: Fcheck and Transact
Hi There
I am currently trying to write a TRANSACT program that will wait on a MSG
file with a timeout.
I am attempting to do this using system intrinsics
FOPEN
FREAD
FCONTROL
FCLOSE
and finally the one I am struggling with
FCHECK
I cannot get the call right. The complier complains about invalid
parameters.
Any ideas would be gratefully received
Regards
Chris
|
|
|