HP3000-L Archives

January 1995, Week 2

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:
Rich Trapp <[log in to unmask]>
Reply To:
Rich Trapp <[log in to unmask]>
Date:
Wed, 11 Jan 1995 08:25:13 MST
Content-Type:
text/plain
Parts/Attachments:
text/plain (44 lines)
John ([log in to unmask]) writes:
>
> I've been trying to code an application that calls for some serious I/O
> to another LDEV (ctrl chars, non-fixed records...).  The code looks kinda
> like this:
>
>         call command("file ftnxx...",0,0)
>         dev=fopen("ftnxx"...)
>         call fwrite(dev,buf...)
> ...etc
>
> Now, I'm positive the file equate works (I can do a :PRINT file;OUT=FTNXX
> ), but the code just refuses to output anything.  Some of my attempts
> have resulted in errors, no errors (no output), and even a few times it
> would halt at the fopen command for 15 minutes.
 
[snip]
 
Just taking a stab at this...I used to do this alot a few years back.
Depending on the FOPEN options, you may be requesting different access to the
device than the PRINT command is using.  Also you may need to specify the
NEW option to avoid generating a REPLY request.  This may explain why it hangs
for 15 minutes or so.
 
I've had good luck with:
   :FILE term,NEW;DEV=nnn;ACC=INOUT
 
This allows both read and write to the ldev (if it's AVAILable) and doesn't
generate a REPLY request on the console.
 
Also be sure to check the Condition Code after the FOPEN to ensure it actually
worked.  Call PRINTFILEINFO if it's not CCE and that should give you a good
FSERROR number to lookup.
 
Rich.
--
______________________________________________________________________
________ Dynamic Information Systems Corp.   |
\!DISC / Rich Trapp                          | My opinions are my own.
 \    /  OMNIDEX Product Manager - IMAGE/SQL | With any luck they're
  \  /   Phone : 303 444-4000                | correct ;-)
   \/    E-mail: [log in to unmask]                |
----------------------------------------------------------------------

ATOM RSS1 RSS2