HP3000-L Archives

April 2001, Week 4

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:
Randy Medd <[log in to unmask]>
Reply To:
Date:
Wed, 25 Apr 2001 10:20:15 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (62 lines)
Pete wrote:

> The program issues an FOPEN intrinsic call with the following
> parameters:
>
> * L-FILE-NAME defined as X(08) with a value of "ROCKWELL"
> * L-FOPTIONS defined as S9(01) COMP with a value of octal 4
> (i.e. a new file, ascii format, fixed length, no carriage control, no tape
> labels, allow file equations, standard file)
> * L-AOPTIONS defined as S9(01) COMP with a value of octal 104
> (i.e. read/write access, no multiread, disallow dynamic locking, exclusive
> access, normal buffering, no multi access, and disallow nowait I/O access)

Change L-FOPTIONS to decimal 388 (octal %604) (CCTL, undef, ASCII),
L-AOPTIONS to decimal 324 (octal %504) (NOBUF, exclusive, R/W), and
add (if not already there) the next of the optional FOPEN parameters,
RECLEN, set to some value at least as big as the largest record you
expect to read from the connected device.  (Specify a byte-count as a
negative integer value.)

Then, if you haven't done so, make the following intrinsic calls
(please translate to COBOL as an exercise.)

  L'PARM:=10;
  FCONTROL(L'FILE'NBR,38,L'PARM);  ! Set term-type 10 - may be redundant
  L'PARM:=%177415;                 ! ::= 0xFF0D
  FCONTROL(L'FILE'NBR,41,L'PARM);  ! Set unedited mode, with CR terminator
  L'PARM:=0;
  FCONTROL(L'FILE'NBR,13,L'PARM);  ! Disable echo
  FSETMODE(L'FILE'NBR,4);          ! Disable LF-at-EOL echo

If the parity of the attached device is significant:

  L'PARM:=0;  ! Mark::=1, Even::=2, Odd::=3, None::=4
  FCONTROL(L'FILE'NBR,36,L'PARM);
  L'PARM:=1;
  FCONTROL(L'FILE'NBR,24,L'PARM);

While you're at it, you might as well enable type-ahead, too:

  L'PARM:=1;
  FDEVICECONTROL(L'FILE'NBR,L'PARM,-2,192,51,3,IERR'NUM);

When/if you write to the device, the recommended scheme is to handle
any/all carriage-control in the data-stream.  e.g. to send "hello"+CR
use:

  move BUF:=("hello",%(16)0D);
  FWRITE(L'FILE'NBR,L'BUF,-6,%320);

_not_:

  move BUF:="hello";
  FWRITE(L'FILE'NBR,L'BUF,-5,0);

------------
Randy Medd
Telamon, Inc.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2