HP3000-L Archives

April 2000, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Steve Dirickson <[log in to unmask]>
Reply To:
Steve Dirickson <[log in to unmask]>
Date:
Sat, 15 Apr 2000 01:11:25 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
It takes about 4 lines of code, and no intrinsic calls are required:
  let (WHATEVER) = <your timeout value in seconds>;
  file(control) FILENAME,code=4,parm=WHATEVER;  <<note: no parentheses
around the variable>>
  find(serial) FILENAME,list=(...),status;
  if status = 22 then  <<the read timed out>>
(this is off the top of my head, so the usual disclaimers apply)

The Transact manual says that the timeout has to be set before each
call. Technically, that's correct, because it's talking about a
terminal read. For message files, you set the timeout value once, and
it stays set until you change it. Also, the example in the Transact
manual under the FILE verb shows a status return of -4 and *not* using
the ',status' option; that is a Transact technique and a
Transact-generated value specific to a terminal read via DATA and its
brothers. For a message file, you use the ',status' option, and what
you get back is the file system error value (the value you would get
from FCHECK).

Another potential 'gotcha': make sure that you understand the EOF
condition and "extended wait" as they apply to message files.

Ken, grab the INVIPC-read code block out of BLINVIPC.BASELINE; I think
it's a little simpler than the code in DOCIPC.


Steve Dirickson   WestWin Consulting
[log in to unmask]   (360) 598-6111



> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
> Behalf Of Chris Schofield
> Sent: Friday, 14 April 2000 07:42
> 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

ATOM RSS1 RSS2