



 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                            MANUFACTURING AUTOMATION
                            RSX QUEUEING AND ROUTING
                              PROGRAMMER'S MANUAL
                                AND USER'S GUIDE
                                 Revision: 1.4
                                  13-APR-1988
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
     By: Earl Lakia
         Staff Engineer
         Process Automation Dept.
         Inland Steel Co.
     and: 
         David Lueck 
         Engineer
         Process Automation Dept.
         Inland Steel Co. 
      



                                        CONTENTS



     CHAPTER 1       INTRODUCTION

             1.1     QUEUEING OVERVIEW  . . . . . . . . . . . . . . . . 1-1
             1.2     ROUTING OVERVIEW . . . . . . . . . . . . . . . . . 1-1
             1.3     QUEUEING COMPONENTS  . . . . . . . . . . . . . . . 1-1
             1.4     ROUTING COMPONENTS . . . . . . . . . . . . . . . . 1-2
             1.5     DOCUMENTATION GENERATION . . . . . . . . . . . . . 1-2


     CHAPTER 2       QUEUE FUNCTIONS

             2.1     QUEUE PHYSICAL FLOW  . . . . . . . . . . . . . . . 2-1
             2.2     ACP/DRIVER CONTROL . . . . . . . . . . . . . . . . 2-2
             2.2.1     DRIVER I/O LIST  . . . . . . . . . . . . . . . . 2-2
             2.3     QUEUEING FUNCTIONS . . . . . . . . . . . . . . . . 2-3


     CHAPTER 3       QUEUE MAINTENANCE TASK

             3.1     FILES REQUIRED . . . . . . . . . . . . . . . . . . 3-2


     CHAPTER 4       ROUTING TASK

             4.1     ROUTING SPECIFICS  . . . . . . . . . . . . . . . . 4-1
             4.1.1     SPEED ENHANCEMENTS . . . . . . . . . . . . . . . 4-2
             4.2     ROUTING DATABASE . . . . . . . . . . . . . . . . . 4-2
             4.2.1     RTRDEF . . . . . . . . . . . . . . . . . . . . . 4-3
             4.2.2     NODE . . . . . . . . . . . . . . . . . . . . . . 4-3
             4.2.3     ROUTE  . . . . . . . . . . . . . . . . . . . . . 4-4


     CHAPTER 5       ZQDRV


     CHAPTER 6       QUEUE SUBROUTINES

             6.1     ACKQ.MAC . . . . . . . . . . . . . . . . . . . . . 6-2
             6.1.1     ACKQ   . . . . . . . . . . . . . . . . . . . . . 6-2
             6.2     ATCHQ.MAC  . . . . . . . . . . . . . . . . . . . . 6-5
             6.2.1     ATCHQ  . . . . . . . . . . . . . . . . . . . . . 6-5
             6.3     DELQ.MAC . . . . . . . . . . . . . . . . . . . . . 6-7
             6.3.1     DELQ   . . . . . . . . . . . . . . . . . . . . . 6-7
             6.4     DISCQ.MAC  . . . . . . . . . . . . . . . . . . . . 6-9
             6.4.1     DISCQ  . . . . . . . . . . . . . . . . . . . . . 6-9
             6.5     INITQ.MAC  . . . . . . . . . . . . . . . . . . .  6-11
             6.5.1     INITQ  . . . . . . . . . . . . . . . . . . . .  6-11
             6.6     READHD.MAC . . . . . . . . . . . . . . . . . . .  6-13
             6.6.1     READHD   . . . . . . . . . . . . . . . . . . .  6-13
             6.7     READID.MAC . . . . . . . . . . . . . . . . . . .  6-15
             6.7.1     READID   . . . . . . . . . . . . . . . . . . .  6-15
                                                                     Page 2


             6.8     READQ.MAC  . . . . . . . . . . . . . . . . . . .  6-18
             6.8.1     READQ  . . . . . . . . . . . . . . . . . . . .  6-18
             6.9     RNAQ.MAC . . . . . . . . . . . . . . . . . . . .  6-22
             6.9.1     RNAQ   . . . . . . . . . . . . . . . . . . . .  6-22
             6.10    WRITEQ.MAC . . . . . . . . . . . . . . . . . . .  6-24
             6.10.1    WRITEQ   . . . . . . . . . . . . . . . . . . .  6-24
             6.11    WRTRTR.MAC . . . . . . . . . . . . . . . . . . .  6-27
             6.11.1    WRTRTR   . . . . . . . . . . . . . . . . . . .  6-27
             6.12    VAXQAD.MAC . . . . . . . . . . . . . . . . . . .  6-30
             6.12.1    VAXQAD . . . . . . . . . . . . . . . . . . . .  6-30
             6.12.2    VAXQDD   . . . . . . . . . . . . . . . . . . .  6-31


     CHAPTER 7       APPLICATION GUIDE

             7.1     APPLICATION PROGRAMMING NOTES  . . . . . . . . . . 7-1
             7.2     COMPILING, ASSEMBLING, AND TASK BUILDING . . . . . 7-2
             7.3     TEST PROGRAMS  . . . . . . . . . . . . . . . . . . 7-2


     CHAPTER 8       INSTALLATION GUIDE

             8.1     QUEUEING AND ROUTING STARTUP . . . . . . . . . . . 8-2


     APPENDIX A      MESSAGE STRUCTURES


     APPENDIX B      ROUTING DATABASE MACROS


     APPENDIX C      ERROR CODES

             C.1     ERRORS RETURNED BY DRIVER/ACP  . . . . . . . . . . C-1
             C.2     ACP ERRORS . . . . . . . . . . . . . . . . . . . . C-3
             C.3     ROUTER ERRORS  . . . . . . . . . . . . . . . . . . C-6












                                   CHAPTER 1

                                  INTRODUCTION



     This Document explains the RSX11M-Plus version  of  the  Manufacturing
     Automation  Queueing  and Routing software.  The reader should also be
     familiar with the VAX/VMS version.



     1.1  QUEUEING OVERVIEW

     The same functions  that  are  available  from  the  VAX/VMS  Queueing
     software  (herein  called  Queue Services) are also available from the
     RSX Queueing software.  The way in which  the  Queue  is  managed  and
     accessed are different between the two operating system environments.



     1.2  ROUTING OVERVIEW

     The RSX router provides the same functions as the MA_ROUTER running on
     a  VAX/VMS  node.  Specifically, the RSX router performs the following
     functions:

          1.  Guaranteed delivery of messages removed  from  the  host  RSX
              Queue  and transmitted to a remote DECNET node which supports
              the MA_ROUTER protocol.

          2.  Guaranteed reception and queueing of messages received from a
              remote DECNET node which supports the MA_ROUTER protocol.

          3.  Automatic link reestablishment.

          4.  Multiple links by a single router.




     1.3  QUEUEING COMPONENTS

     The following RSX tasks support message queueing on an RSX node:

           o  ZQDRV -- This is a pseudo device  driver  that  provides  the
              interface  between  the  application  tasks  and the ACP that
              performs all queueing  functions.   The  applications  simply
     INTRODUCTION                                                  Page 1-2
     QUEUEING COMPONENTS                                      13 April 1988


              issue  queueing  requests  (write  to Queue, read from Queue,
              etc.) to ZQ0:   via  the  QIO  directive  and  wait  for  the
              requests to be processed by the ACP.

           o  QUEACP -- This is the queueing ACP that processes  all  valid
              Queue requests received from the application tasks via the ZQ
              driver.  This is the only task that accesses the Queue  (file
              MAQUEUE.DAT).

           o  QMT -- This task maintains the Queue (file  MAQUEUE.DAT)  and
              the message ids (file QUEUEIDS.DAT).

           o  TSTACP --  This  task  can  be  used  to  test  all  queueing
              functions available through the ZQ driver and the ACP.




     1.4  ROUTING COMPONENTS

     The following RSX tasks support message routing on an RSX node:

           o  RTRRSX -- This task is responsible for  sending  messages  to
              another  node supporting either the RSX router (this task) or
              the VMS router (Process MA_ROUTER).  It is  also  responsible
              for  receiving  any  messages  sent  from  another node.  All
              communication with another node is provided by  the  standard
              DECnet  RSX  system  directives.   All routing information is
              stored in a routing database.  This database is an  installed
              common region named RTRDBS.

           o  FNDSRV -- This task translates a logical node  name  into  an
              actual  node  name.   The  task  is  requested  to run by the
              routing  task  RTRRSX  whenever  the  node  the   router   is
              attempting  to  connect  to is flagged as a logical node.  It
              will supply the routing task with the actual name of the node
              so that the routing task will be able to make a connection.

           o  NRBDMP -- This task displays  information  contained  in  the
              routing  database.  It will display which nodes are currently
              connected to the routing task  RTRRSX  (i.e.   logical  links
              established  with routers on remotes nodes) and which message
              ids are destined to the remote nodes.




     1.5  DOCUMENTATION GENERATION

     This manual exists in the file MARSXQ.LIS.  It is generated  from  the
     Runoff  file  MARSXQ.RNO  using  Runoff  commands  in the command file
     MARSXQ.CMD.  Since the Runoff task used is the DSR  (Digital  Standard
     Runoff) available only on a VAX/VMS system, the following must be done
     to update and regenerate this document:
     INTRODUCTION                                                  Page 1-3
     DOCUMENTATION GENERATION                                 13 April 1988


          1.  Copy MARSXQ.RNO to MA_RSX_QUEUE.RNO on the VMS system.

          2.  Copy MARSXQ.COM to MA_RSX_QUEUE.COM on the VMS system.

          3.  Edit MA_RSX_QUEUE.RNO.

          4.  Issue the command  @MA_RSX_QUEUE  to  create  the  list  file
              MA_RSX_QUEUE.LIS.













                                   CHAPTER 2

                                QUEUE FUNCTIONS



     The Queue in the RSX environment exists on the disk  as  a  contiguous
     disk  file  that  is  multi-threaded (one thread for each message id).
     The Queue is divided into four major parts:

          1.  The Queue header.

          2.  The message id headers.

          3.  The Queue message block bitmap.

          4.  The actual Queue message blocks.

     All messages are written to a message id  subqueue  pointed  to  by  a
     message id header.  A message id header points to the first message in
     a message id subqueue, the first message points to the second  message
     in  the  message  id  subqueue,  etc.   If  there are no messages in a
     message id subqueue, the message id header pointers are zero.

     The creation of the Queue itself and the maintenance of the  Queue  is
     done  by the Queue Maintenance Task (QMT).  The Queueing software does
     not support the addition, modification, or  deletion  of  message  ids
     without the creation of a new Queue.  (This may involve a bootstrap as
     the most convenient method of installation.)

     The access to the Queue is via the  ZQ  device  driver,  Queue  access
     subroutines  (these  allow easy application program interfaces but are
     not mandatory), Queue ACP "QUEACP", and the normal disk driver for the
     disk volume on which the Queue is installed.



     2.1  QUEUE PHYSICAL FLOW

     Figure one shows an overview of the queueing  functions.   The  QUEACP
     ONLY  uses  the file system to open the Queue file to get the starting
     and ending logical blocks of the file; from then on it uses  only  the
     disk  driver.  The ACP also reads the header of the Queue into memory,
     region QUEHED, for faster access and only writes the  header  back  to
     disk  after  certain  queueing  functions  have  been  completed.  The
     following narrative explains the simple write and read to the Queue.
     QUEUE FUNCTIONS                                               Page 2-2
     QUEUE PHYSICAL FLOW                                      13 April 1988


     For either the write or  the  read,  the  application  must  assign  a
     Logical Unit Number to the ZQ device.

     For the READ function, the following are the steps required:

          1.  Call INITQ subroutine to set up the  exit  handlers  for  any
              message id that may be connected.

          2.  Call ATCHQ subroutine to attach for a read on  the  specified
              message id (multiple calls are required if more than a single
              message id will be dequeued by this task).

          3.  CALL READQ subroutine (assuming that there was a  message  to
              be dequeued) to read the desired message id message.

          4.  Process the message.

          5.  CALL ACKQ subroutine to acknowledge the message.   This  will
              delete the message completely from the Queue.

          6.  CALL DISCQ subroutine when complete to cancel  all  connected
              message ids.


     For the WRITE function, the task need only call the WRITEQ  subroutine
     to write the message to the Queue.



     2.2  ACP/DRIVER CONTROL

     The Queue was implemented as a device driver and as an ACP  such  that
     no  address space would be used by the queueing functions.  The job of
     the ZQ device driver is simply to provide address relocation,  a  FIFO
     queue  by  priority,  and  a  standard  interface  required by the RSX
     executive.



     2.2.1  DRIVER I/O LIST

     Each I/O packet is interpreted prior to being  queued  to  the  device
     driver I/O list (S.LHD of the SCB).  The driver will forward all valid
     packets immediately to the ACP if it is mounted or if the command is a
     mount  command.   If  the  command  is  the  IO.DAC command (issued by
     calling queueing routine INITQ), the I/O packet  is  threaded  to  the
     device  driver;  however,  it  will  never be dequeued unless the task
     either exits or does IO.KIL to the device driver (by calling  queueing
     routine  DISCQ).   When  this happens, the request is forwarded to the
     ACP as a special packet (simply a buffer acquired  from  primary  pool
     that  is  the  same  size, etc.  as a normal I/O packet); however, the
     actual requested I/O packet will be processed by the  ACP  before  the
     ACP processes the special I/O packet.
     QUEUE FUNCTIONS                                               Page 2-3
     QUEUEING FUNCTIONS                                       13 April 1988


     2.3  QUEUEING FUNCTIONS

     The QUEACP provides the following functions via the ZQ  device  driver
     when the ACP is mounted.

          1.  IO.WVB- This function is called  to  write  a  message  to  a
              message  id  subqueue.   The  message  id and the message are
              passed to the function.  The type  of  the  message  is  also
              specified  for recovery actions in the event the subqueue for
              the specified message id is full.

          2.  IO.WVB+1- This function is the same as IO.WVB,  but  is  only
              used  by  the  routing  task, RTRRSX, to bypass writing a new
              header when the message is received from the remote node.

          3.  IO.RVB- This function is called to read the first message  in
              a message id subqueue.  The message id and the message buffer
              are passed to the function.   The  second  word  of  the  I/O
              status  block  will  contain  a  "read  but  not acknowledged
              identifier" which must be used to acknowledge the message  in
              the  Queue.  The size of the message can be determined by the
              header portion of the message.

          4.  IO.ACR- This function allows any task to request notification
              whenever  messages are received for the specified message id.
              The ACP will determine if the task  is  able  to  accept  the
              notification  prior to doing the notification (i.e.  the task
              is  still  in  the  system  and  part  of  the  system   task
              directory).   The  connected task will be notified by setting
              the task's event flag.

          5.  IO.ACW- This function is used in conjunction with the  IO.RVB
              so  that  a  task  that just read and processed a message can
              also acknowledge the message.  Acknowledging a message causes
              the message to be deleted.

          6.  IO.RNA-  This  function  will  place   the   read   but   not
              acknowledged  message  back at the beginning of the specified
              message id subqueue.

          7.  IO.DEL- This function  allows  the  user  to  delete  without
              acknowledging  a  passed  number of messages from the desired
              message id subqueue.

          8.  IO.RAT- This function allows the user to receive the  current
              status of the desired message id subqueue.

          9.  IO.ACE- This function allows the user to receive the  current
              status of the Queue (read Queue header).

         10.  IO.APC+1- This function mounts the pseudo device ZQ with  the
              ACP.

         11.  IO.APC+2- This function dismounts the pseudo device  ZQ  from
              the ACP.
     QUEUE FUNCTIONS                                               Page 2-4
     QUEUEING FUNCTIONS                                       13 April 1988


         12.  IO.DAC-  This  function  provides,  via  I/O  rundown,   exit
              handling in the event a task exits or is aborted.













                                   CHAPTER 3

                             QUEUE MAINTENANCE TASK



     The task QMT provides the ability to add, modify, and  delete  message
     ids  to/from the message id file QUEUEIDS.DAT.  The task also provides
     the ability to maintain the Queue file MAQUEUE.DAT and  to  mount  and
     dismount  the ACP to/from the ZQ device driver.  The task is installed
     as an MCR command task, i.e.   all  commands  are  sent  via  the  MCR
     command line.

     The following gives the list of functions available.

              List  the  message  ids  in  the  Queue  and  the  parameters
              associated  with  the  current  Queue file.  Note:  This only
              lists those ids that will be placed into  the  Queue  on  the
              next Queue creation and possibly not those that are currently
              in service.

              MCR> QMT/LI

              Create a new Queue file with the message ids from the message
              id file and with a size of nnnn message blocks.

              MCR> QMT/CR:nnnn

              Reset all pointers and clean up the current Queue file  (will
              basically deallocate all message blocks and reset all message
              id list heads).  Note:  Dismount the ACP from the device ZQ0:
              before performing the reset.

              MCR>QMT/RE

              Add a new message id to the message id file.

              MCR>QMT/IN/ID:<--16 character message id>/MX:<max  number  of
              messages>

              Update the maximum number of messages that are  permitted  in
              the message id subqueue in the message id file.

              MCR>QMT/UP/ID:<--16 character message id>/MX:<max  number  of
              messages>
     QUEUE MAINTENANCE TASK                                        Page 3-2
                                                              13 April 1988


              Delete a message id from the message id file.

              MCR>QMT/DE/ID:<--16 character message id>

              Delete messages from the message id subqueue.  The  ACP  must
              be mounted to device ZQ0:

              MCR>QMT/DL/ID:<--16 character message id>/MX:<max  number  of
              messages>

              Perform a consistency check on the Queue file (will basically
              traverse  the  message  links in each message id subqueue and
              free all blocks that are marked as used but are not linked in
              any subqueue).  Notes:  Dismount the ACP from the device ZQ0:
              before performing this check.  Some link errors  will  result
              in an entire reset of the Queue file.

              MCR>QMT/CON

              Mount the ACP to device ZQ0:

              MCR>QMT/MOU

              Dismount the ACP from the device ZQ0:

              MCR>QMT/DMO

              Display the message id listhead for the specified message id.
              The ACP must be mounted to device ZQ0:

              MCR>QMT/DID/ID:<message id>

              Display the Queue header.  The ACP must be mounted to  device
              ZQ0:

              MCR>QMT/DQH




     3.1  FILES REQUIRED

     The QMT task keeps a keyed file (QU0:QUEUEIDS.DAT) of all the  message
     ids  that  are  to  be queued in the final Queue.  Associated with the
     message ids is the number of  messages  allowed  in  each  message  id
     subqueue.  This file is then used along with the command line supplied
     for  the  create  function  to  generate   the   final   Queue   file:
     "QU0:MAQUEUE.DAT".   Note:   the  pseudo device name QU0:  selects the
     disk drive that is to contain the Queue.












                                   CHAPTER 4

                                  ROUTING TASK



     The routing task, RTRRSX, is the task that  implements  the  MA_ROUTER
     protocol  and  guarantees the placement of a message from one Queue on
     one node to another Queue on a second node.  Figure  two  provides  an
     overview  diagram  of  how  the  router communicates with other DECNET
     remote nodes.



     4.1  ROUTING SPECIFICS

     In an overview, this task acts like any other task  reading  from  the
     Queue  in  that  it  must read and then acknowledge any messages read.
     The read is performed when the router has successfully connected  with
     the  target  node of the message and the router has sufficient buffers
     (a managed resource within the RTRRSX task and the  routing  database,
     RTRDBS).   The  acknowledge is done when the router on the remote node
     has successfully placed the message on to its Queue and has  responded
     with a successful status back to the router on the source node.

     In the event that the remote node fails to respond (link failure), the
     remote  node  has  no room for the message in its Queue, or the remote
     node does not know of the message id, then the router calls the  queue
     services  to  place  the message back onto the front of the message id
     subqueue.  The router will not attempt to dequeue another of the  same
     message id until a selectable timer expires (one hour typically).

     As a writer, this process writes to the  Queue  via  a  special  entry
     which  does not destroy some of the header information that is part of
     each message that is in the Queue.  This is because  this  information
     was  placed  into  the header by the queue services on the remote node
     and is to be preserved (such as the "On Queue Time" and  the  "Sending
     Node Name").

     If  any  task  in  the  system  needs  to  be  notified  when  a  node
     connects/disconnects, the message id NET_STATUS should be added to the
     Queue.  The router will then write a connect/disconnect message to the
     Queue  every  time  a  connect/disconnect  occurs.   Another task (not
     included) can read the  connect/disconnect  messages  and  inform  the
     tasks  that need to know about any connect/disconnect.  See the STADEF
     macro in Appendix A for the form of the connect/disconnect message.
     ROUTING TASK                                                  Page 4-2
     ROUTING SPECIFICS                                        13 April 1988


     4.1.1  SPEED ENHANCEMENTS

     To allow the router to quickly determine  if  a  particular  node  has
     messages  available  for  routing,  the router maps the QUEHED region.
     The router then simply scans the messages for a particular node  based
     on the following criteria:

          1.  The router has free buffers for output.

          2.  There is a logical link available to the target node.

          3.  There  is  not  an  outstanding  Read  but  Not  acknowledged
              message.

          4.  The message id is not marked non-routable (see above).




     4.2  ROUTING DATABASE

     The generation of the routing database, RTRDBS, should be done via the
     VAX  routing  database  management  utility (see the VAX/VMS MA_ROUTER
     guide).  However, the following example gives a typical listing  of  a
     routing database.  NOTE:  The parameters passed to a macro must all be
     on the same line.  The form used below is for printing purposes only.
     ;
     ; ROUTING DATABASE
     ;
             .INCLUDE        /RTRDEF.MAC/
             .LIST MEB
             
             RTRDEF
             
             NODE    PRI=<B4750A>,SIZ=1024.,ACC=<<MA_ROUTER>>
             ROUTE
             
             NODE    PRI=<B4750B>,SIZ=1024.,ACC=<<MA_ROUTER>>
             ROUTE
             
             NODE    PRI=<PA750A>,SIZ=1024.,ACC=<<MA_ROUTER>>
             ROUTE   ID=<MICHIGAN>
             ROUTE
             
             NODE    LOG,PRI=<PRODUC>,SIZ=1024.,ACC=<<MA_ROUTER>>
             ROUTE
             
             NODE    PRI=<B4073B>,SIZ=1024.,
                     ACC=<<RTRRSX>,DECNET,<'D,'E,'C,'N,'E,'T=>>
             ROUTE   ID=<DAVE>
             ROUTE   ID=<EARL>
             ROUTE
             
             NODE
             
             .END
     ROUTING TASK                                                  Page 4-3
     ROUTING DATABASE                                         13 April 1988


     After the database is built and installed, Program NRBDMP can be  used
     to display the contents of the database.

     The following gives all of the parameters for each of the macros  used
     above, (RTRDEF,NODE, and ROUTE).



     4.2.1  RTRDEF


              MXSZ -- Largest outbound  message  size  in  bytes.   If  not
              present, the default size is 512.  bytes.

              MXOT -- Number of output (outbound message) buffers.  If  not
              present, the default number of output buffers is 4.

              MXRS -- Number of response message buffers.  If not  present,
              the default number of response buffers is MXOT*2.

     Example:
             
             RTRDEF  MXSZ=1024.,MXOT=6.,MXRS=10.



     4.2.2  NODE


              LOG -- Primary node name is a logical  node  name  flag.   If
              present,  the node name specified in the PRI parameter is not
              an actual node name but a logical  node  name  that  must  be
              translated.

              PRI -- Name of the primary node.  If not present, the list of
              NRB's  (node  routing  blocks) in the database is terminated;
              there is no default primary node.  If the  LOG  parameter  is
              present, this name is a logical node name.

              SEC -- Name of the  secondary  node.   If  not  present,  the
              default  secondary  node is the primary node specified by the
              PRI  parameter.   If  the  LOG  parameter  is  present,   the
              secondary node name will be blank until the logical node name
              specified in the PRI parameter is translated into  an  actual
              node name by task FNDSRV (run by the Router).

              ACC -- Access control string.  If not  present,  the  default
              access control string is <MA_ROUTER>.

              SIZ -- Size of the input buffer (in bytes) that receives  the
              messages  from  the  node specified in the PRI parameter.  If
              not present, the default size is 512.  bytes.

     Examples:
             
             NODE    PRI=<B4750A>,SEC=<B4750B>,
     ROUTING TASK                                                  Page 4-4
     ROUTING DATABASE                                         13 April 1988


                     ACC=<<MA_ROUTER>>,SIZ=1024.
             
             NODE    LOG,PRI=<PRODUC>,
                     ACC=<<MA_ROUTER>>,SIZ=512.



     4.2.3  ROUTE


              ID -- Name of a message id in the Queue that  will  have  its
              messages  routed  to  a  remote  node.   If  not present, the
              message id list of an NRB in the the database is  terminated;
              there is no default message id.

     Example:
             
             ROUTE   ID=<MESSAGE_ID>












                                   CHAPTER 5

                                     ZQDRV



     The Pseudo device driver ZQ allows all requests to be queued in a FIFO
     and  priority  manner to the ACP.  The application coder will normally
     not access the driver directly but rather via  the  queue  subroutines
     (see QUEUE SUBROUTINES chapter).
       
     THE QIO CALL IS:
           QIO$    FNC,LUN,EFN,PRI,ISB,AST,<P1,P2,P3,P4,P5,P6>

     WHERE:
             FNC= Function
             LUN= Lun assigned to ZQ0:
             EFN= Event flag used for I/O sync 
                  (should be nonzero)
             ISB= I/O STATUS block
             AST= AST subroutine address
             P1 to P6= Device and function specific 
                  Parameters

     The valid function codes are:

          1.  IO.WVB- Write a message to a specified message id subqueue.

              1.  P1= Message buffer address.

              2.  P2= Byte count of user message.

              3.  P3= Address of message id buffer (16 bytes long).

              4.  P4= Destroyed when id buffer relocated.

              5.  P5= Type of message (0= deletable if queue  is  full,  1=
                  not deletable).

     ZQDRV                                                         Page 5-2
                                                              13 April 1988


          2.  IO.WVB+1- Same as IO.WVB, but only used by the routing  task,
              RTRRSX,  to  bypass  writing a new header when the message is
              received from the remote node.

          3.  IO.RVB- Read a message from a specified message id subqueue.

              1.  P1= Message buffer address.

              2.  P2= Byte count of user buffer to receive message.

              3.  P3= Address of message id buffer (16 bytes long).


          4.  IO.ACR- Connect a message id subqueue to a task.

              1.  P1= Address of message id buffer (16 bytes long).

              2.  P2= 16.

              3.  P3= Event flag to set when the number of messages in  the
                  subqueue goes from zero to one.


          5.  IO.ACW-  Acknowledge  a  message  read  from  a  message   id
              subqueue.

              1.  P1= Address of message id buffer (16 bytes long).

              2.  p2= 16.

              3.  P3= Internal ID.  (This  id  was  returned  when  a  read
                  occurred in the upper byte of the I/O status word.  It is
                  a sequential number that is simply checked as a  sequence
                  number.)


          6.  IO.RNA- Replace read but not  acknowledged  message  back  at
              beginning of the message id subqueue.

              1.  P1= Address of message id buffer (16 bytes long).

              2.  P2= 16.


          7.  IO.DEL-  Delete  a  specified  number  of  messages   without
              acknowledging from a message id subqueue.

              1.  P1= Address of message id buffer (16 bytes long).

              2.  p2= 16.

              3.  P3= Number of messages to be deleted.

     ZQDRV                                                         Page 5-3
                                                              13 April 1988


          8.  IO.RAT- Read message id subqueue list head.

              1.  P1= Buffer address to receive list head (see MIDDEF).

              2.  P2= Byte count of user buffer.

              3.  P3= Address of message id buffer (16 bytes long).


          9.  IO.ACE- Read the Queue header.

              1.  P1= Buffer address to receive Queue header (see QHDDEF).

              2.  P2= Byte count of user buffer.


         10.  IO.APC- Mount/dismount the desired pseudo  device  unit  with
              the ACP (IO.APC!1= Mount, IO.APC!2= Dismount).

         11.  IO.DAC- Set up exit handling I/O rundown function.  This  I/O
              never  completes.  The ACP is called with a new packet when a
              task exits so that any message ids connected to  the  exiting
              task are disconnected.  This function must be called prior to
              any calls to connect to a message id.

         12.  IO.KIL- Standard device functioning.

         13.  IO.ATT- Standard device functioning.

         14.  IO.DET- Standard device functioning.



     Possible I/O Status error codes:

              IE.IFC (-02) -- Invalid function code.

              IE.SPC (-06) -- Bad buffer address.

              IE.DNA (-07) -- ZQ:  device not mounted.

              IE.WLK (-12) -- A connect request has been  received  from  a
              task  that does not have a pending I/O.  Subroutine INITQ was
              probably not called to set up the task exit handlers.

              IE.LCK (-27) -- Trying to  mount  ZQ:   device  when  already
              mounted;   trying   to  dismount  ZQ:   device  when  already
              dismounted.

              IE.ILL (-42) -- The ACP is not installed in the system.

              IE.NFW (-69) -- ACP not found in system task  directory  when
              trying to mount ZQ:  device.
     ZQDRV                                                         Page 5-4
                                                              13 April 1988


              IE.IQU (-91) -- Trying to mount ZQ:  device with a task  that
              is not marked as an ACP.













                                   CHAPTER 6

                               QUEUE SUBROUTINES



     The following subroutines are written in  MACRO 11  and  are  supplied
     such that the application programmer need not do QIO's directly to the
     ZQ  device  driver.   The  user  is  strongly  suggested  to  use  the
     subroutines  as any changes in the functioning of the ZQ device driver
     and the ACP will be supported by these subroutines only.

     These  subroutines  support  the  I  and  D  space   available   under
     RSX11M-Plus, however, they are not shareable and not reentrant.
     QUEUE SUBROUTINES                                             Page 6-2
     ACKQ.MAC                                                 13 April 1988


     6.1  ACKQ.MAC

                                     MODULE
                                      ____
                                      ACKQ



     6.1.1  ACKQ

     Source: ACKQ.MAC
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :DAVE LUECK
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update: 12-NOV-1986
     Revision level     :1.1
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
         
        EFN                        INTEGER*2
                                   EVENT FLAG TO BE USED FOR I/O 
                                   SYNC
        
        MSGID                      CHARACTER*16  (BYTE(16))
                                   MESSAGE ID OF LIST HEAD TO 
                                   READ
       
        RNA                        INTEGER*2
                                   READ NOT ACKNOWLEDGED POINTER
                                   (RETURNED FROM ACP/DRIVER IN 
                                   I/O STATUS BLOCK)
       
     Returns:
      
        ACKQ                       INTEGER*2                               
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE CONNECT
      
     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:


     Description:
     QUEUE SUBROUTINES                                             Page 6-3
     ACKQ.MAC                                                 13 April 1988


     This subroutine allows a task to acknowledge the reading of a  message
     in  a  message  id  queue  in the Manufacturing Automation Queue.  The
     return status is returned as the value  of  the  function  subroutine.
     The calling sequence is:

             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             CHARACTER*16 MSGID   ! MESSAGE ID
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 IEFN       ! EVENT FLAG
             INTEGER*2 RNA        ! READ BUT NOT ACKNOWLEDGED 
                                  ! POINTER
             INTEGER*2 QUESUC     ! SUCCESSFUL QUE STATUS
     C
             DATA QUESUC/"401/
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA IEFN/1/         ! EVENT FLAG FOR I/O SYNC
     C
             MSGID='DUMMY ID'  ! OUR MESSAGE ID
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
     C ACKNOWLEDGE THE READ
     C
             STATUS=ACKQ(LUN,IEFN,MSGID,RNA)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,
             1       ' BAD QUEUE STATUS ON MESSAGE ACKNOWLEDGE'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     TYPE *,' I/O STATUS: ',STATB(2)
                     CALL EXIT
             ELSE
                     TYPE *,' ACKNOWLEDGE SUCCESSFUL'
             ENDIF
     QUEUE SUBROUTINES                                             Page 6-4
     ACKQ.MAC                                                 13 April 1988


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

              Bad I/O status (lower byte= 1, upper byte= I/O status)

              IE.UKN (-97) -- Message id does not exist.

              IE.PNT (-71)  --  No  message  in  this  queue  needs  to  be
              acknowledged.

              IE.SNC (-35) -- The wrong message is being acknowledged.

     QUEUE SUBROUTINES                                             Page 6-5
     ATCHQ.MAC                                                13 April 1988


     6.2  ATCHQ.MAC

                                     MODULE
                                     _____
                                     ATCHQ



     6.2.1  ATCHQ

     Source: ATCHQ.MAC
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :DAVE LUECK
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update: 12-NOV-1986
     Revision level     :1.1
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
         
        EFN                        INTEGER*2
                                   EVENT FLAG TO BE USED FOR I/O 
                                   SYNC
            
        MSGID                      CHARACTER*16  (BYTE(16))
                                   MESSAGE ID OF LIST HEAD TO 
                                   READ
       
        TEFN                       INTEGER*2
                                   EVENT FLAG OF TASK TO BE SET 
                                   WHEN A MESSAGE IS IN QUEUE
      
     Returns:
      
        ATCHQ                      INTEGER*2                               
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE CONNECT
      
     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:


     Description:

     QUEUE SUBROUTINES                                             Page 6-6
     ATCHQ.MAC                                                13 April 1988


     This subroutine allows a task to connect to a message id queue in  the
     Manufacturing  Automation Queue.  The return status is returned as the
     value of the function subroutine.  The calling sequence is:

             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             CHARACTER*16 MSGID   ! MESSAGE ID
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 IEFN       ! EVENT FLAG
             INTEGER*2 QUESUC     ! SUCCESSFUL QUE STATUS
     C
             DATA QUESUC/"401/
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA IEFN/1/         ! EVENT FLAG FOR I/O SYNC
     C
             MSGID='DUMMY ID'     ! OUR MESSAGE ID
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
     C CONNECT TO THE QUEUE
     C
             STATUS=ATCHQ(LUN,IEFN,MSGID,TEFN)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,
             1       ' BAD QUEUE  STATUS ON MESSAGE ID CONNECT'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     TYPE *,' I/O STATUS: ',STATB(2)
                     CALL EXIT
             ELSE
                     TYPE *,' CONNECT SUCCESSFUL'
             ENDIF


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

              Bad I/O status (lower byte= 1, upper byte= I/O status)

              IE.UKN (-97) -- Message id does not exist.

              IE.URJ (-73) -- Task cannot  connect  to  queue;  other  task
              already connected.

     QUEUE SUBROUTINES                                             Page 6-7
     DELQ.MAC                                                 13 April 1988


     6.3  DELQ.MAC

                                     MODULE
                                      ____
                                      DELQ



     6.3.1  DELQ

     Source:B4073B"MAQ MAQ"::DELQ.MAC;
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :DAVE LUECK
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update: 06-JAN-1987
     Revision level     :1.1
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
         
        EFN                        INTEGER*2
                                   EVENT FLAG TO BE USED FOR I/O 
                                   SYNC
        
        MSGID                      CHARACTER*16  (BYTE(16))
                                   MESSAGE ID OF LIST HEAD TO 
                                   READ
       
        NBRDEL                     INTEGER*2
                                   NUMBER OF MESSAGES TO DELETE 
                                   FROM QUEUE
       
     Returns:
      
        DELQ                       INTEGER*2 
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE CONNECT
      
     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:


     Description:

     QUEUE SUBROUTINES                                             Page 6-8
     DELQ.MAC                                                 13 April 1988


     This subroutine  allows  a  task  to  delete  (without  acknowledging)
     messages  from  a  message  id  queue  in the Manufacturing Automation
     Queue.  The number of messages to be deleted is specified by the user.
     The return status is returned as the value of the function subroutine.
     The calling sequence is:

             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             CHARACTER*16 MSGID   ! MESSAGE ID
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 IEFN       ! EVENT FLAG
             INTEGER*2 NBRDEL     ! NUMBER OF MESSAGES TO BE 
                                  ! DELETED
             INTEGER*2 QUESUC     ! SUCCESSFUL QUE STATUS
     C
             DATA QUESUC/"401/
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA IEFN/1/         ! EVENT FLAG FOR I/O SYNC
     C
             MSGID='DUMMY ID'  ! OUR MESSAGE ID
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
     C ACKNOWLEDGE THE READ
     C
             STATUS=DELQ(LUN,IEFN,MSGID,NBRDEL)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,' BAD QUEUE STATUS ON MESSAGE DELETE'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     TYPE *,' I/O STATUS: ',STATB(2)
                     CALL EXIT
             ELSE
                     TYPE *,' DELETE SUCCESSFUL'
             ENDIF


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

              Bad I/O status (R0 lower byte= 1, upper byte= I/O status)

              IE.UKN (-97) -- Message id does not exist.

              IE.URJ (-73) -- Task cannot  connect  to  queue;  other  task
              already connected.

     QUEUE SUBROUTINES                                             Page 6-9
     DISCQ.MAC                                                13 April 1988


     6.4  DISCQ.MAC

                                     MODULE
                                     _____
                                     DISCQ



     6.4.1  DISCQ

     Source: DISCQ.MAC
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :EARL LAKIA
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update: 15-DEC-86
     Revision level     :1.0
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
         
      
     Returns:
      
        DISCQ                      INTEGER*2                               
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE CONNECT
      
     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:


     Description:


     This subroutine cancels the outstanding I/O normally  set  up  by  the
     INITQ  subroutine.   This  subroutine  need  not be called if the user
     doesn't mind the message:  "Task exit with outstanding I/O".  However,
     good  coding  standards  should  dictate  that  the  caller  use  this
     subroutine.

     QUEUE SUBROUTINES                                            Page 6-10
     DISCQ.MAC                                                13 April 1988


             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 QUESUC     ! SUCESSFUL QUEUE STATUS
     C
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA QUESUC/1/
     C
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
             STATUS=INITQ(LUN)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,' BAD QUEUE  STATUS ON INIT'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     CALL EXIT
             ELSE
                     TYPE *,' INIT SUCCESSFUL'
             ENDIF
        **** ACCESS THE QUEUE *******
             STATUS=DISCQ(LUN)  ! NO NEED TO TEST STATUS, IF IT
                     ! FAILS, THEN NOTHING ELSE TO DO ANYWAY


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

     QUEUE SUBROUTINES                                            Page 6-11
     INITQ.MAC                                                13 April 1988


     6.5  INITQ.MAC

                                     MODULE
                                     _____
                                     INITQ



     6.5.1  INITQ

     Source: INITQ.MAC
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :EARL LAKIA
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update: 12-NOV-1986
     Revision level     :1.1
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED
                                   TO ZQ0:
         
      
     Returns:
      
        INITQ                      INTEGER*2                               
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE INIT
      
     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:


     Description:


     This subroutine queues an I/O to ZQ0:.  The  returned  status  is  the
     directive  status as the QIO that is queued never completes until this
     task exits and I/O rundown is performed.  Since the function code that
     is  used  is  a  control  function,  this  should allow the task to be
     shuffled, etc.

     QUEUE SUBROUTINES                                            Page 6-12
     INITQ.MAC                                                13 April 1988


             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 QUESUC     ! SUCCESSFUL QUEUE STATUS
     C
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA QUESUC/1/
     C
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
             STATUS=INITQ(LUN)
     c
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,' BAD QUEUE  STATUS ON INIT'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     CALL EXIT
             ELSE
                     TYPE *,' INIT SUCCESSFUL'
             ENDIF


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

     QUEUE SUBROUTINES                                            Page 6-13
     READHD.MAC                                               13 April 1988


     6.6  READHD.MAC

                                     MODULE
                                     ______
                                     READHD



     6.6.1  READHD

     Source: READHD.MAC
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :DAVE LUECK
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update: 12-NOV-1986
     Revision level     :1.1
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
       
        EFN                        INTEGER*2
                                   EVENT FLAG TO BE USED FOR 
                                   I/O SYNC
       
        MSGREC                     BYTE(ISIZE)                          
                                   BUFFER TO BE RECEIVE QUEUE 
                                   HEADER
                                   NOTE: DIMENSIONED TO SIZE 
                                   "ISIZE"
        
        ISIZE                      INTEGER*2 
                                   SIZE OF BUFFER TO RECEIVE 
                                   HEADER
       
       
     Returns:
      
        RECSIZ                     INTEGER*2
                                   NUMBER OF BYTES READ 
        
        READHD                     INTEGER*2                               
                                   FUNCTION VALUE RETURN STATUS OF THE READ
        
     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:
     QUEUE SUBROUTINES                                            Page 6-14
     READHD.MAC                                               13 April 1988


     Description:


     This  subroutine  allows  the  caller  to  read  the  header  of   the
     Manufacturing  Automation Queue.  The return status is returned as the
     value of the function subroutine.  The calling sequence is:

             INCLUDE 'QHDDEF.TXT'
             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             CHARACTER*16 MSGID   ! MESSAGE ID
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 IEFN       ! EVENT FLAG
             INTEGER*2 RECSIZ     ! RETURNED ACTUAL RECORD SIZE
             INTEGER*2 QUESUC     ! SUCCESSFUL QUE STATUS
     C
             DATA QUESUC/"401/
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA IEFN/1/         ! EVENT FLAG FOR I/O SYNC
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
     C READ THE QUEUE HEADER
     C
             STATUS=READHD(LUN,IEFN,QHDDEF,QXKSIZ,RECSIZ)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,' BAD QUEUE STATUS ON HEADER READ'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     TYPE *,' I/O STATUS: ',STATB(2)
                     CALL EXIT
             ELSE
                     TYPE *,' SIZE OF QUEUE HEADER: ',RECSIZ
             ENDIF


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

              Bad I/O status (lower byte= 1, upper byte= I/O status)

              IE.DAO (-13) -- User buffer to small  to  contain  the  queue
              header.

     QUEUE SUBROUTINES                                            Page 6-15
     READID.MAC                                               13 April 1988


     6.7  READID.MAC

                                     MODULE
                                     ______
                                     READID



     6.7.1  READID

     Source: READID.MAC
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :DAVE LUECK
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update: 12-NOV-1986
     Revision level     :1.1
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
        
        EFN                        INTEGER*2
                                   EVENT FLAG TO BE USED FOR 
                                   I/O SYNC
        
        MSGID                      CHARACTER*16  (BYTE(16))
                                   MESSAGE ID OF LIST HEAD 
                                   TO READ
       
        MSGREC                     BYTE(ISIZE)                          
                                   BUFFER TO BE RECEIVE ID 
                                   LIST HEAD 
                                   NOTE: DIMENSIONED TO 
                                   SIZE "ISIZE"
        
        ISIZE                      INTEGER*2 
                                   SIZE OF BUFFER TO RECEIVE 
                                   LIST HEAD
      
      
     Returns:
      
        RECSIZ                     INTEGER*2
                                   NUMBER OF BYTES READ 
          
        READID                     INTEGER*2                               
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE READ
      
     QUEUE SUBROUTINES                                            Page 6-16
     READID.MAC                                               13 April 1988


     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:


     Description:


     This subroutine allows the caller to read the list head of  a  message
     id  in  the  Manufacturing  Automation  Queue.   The  return status is
     returned as  the  value  of  the  function  subroutine.   The  calling
     sequence is:

             INCLUDE 'MIDDEF.TXT'
             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             CHARACTER*16 MSGID   ! MESSAGE ID
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 IEFN       ! EVENT FLAG
             INTEGER*2 RECSIZ     ! RETURNED ACTUAL RECORD SIZE
             INTEGER*2 QUESUC     ! SUCCESSFUL QUE STATUS
     C
             DATA QUESUC/"401/
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA IEFN/1/         ! EVENT FLAG FOR I/O SYNC
     C
             MSGID='DUMMY ID'  ! OUR MESSAGE ID
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
     C  READ THE MESSAGE ID LIST HEAD
     C
             STATUS=READID(LUN,IEFN,MSGID,MIDDEF,MXLEN,RECSIZ)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,
             1       ' BAD QUEUE STATUS ON ', 
             1       'MESSAGE ID HEADER READ'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     TYPE *,' I/O STATUS: ',STATB(2)
                     CALL EXIT
             ELSE
                     TYPE *,' SIZE OF LIST HEAD: ',RECSIZ
             ENDIF
     QUEUE SUBROUTINES                                            Page 6-17
     READID.MAC                                               13 April 1988


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

              Bad I/O status (lower byte= 1, upper byte= I/O status)

              IE.UKN (-97) -- Message id does not exist.

              IE.DAO (-13) -- User buffer to small to  contain  message  id
              header.

     QUEUE SUBROUTINES                                            Page 6-18
     READQ.MAC                                                13 April 1988


     6.8  READQ.MAC

                                     MODULE
                                     _____
                                     READQ



     6.8.1  READQ

     Source: READQ.MAC
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :EARL LAKIA
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update: 12-NOV-1986
     Revision level     :1.1
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
       
        EFN                        INTEGER*2
                                   EVENT FLAG TO BE USED FOR 
                                   I/O SYNC
       
        MSGID                      CHARACTER*16  (BYTE(16))
                                   MESSAGE ID OF MESSAGE 
                                   TO READ
       
        MSGREC                     BYTE(ISIZE)                          
                                   BUFFER TO BE RECEIVE MESSAGE 
                                   FROM QUEUE 
                                   NOTE: DIMENSIONED TO SIZE 
                                   "ISIZE".
       
        ISIZE                      INTEGER*2 
                                   SIZE OF BUFFER TO RECEIVE 
                                   MESSAGE
      
      
     Returns:
      
        RECSIZ                     INTEGER*2
                                   ACTUAL RECORD SIZE READ
                                   (TOTAL SIZE INCLUDING THE 
                                   HEADER SIZE)
       
        RNA                        INTEGER*2  
                                   WORD TO RECEIVE READ NOT 
     QUEUE SUBROUTINES                                            Page 6-19
     READQ.MAC                                                13 April 1988


                                   ACKNOWLEDGED POINTER
                                   (RETURNED FROM ACP/DRIVER 
                                   IN I/O STATUS BLOCK)
       
        READQ                      INTEGER*2                               
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE READ
      
     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:


     Description:


     This  subroutine  allows  the  caller  to  read  a  message  from  the
     Manufacturing  Automation Queue.  The return status is returned as the
     value of the function subroutine.  The RNA pointer  must  be  used  to
     acknowledge  the  read  from the queue and actually remove it from the
     queue.  The calling sequence is:

     QUEUE SUBROUTINES                                            Page 6-20
     READQ.MAC                                                13 April 1988


             INCLUDE 'HDRDEF.TXT'
             PARAMETER (BUFSIZ=512)
             BYTE BUFFER(BUFSIZ)  ! INPUT BUFFER
             EQUIVALENCE (BUFFER,HDRDEF)  ! EQUIVALENCE FOR SYMBOLIC 
                                          !  OFFSETS
             INTEGER*2 STATUS      ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             CHARACTER*16 MSGID   ! MESSAGE ID
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 IEFN       ! EVENT FLAG
             INTEGER*2 RNA        ! READ BUT NOT ACKNOWLEDGED POINTER
             INTEGER*2 RECSIZ     ! RETURNED ACTUAL RECORD SIZE
             INTEGER*2 QUESUC     ! SUCCESSFUL QUE STATUS
     C
             DATA QUESUC/"401/
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA IEFN/1/         ! EVENT FLAG FOR I/O SYNC
     C
             MSGID='DUMMY ID'     ! OUR MESSAGE ID
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
     C READ THE MESSAGE FROM QUEUE
     C
             STATUS=READQ(LUN,IEFN,MSGID,
             1       BUFFER,BUFSIZ,RECSIZ,RNA)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,' BAD QUEUE STATUS ON READ"
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     TYPE *,' I/O STATUS: ',STATB(2)
                     CALL EXIT
             ELSE
                     TYPE *,' RNA POINTER: ',RNA
                     TYPE *,' SIZE OF DATA PORTION: ',HxLEN
                     WRITE(*,100)(BUFFER(I),I=1,RECSIZ)
      100            FORMAT(' BUFFER: ',20(/,1X,40(Z2.2)))
             ENDIF


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

              Bad I/O status (lower byte= 1, upper byte= I/O status)

              IE.UKN (-97) -- Message id does not exist.

              IE.DAO (-13) -- User buffer to small to contain message read.
     QUEUE SUBROUTINES                                            Page 6-21
     READQ.MAC                                                13 April 1988


              IE.FOP (-53) -- A message exists in the queue that  has  been
              read but not acknowledged.

              IE.NLK (-79) -- Task is not connected to queue;  cannot  read
              any messages until connected.

              IE.NST (-80) -- Another task is connected  to  queue;  cannot
              read any messages while other task connected.

              IE.EOF (-10) -- No messages in queue.

     QUEUE SUBROUTINES                                            Page 6-22
     RNAQ.MAC                                                 13 April 1988


     6.9  RNAQ.MAC

                                     MODULE
                                      ____
                                      RNAQ



     6.9.1  RNAQ

     Source: RNAQ.MAC
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :DAVE LUECK
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update: 12-NOV-1986
     Revision level     :1.2
      
                             Formal Parameter List
     Receives:
      
        
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
        
        EFN                        INTEGER*2
                                   EVENT FLAG TO BE USED FOR 
                                   I/O SYNC
       
        MSGID                      CHARACTER*16  (BYTE(16))
                                   MESSAGE ID OF LIST HEAD 
                                   TO READ
      
       
     Returns:
      
        RNAQ                       INTEGER*2                               
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE CONNECT
      
     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:


     Description:

     QUEUE SUBROUTINES                                            Page 6-23
     RNAQ.MAC                                                 13 April 1988


     This subroutine allows a read  but  not  acknowledged  message  to  be
     placed   back   at  the  beginning  of  a  message  id  queue  in  the
     Manufacturing Automation Queue.  The return status is returned as  the
     value of the function subroutine.  The calling sequence is:

             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             CHARACTER*16 MSGID   ! MESSAGE ID
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 IEFN       ! EVENT FLAG
             INTEGER*2 QUESUC     ! SUCCESSFUL QUE STATUS
     C
             DATA QUESUC/"401/
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA IEFN/1/         ! EVENT FLAG FOR I/O SYNC
     C
             MSGID='DUMMY ID'     ! OUR MESSAGE ID
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
     C PUT RNA MESSAGE BACK AT START OF QUEUE
     C
             STATUS=RNAQ(LUN,IEFN,MSGID)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,' BAD QUEUE STATUS ON MESSAGE RNA'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     TYPE *,' I/O STATUS: ',STATB(2)
                     CALL EXIT
             ELSE
                     TYPE *,' RNA SUCCESSFUL'
             ENDIF


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

              Bad I/O status (lower byte= 1, upper byte= I/O status)

              IE.UKN (-97) -- Message id does not exist.

     QUEUE SUBROUTINES                                            Page 6-24
     WRITEQ.MAC                                               13 April 1988


     6.10  WRITEQ.MAC

                                     MODULE
                                     ______
                                     WRITEQ



     6.10.1  WRITEQ

     Source: WRITEQ.MAC
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :EARL LAKIA
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update:12-NOV-1986 
     Revision level     :1.2
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
       
        EFN                        INTEGER*2
                                   EVENT FLAG TO BE USED FOR 
                                   I/O SYNC
       
        MSGID                      CHARACTER*16      (BYTE(16))
                                   MESSAGE ID OF MESSAGE TO 
                                   BE WRITTEN
       
        MSGREC                     BYTE(ISIZE)
                                   MESSAGE BUFFER TO BE WRITTEN 
                                   TO QUEUE           
                                   NOTE: DIMENSIONED TO "ISIZE"
       
        ISIZE                      INTEGER*2
                                   SIZE OF MESSAGE BUFFER
       
        TYPE                       INTEGER*2
                                   RECOVERY IF QUEUE IS FULL, 
                                   (0= DELETE OLDEST, 
                                    1= RETURN STATUS)
      
     Returns:
      
        WRITEQ                     INTEGER*2 
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE WRITE.
      
     Accesses common(s):
     QUEUE SUBROUTINES                                            Page 6-25
     WRITEQ.MAC                                               13 April 1988


      
     Accesses file(s):
      
     Other modules referenced:


     Description:


     This subroutine  allows  the  caller  to  place  a  message  into  the
     Manufacturing  Automation Queue.  The return status is returned as the
     value of the function subroutine.  The calling sequence is:

             PARAMETER (BUFSIZ=512)
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 IEFN       ! EVENT FLAG
             CHARACTER*16 MSGID   ! MESSAGE ID
             BYTE BUFFER(BUFSIZ)  ! OUTPUT BUFFER
             INTEGER*2 ITYPE      ! TYPE OF MESSAGE
             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             INTEGER*2 QUESUC     ! SUCCESSFUL QUE STATUS
     C
             DATA QUESUC/"401/    
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA IEFN/1/         ! EVENT FLAG FOR I/O SYNC
     C
             ITYPE=0           ! DELETE OLDEST IF FULL
             MSGID='DUMMY ID'  ! OUR MESSAGE ID
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
     C WRITE TO THE MESSAGE ID QUEUE
     C
             STATUS=WRITEQ(LUN,IEFN,MSGID,BUFFER,BUFSIZ,ITYPE)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,' BAD QUEUE STATUS ON WRITE'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     TYPE *,' I/O STATUS: ',STATB(2)
                     CALL EXIT
             ELSE
                     TYPE *,' SUCCESSFUL WRITE'
             ENDIF
     QUEUE SUBROUTINES                                            Page 6-26
     WRITEQ.MAC                                               13 April 1988


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

              Bad I/O status (lower byte= 1, upper byte= I/O status)

              IE.UKN (-97) -- Message id does not exist.

              IE.NDR (-72) -- No room left in queue.

              IE.NBK (-41) -- Message to be written to queue  exceeds  4014
              bytes.

     QUEUE SUBROUTINES                                            Page 6-27
     WRTRTR.MAC                                               13 April 1988


     6.11  WRTRTR.MAC

                                     MODULE
                                     ______
                                     WRTRTR



     6.11.1  WRTRTR

     Source:B4073A"MAQ MAQ"::WRTRTR.MAC;
     TO BECOME PART OF LIBRARY:QUEUE.OLB
     Designer           :EARL LAKIA
     Author             :DAVE LUECK
     Copy Right: Inland Steel
                 Process Automation Department
                 3210 Watling St.  MS 2-465
                 East Chicago, IN  46312
      
     Date of last update:08-DEC-1986 
     Revision level     :1.1
      
                             Formal Parameter List
     Receives:
      
        LUN                        INTEGER*2
                                   LOGICAL UNIT NUMBER ASSIGNED 
                                   TO ZQ0:
       
        EFN                        INTEGER*2
                                   EVENT FLAG TO BE USED FOR I/O 
                                   SYNC
       
        MSGID                      CHARACTER*16      (BYTE(16))
                                   MESSAGE ID OF MESSAGE TO BE 
                                   WRITTEN
       
        MSGREC                     BYTE(ISIZE)
                                   MESSAGE BUFFER TO BE WRITTEN 
                                   TO QUEUE
                                   NOTE: DIMENSIONED TO SIZE 
                                   ISIZE
       
        ISIZE                      INTEGER*2
                                   SIZE OF MESSAGE BUFFER
       
        TYPE                       INTEGER*2
                                   RECOVERY IF QUEUE IS FULL, 
                                   (0= DELETE OLDEST,
                                    1= RETURN STATUS)
      
     Returns:
      
        WRTRTR                     INTEGER*2 
                                   FUNCTION VALUE RETURN STATUS 
                                   OF THE WRITE
      
     QUEUE SUBROUTINES                                            Page 6-28
     WRTRTR.MAC                                               13 April 1988


     Accesses common(s):
      
     Accesses file(s):
      
     Other modules referenced:


     Description:


     This subroutine  allows  the  caller  to  place  a  message  into  the
     Manufacturing  Automation  Queue.   The  only  difference between this
     routine and the WRITEQ routine is that the header does not  get  added
     to  the front of the text when this routine is called.  The MAQ router
     uses this routine  to  bypass  adding  the  header  since  it  already
     precedes  the data.  The return status is returned as the value of the
     function subroutine.  The calling sequence is:

     QUEUE SUBROUTINES                                            Page 6-29
     WRTRTR.MAC                                               13 April 1988


             PARAMETER (BUFSIZ=512)
             INTEGER*2 LUN        ! LUN ASSIGNED TO ZQ0:
             INTEGER*2 IEFN       ! EVENT FLAG
             CHARACTER*16 MSGID   ! MESSAGE ID
             BYTE BUFFER(BUFSIZ)  ! OUTPUT BUFFER
             INTEGER*2 ITYPE      ! TYPE OF MESSAGE
             INTEGER*2 STATUS     ! RETURN STATUS
             BYTE STATB(2)
             EQUIVALENCE(STATUS,STATB) ! BYTE ADDRESSABLE STATUS
             INTEGER*2 QUESUC     ! SUCCESSFUL QUE STATUS
     C
             DATA QUESUC/"401/    
             DATA LUN/1/          ! LOGICAL UNIT NUMBER
             DATA IEFN/1/         ! EVENT FLAG FOR I/O SYNC
     C
             ITYPE=0           ! DELETE OLDEST IF FULL
             MSGID='DUMMY ID'  ! OUR MESSAGE ID
     C
     C ASSIGN A LUN TO THE PSEUDO DEVICE FOR THE QUEUE
     C
             CALL ASSIGN(LUN,'ZQ0:')
     C
     C WRITE TO THE MESSAGE ID QUEUE
     C
             STATUS=WRTRTR(LUN,IEFN,MSGID,BUFFER,BUFSIZ,ITYPE)
     C
             IF(STATUS .NE. QUESUC)THEN
                     TYPE *,' BAD QUEUE STATUS ON RTR WRITE'
                     TYPE *,' DIRECTIVE STATUS: ',STATB(1)
                     TYPE *,' I/O STATUS: ',STATB(2)
                     CALL EXIT
             ELSE
                     TYPE *,' SUCCESSFUL RTR WRITE'
             ENDIF


     Possible error codes:

              Bad directive status  (possibly  device  not  mounted,  etc.)
              (upper byte will be zero)

              Bad I/O status (R0 lower byte= 1, upper byte= I/O status)

              IE.UKN (-97) -- Message id does not exist.

              IE.NDR (-72) -- No room left in queue.

              IE.NBK (-41) -- Message to be written to queue  exceeds  4014
              bytes.

     QUEUE SUBROUTINES                                            Page 6-30
     VAXQAD.MAC                                               13 April 1988


     6.12  VAXQAD.MAC

                                     MODULE
                                     ______
                                     VAXQAD



     6.12.1  VAXQAD

     Source: VAXQAD.MAC
     To become part of library:QUEUE
     Designer           :EARL LAKIA
     Author             :EARL LAKIA (DEFAULT DESIGNER)
     Date of last update:30-SEP-86
     Revision level     :1.0
             
                             Formal Parameter List
     Receives:
         
     Returns:
       
       VAXTIME          INTEGER*2  Dimension (4)
                        ARRAY TO RECEIVE THE VAX QUAD 
                        TIME WORD (64 BIT TIME VALUE)
             
     Accesses common(s):
             
     Accesses file(s):
             
     Other modules referenced:


     Description:


     This subroutine is called to get the current time and convert the time
     to  the  vax  equivalent  time stamp.  The caller must pass the 4 word
     array by address.  The calling sequence is:
      
             INTEGER*2 VAXTIME(4)
             CALL VAXQAD(VAXTIME)
     QUEUE SUBROUTINES                                            Page 6-31
     VAXQAD.MAC                                               13 April 1988


                                     MODULE
                                     ______
                                     VAXQDD



     6.12.2  VAXQDD

     Source: VAXQAD.MAC
     To become part of library:QUEUE
     Designer           :EARL LAKIA
     Author             :EARL LAKIA (DEFAULT DESIGNER)
     Date of last update:03-OCT-86
     Revision level     :1.0
             
                             Formal Parameter List
     Receives:
       HOUR             INTEGER*2  CURRENT HOUR OF THE 
                        DAY (0 TO 23)
       
       MIN              INTEGER*2  CURRENT MINUTE OF 
                        HOUR (0-59)
       
       SEC              INTEGER*2  CURRENT SECOND OF 
                        THE MINUTE (0-59)
       
       MONTH            INTEGER*2  MONTH OF YEAR 
                        (1 TO 12)
       
       DAY              INTEGER*2  CURRENT DAY OF 
                        THE MONTH (1 TO 31 DEPENDING 
                        ON MONTH)
      
       YEAR             INTEGER*2  YEAR SINCE 1900, 
                        (0 TO 99)
         
     Returns:
       
       QUAD             INT*2(4)   
                        FOUR WORD INTEGER*2 ARRAY 
                        TO RECEIVE THE VAX EQUIVALENT 
                        QUAD WORD TIME.
             
     Accesses common(s):
             
     Accesses file(s):
             
     Other modules referenced:


     QUEUE SUBROUTINES                                            Page 6-32
     VAXQAD.MAC                                               13 April 1988


     Description:


     This subroutine is called to return the VAX standard QUAD time  format
     into the associated element of the      QUAD  array.  The Vax standard
     time is shown below along with element number of the QUAD array.

     3322 2222 2222 1111 1111 1100 0000 0000
     1098 7654 3210 9876 5432 1098 7654 3210
         QUAD   2       !      QUAD  1
     6666 5555 5555 5544 4444 4444 3333 3333
     3210 9876 5432 1098 7654 3210 9876 5432
        QUAD   4        !      QUAD  3


     Note the bit order of the VAX time format which has low precision bits
     first in the two long words.  The value of OCT 3, 1986 at 11:00 AM is:
     4507F800 008F5E18.

     This subroutine is accurate to plus or minus 512 milliseconds  due  to
     the accuracy of the double precision floating point arithmetic.

     The calling sequence is:


              INTEGER*2 MONTH,YEAR,DAY,HOUR,MINUTE,SECOND
              INTEGER*2 QUAD(4)
              DATA MONTH/10/,DAY/3/,HOUR/0/,MINUTE/0/,SECOND/0/
              DATA YEAR/86/
     C
              CALL VAXQDD(HOUR,MINUTE,SECOND,MONTH,DAY,YEAR,QUAD)












                                   CHAPTER 7

                               APPLICATION GUIDE



     The steps that must be followed to read from or write to the queue are
     detailed  in  the  QUEUE  PHYSICAL FLOW section of the QUEUE FUNCTIONS
     chapter.  If you want the  Router  to  write  node  connect/disconnect
     messages  to  the  queue,  review the ROUTING SPECIFICS section of the
     ROUTING TASK chapter for details.



     7.1  APPLICATION PROGRAMMING NOTES

     Any program that connects to the Queue  must  have  called  the  INITQ
     subroutine.   This  subroutine  posts  an  I/O  request  that is never
     satisfied.  The purpose of this unsatisfied I/O is to allow the ACP to
     handle  I/O  rundown  and exit handling.  Therefore, any task that has
     called this routine will have an I/O  count  of  at  least  one.   The
     subroutine  DISCQ  can  be  called to gracefully satisfy this last I/O
     before exit.  If this subroutine is not called, the  Task  Termination
     message of "TASK EXIT WITH OUTSTANDING I/O" will be displayed.

     Any task that reads messages from the Queue must be connected  to  the
     message  id  subqueue  it  will  read messages from.  If the task must
     receive messages as soon as they are queued by the ACP, it  should  be
     waiting  on  the  local event flag that is set by the ACP when the ACP
     writes a message to that subqueue.  When the local event flag is  set,
     the  task  should  clear  the  event flag before it reads the message,
     continue to read, process, and acknowledge messages  until  an  IE.EOF
     error  (no  messages  in subqueue) is returned, and again wait for the
     event flag once all messages in the subqueue have been read.   If  the
     task  exits,  it  will  disconnect from the message id and will not be
     able to read other messages written to the subqueue by the ACP  unless
     the task is activated by another task in the system.  The ACP will not
     set the local event flag of a task and  run  the  task  unless  it  is
     connected to the message id subqueue it will read.

     Two sample programs are included in the  distribution.   One  program,
     WTQUE,  shows how easy it is to write to the Queue.  Writing a message
     of Type 0 means that the message can be deleted when the Queue becomes
     full.   A  message  of Type 1 cannot be deleted when the Queue becomes
     full.  The other program, RDQUE, is an example of how to implement the
     message  reading  strategy  described  in the previous paragraph.  All
     programs that read messages from the Queue should use Program RDQUE as
     a  template.   These  two programs can be built with the command files
     APPLICATION GUIDE                                             Page 7-2
     APPLICATION PROGRAMMING NOTES                            13 April 1988


     WTQUE.CMD and RDQUE.CMD.  The two programs reference  the  message  id
     SAMPLE_QUEUE.   This  message  id  is  already  in the message id file
     QUEUEIDS.DAT on the distribution tape.



     7.2  COMPILING, ASSEMBLING, AND TASK BUILDING

     To define Queue structures in a Fortran  program,  include  the  files
     HDRDEF.TXT,  MIDDEF.TXT,  and  QHDDEF.TXT  in  the Fortran source code
     file.  To access the queueing routines from a Fortran program, include
     the  object  library  QUEUE.OLB  in  the  task build command line.  To
     include Queue or Routing structure offsets  in  an  assembly  language
     program,  include  the  desired  offsets in the macro source code file
     using the .MCALL directive and reference the QUEUE.MLB  macro  library
     in the assembly command line.  All Queue and Routing structure offsets
     are contained in the QUEUE.MLB macro library.



     7.3  TEST PROGRAMS

     To verify the functioning of the ACP and  to  test  the  queue  during
     program  debug,  use  Program  TSTACP.   This program tests all of the
     functions of the Queue ACP and the ZQ device driver.  The source  code
     for  this  program  is  available  and may be used as a sample program
     example.

     If the ACP needs extensive testing to find a bug,  the  test  programs
     WRTQ  and REDQ can be used.  Program WRTQ will issue a number of write
     requests to the ACP.  The size of the message written and the type  of
     the  message  (0  or  1)  is  determined  by the FORTRAN random number
     function RAN.  WRTQ will ask the user to enter both the 'message size'
     and  'message  type'  seeds.  As long as the same seeds are used every
     time, the sequence of writes will be the same.  To check the  sequence
     of  writes  after the test, run Program RAND and enter the same seeds.
     Program  REDQ  will  read  all  messages  written  to  the  queue  and
     acknowledge,  or occasionally requeue, the message read.  When testing
     with these two tasks, all debug messages will be written to  the  file
     QUEACPMSG.DAT  by  Program QUELOG.  Program CLSMSG will close the file
     to allow access by PIP or EDT.  QUEACP must be built with  the  'debug
     message'  and 'log program' options before it will send debug messages
     to Program QUELOG.  The testing can be started by invoking  QUETST.CMD
     and stopped by invoking QUESTP.CMD.  NOTE:  To build all of these test
     tasks,  invoke  the  command  files  WRTQ.CMD,   REDQ.CMD,   RAND.CMD,
     QUELOG.CMD, and CLSMSG.CMD.

     Program TRACEQ will trace through an entire message  id  subqueue  and
     display  the  block  numbers of all message blocks used and the links.
     When finished, the program will display  the  total  block  count  and
     total  message  count.   The user is asked to enter the starting block
     number (obtained from the QMT/DID/ID:message_id switch) and the  total
     number  of  blocks used by the Queue header.  This program should only
     be run when queueing functions are disabled (i.e.  the  ZQ  driver  is
     dismounted  from  the ACP).  This program is built by the command file
     TRACEQ.CMD.
     APPLICATION GUIDE                                             Page 7-3
     TEST PROGRAMS                                            13 April 1988


     Another program is available to display the  Routing  Database.   This
     task  is  NRBDMP.  It will display the contents of the database header
     and the contents of each NRB (node routing  block)  in  the  database.
     The  program can be used to check the availability of remote nodes and
     for troubleshooting routing problems.












                                   CHAPTER 8

                               INSTALLATION GUIDE



     The RSX Queueing and Routing software is available on a single magtape
     (TK50  or  9  channel).   The  ZQ driver is normally supplied when the
     target computer is sysgenned with the INLANDPLS.SGN command file.   If
     the  driver was not supplied when the system was sysgenned, the driver
     can still be built from the distribution magtape.  The software on the
     magtape  distribution  is  in UIC [7,5] in BRU format (1600 BPI).  UIC
     [7,5] should be created on the target system disk  and  used  for  the
     Queueing  and  Routing  software.  If UIC [7,5] is already being used,
     select and create another priviledged UIC.

     The following libraries are needed for assembling and  task  building.
     The necessary object libraries are:

           o  LB:[1,1]F4POTSFCS.OLB

           o  LB:[1,1]RMSLIB.OLB (only needed for Task QMT)

           o  LB:[1,1]F4POTSRMS.OLB (only needed for Task QMT)

           o  LB:[1,1]EXELIB.OLB

           o  LB:[1,1]SYSLIB.OLB

           o  LB:[*,*]QUEUE.OLB (This library can be created  as  described
              below;  the  UIC  [*,*]  refers  to  the UIC selected for the
              Queueing and Routing software.)


     The necessary macro libraries are:

           o  LB:[1,1]NETLIB.MLB

           o  LB:[1,1]EXEMC.MLB

           o  LB:[*,*]QUEUE.MLB (This library can be created  as  described
              below;  the  UIC  [*,*]  refers  to  the UIC selected for the
              Queueing and Routing software.)


     The necessary supervisor-mode libraries are:
     INSTALLATION GUIDE                                            Page 8-2
                                                              13 April 1988


           o  LB:[3,54]RMSRES.TSK (only needed for Task QMT)

           o  LB:[1,1]FCSFSL.TSK (only needed for the ACP, QUEACP)


     The following command files are available for your use and are  listed
     in  the  order  they should be invoked.  All of the command files will
     allow for selective assemble/compile, task  build,  and  installation.
     The  command files expect the Fortran compiler to be installed as Task
     ...FTN.  Before  building  the  Routing  Database  with  command  file
     RTRRSX.CMD, the database macro source file RTRDBS.MAC must be created.
     Review the ROUTING DATABASE section of the ROUTING  TASK  chapter  for
     details.  A sample RTRDBS.MAC file is on the distribution tape.

          1.  ZQBLD.CMD- This command file will build the ZQ driver if  the
              driver was not built during the sysgen phase.

          2.  QUEDEF.CMD- This command file will build  the  macro  library
              QUEUE.MLB.

          3.  QUESUB.CMD- This command file will assemble and place all  of
              the  queue  service  subroutines  into  the  QUEUE.OLB object
              library.

          4.  QUEACP.CMD- This command file will  assemble  and  build  the
              ACP.   If  the queueing software is not located in UIC [7,5],
              be sure to enter the UIC for file MAQUEUE.DAT when asked.

          5.  QMT.CMD- This command file will build the  queue  maintenance
              task  QMT.   If  the  queueing software is not located in UIC
              [7,5], be sure to enter the UIC  for  files  MAQUEUE.DAT  and
              QUEUEIDS.DAT when asked.

          6.  TSTACP.CMD- This command file will build the  ACP  test  task
              TSTACP.

          7.  RTRRSX.CMD- This command file will  assemble  and  build  the
              Router and the Routing Database.

          8.  FNDSRV.CMD- This command file will  build  the  find  service
              task FNDSRV.

          9.  NRBDMP.CMD- This  command  file  will  build  the  task  that
              displays the Routing Database.




     8.1  QUEUEING AND ROUTING STARTUP

     The command files STARTQ.CMD and STARTR.CMD may be used  to  bring  up
     the  queueing  software  and the routing software respectively.  These
     command files can be invoked from STARTUP.CMD after the DECnet network
     has  been  installed.   Obviously, prior to either of these being run,
     the QMT task must have created a Queue and the Routing  Database  must
     have  been  created.   Command file STOPR.CMD will stop and remove the
     INSTALLATION GUIDE                                            Page 8-3
     QUEUEING AND ROUTING STARTUP                             13 April 1988


     routing software, and command file STOPQ.CMD will stop and remove  the
     queueing software.












                                   APPENDIX A

                               MESSAGE STRUCTURES



     The following macros are available as either include files or from the
     macro library.  Since Fortran 77 does not support the period symbol as
     part of a variable name and structures are not defined, the period  in
     the offsets has been replaced by the lower case "x".
     MESSAGE STRUCTURES                                            Page A-2
                                                              13 April 1988


                                   HDRDEF.TXT
     !
     ! DEFINE THE STRUCTURE OF THE MESSAGE HEADER. 
     !
     ! THIS IS STRUCTURE CAN BE USED TO FORM A RECORD THAT 
     ! CAN BE READ  FROM THE QUEUE.  IE: CONCATENATE THIS 
     ! STRUCTURE TO PROCEED  THE ACTUAL DATA TO BE RETURNED 
     ! ON A READ_Q.
     ! 
     !
     ! DATE OF LAST UPDATE:  8/11/86
     !
     ! COPY RIGHT: 
     !               INLAND STEEL
     !               PROCESS AUTOMATION DEPT.
     !               3210 WATLING ST. MS 2-465
     !               EAST CHICAGO, IN   46312
     !               
             PARAMETER (HxSIZ=34)
     C
             BYTE HDRDEF(HxSIZ)
             BYTE HxSNM(6)           ! ASCII DECNET SOURCE NODE 
                                     ! NAME (FOR MESSAGES QUEUED 
                                     ! WITHIN A NODE,
                                     ! THIS WILL BE BLANK)
             BYTE HxDNM(6)           ! DESTINATION DECNET NODE 
                                     ! NAME FOR MESSAGES QUEUED 
                                     ! WITHIN A NODE,
                                     ! THIS WILL BE BLANK).
             INTEGER*2 HxOFQT(4)     ! OFF QUEUE TIME (FILLED 
                                     ! IN DURING READ)
             INTEGER*2 HxTYPE        ! TYPE OF MESSAGE 
             ! 0= MESSAGE CAN BE DELETED WHEN QUEUE IS FULL 
             !    AND THIS IS OLDEST
             ! 1= MESSAGE IS NOT TO BE DELETED  
             !    EVEN IF QUEUE IS FULL
             ! 2= IF REMOTE NODE QUEUE IS FULL, THEN 
             !    DO NOT QUEUE ON REMOTE NODE
             INTEGER*2 HxONQT(4)     ! ON QUEUE TIME (FILLED IN 
                                     ! WHEN MESSAGE WAS FIRST 
                                     ! WRITTEN TO A QUEUE EITHER 
                                     ! LOCALLY OR ON THE REMOTE 
                                     ! QUEUE (IT IS PRESERVED
                                     ! WHEN REQUEUED ON TARGET 
                                     ! NODE)
             INTEGER*2 HxLEN         ! BYTE COUNT OF MESSAGE 
                                     !  (DOES NOT INCLUDE HEADER)
             INTEGER*2 HxQSEQ        ! ON QUEUE SEQUENCE NUMBER 
     C
             PARAMETER (HxMXSQ=9999)
     C
             EQUIVALENCE (HDRDEF(1),HxSNM)
             EQUIVALENCE (HDRDEF(7),HxDNM)
             EQUIVALENCE (HDRDEF(13),HxOFQT)
             EQUIVALENCE (HDRDEF(21),HxTYPE)
             EQUIVALENCE (HDRDEF(23),HxONQT)
     MESSAGE STRUCTURES                                            Page A-3
                                                              13 April 1988


             EQUIVALENCE (HDRDEF(31),HxLEN)
             EQUIVALENCE (HDRDEF(33),HxQSEQ)
     MESSAGE STRUCTURES                                            Page A-4
                                                              13 April 1988


                                   MIDDEF.TXT
     !
     ! SINGLE MESSAGE ID LIST HEAD STRUCTURE
     !
     ! COPY RIGHT: 
     !               INLAND STEEL
     !               PROCESS AUTOMATION DEPT.
     !               3210 WATLING ST. MS 2-465
     !               EAST CHICAGO, IN   46312
     !               
     ! DATE OF LAST UPDATE:  13-OCT-86
     !
             INTEGER MxLEN
             PARAMETER(MxLEN=44)     ! SIZE OF MESSAGE ID LIST 
                                     ! HEAD
             INTEGER MxIDSZ
             PARAMETER(MxIDSZ= 16)   ! SIZE OF A SINGLE MESSAGE 
                                     ! ID
             BYTE MIDDEF(MxLEN)
     !
             BYTE MxMID(MxIDSZ)      ! ASCII MESSAGE ID
             INTEGER*2 MxFLK         ! FORWARD LINK TO FIRST 
                                     ! MESSAGE IN QUEUE THIS ID
             INTEGER*2 MxBLK         ! BACKWARD LINK TO LAST 
                                     ! MESSAGE IN QUEUE THIS ID
             INTEGER*2 MxRNA         ! READ BUT NOT ACK. MESG. 
                                     ! FIRST BLOCK LINK
             INTEGER*2 MxBNA         ! READ BUT NOT ACK. MESG. 
                                     ! LAST BLOCK LINK
             INTEGER*2 MxMAX         ! MAXIMUM NUMBER OF 
                                     ! MESSAGES ALLOWED THIS ID
             INTEGER*2 MxCNT         ! CURRENT NUMBER IN QUEUE 
                                     ! THIS MESSAGE ID
             INTEGER*2 MxQSEQ        ! CURRENT ON QUEUE SEQUENCE 
                                     ! NUMBER
             INTEGER*2 MxR50(2)      ! RAD 50 CONNECTED TASK NAME
             INTEGER*2 MxTCB         ! TCB ADDRESS OF CONNECTED 
                                     ! TASK NAME
             INTEGER*2 MxEFN         ! READER'S EFN TO SET IF 
                                     ! MxCNT GOES NON-ZERO
             INTEGER*2 MxNVC         ! NUMBER VOLATILE MESSAGES
             INTEGER*2 MxNVL         ! LINK TO NEXT SCANNABLE 
                                     ! VOLATILE MESSAGE
             INTEGER*2 MxLST         ! LAST BLOCK NBR OF MESSAGE 
                                     ! LINKED TO LAST SCANNED
     C
             EQUIVALENCE(MIDDEF(1),MxMID)
             EQUIVALENCE(MIDDEF(17),MxFLK)
             EQUIVALENCE(MIDDEF(19),MxBLK)
             EQUIVALENCE(MIDDEF(21),MxRNA)
             EQUIVALENCE(MIDDEF(23),MxBNA)
             EQUIVALENCE(MIDDEF(25),MxMAX)
             EQUIVALENCE(MIDDEF(27),MxCNT)
             EQUIVALENCE(MIDDEF(29),MxQSEQ)
             EQUIVALENCE(MIDDEF(31),MxR50)
             EQUIVALENCE(MIDDEF(35),MxTCB)
     MESSAGE STRUCTURES                                            Page A-5
                                                              13 April 1988


             EQUIVALENCE(MIDDEF(37),MxEFN)
             EQUIVALENCE(MIDDEF(39),MxNVC)
             EQUIVALENCE(MIDDEF(41),MxNVL)
             EQUIVALENCE(MIDDEF(43),MxLST)
     MESSAGE STRUCTURES                                            Page A-6
                                                              13 April 1988


                                   QHDDEF.TXT
     !
     ! QUEUE SECTION FILE HEADER STRUCTURE
     !
     !
     ! COPY RIGHT: 
     !               INLAND STEEL
     !               PROCESS AUTOMATION DEPT.
     !               3210 WATLING ST. MS 2-465
     !               EAST CHICAGO, IN   46312
     !               
     ! DATE OF LAST UPDATE:  9/16/86
     !
             INTEGER QxKSIZ
             PARAMETER (QxKSIZ=20)   ! SIZE OF QUEUE HEADER
             BYTE QHDDEF(QxKSIZ)
             INTEGER*2 QxSIZ         ! SIZE OF QUEUE IN 512 
                                     ! BYTE BLOCKS
             INTEGER*2 QxUPD(4)      ! QUAD WORD FOR LAST 
                                     ! UPDATED TIME STAMP
             INTEGER*2 QxIDC         ! ACTUAL NUMBER OF ID'S IN 
                                     ! USE OR DEFINED
             INTEGER*2 QxFREE        ! NUMBER OF FREE BLOCKS 
             BYTE QxNODE(6)          ! LOCAL NODE NAME
     C
             EQUIVALENCE(QHDDEF(1),QxSIZ)
             EQUIVALENCE(QHDDEF(3),QxUPD)
             EQUIVALENCE(QHDDEF(11),QxIDC)
             EQUIVALENCE(QHDDEF(13),QxFREE)
             EQUIVALENCE(QHDDEF(15),QxNODE)
     MESSAGE STRUCTURES                                            Page A-7
                                                              13 April 1988


                                   HDRDEF.MAC
             .MACRO  HDRDEF,$GBL
     ;
     ; DEFINE THE STRUCTURE OF THE MESSAGE HEADER. 
     ;
     ; THIS IS STRUCTURE CAN BE USED TO FORM A RECORD THAT CAN 
     ; BE READ FROM THE QUEUE.  IE: CONCATENATE THIS STRUCTURE 
     ; TO PROCEED THE ACTUAL DATA TO BE RETURNED ON A READ_Q.
     ; 
     ;
     ; DATE OF LAST UPDATE:  8/11/86
     ;
     ; COPY RIGHT: 
     ;               INLAND STEEL
     ;               PROCESS AUTOMATION DEPT.
     ;               3210 WATLING ST. MS 2-465
     ;               EAST CHICAGO, IN   46312
     ;               
             .ASECT  
      .=0
     H.SNM:  .BLKB   6       ; ASCII DECNET SOURCE NODE NAME
                             ; (FOR MESSAGES QUEUED WITHIN A NODE
                             ; THIS WILL BE BLANK)
     H.DNM:  .BLKB   6       ; DESTINATION DECNET NODE NAME
                             ; FOR MESSAGES QUEUED WITHIN A NODE,
                             ; THIS WILL BE BLANK).
     H.OFQT: .BLKW   4       ; OFF QUEUE TIME (FILLED IN DURING 
                             ; READ)
     H.TYPE: .BLKW   1       ; TYPE OF MESSAGE 
     ;
             ; 0= MESSAGE CAN BE DELETED WHEN QUEUE IS FULL AND 
             ;    THIS IS OLDEST
             ; 1= MESSAGE IS NOT TO BE DELETED  EVEN IF QUEUE IS
             ;    FULL
             ; 2= IF REMOTE NODE QUEUE IS FULL, THEN DO NOT 
             ;    QUEUE ON REMOTE NODE
     ;
     H.ONQT: .BLKW   4       ; ON QUEUE TIME (FILLED IN WHEN 
                             ; MESSAGE WAS FIRST WRITTEN TO A 
                             ; QUEUE EITHER LOCALLY OR ON THE 
                             ; REMOTE QUEUE. IT IS PRESERVED
                             ; WHEN REQUEUED ON TARGET NODE)
     H.LEN:  .BLKW   1       ; BYTE COUNT OF MESSAGE (DOES NOT 
                             ; INCLUDE HEADER)
     H.QSEQ: .BLKW   1       ; ON QUEUE SEQUENCE NUMBER 
     H.SIZ=.                 ; MINIMUM MESSAGE SIZE
     H.MXSQ=9999.            ; MAXIMUM ON QUEUE SEQUENCE NUMBER
      .=0
             .ENDM
     MESSAGE STRUCTURES                                            Page A-8
                                                              13 April 1988


                                   MGHDEF.MAC
             .MACRO  MGHDEF
     ;
     ; Revision: 1.1
     ; Date of last update: 12/10/86
     ; Author:  Earl Lakia
     ;
     ; This macro defines the message that is sent between 
     ; cooperating MA Routers.  This is basically, the preamble
     ; to the message as it is received from the queue.  
     ;
             .ASECT
      .=0
     MG.LSQ: .BLKW   1       ; LINK SEQUENCE NUMBER
     MG.RNA: .BLKW   1       ; RNA
     MG.IDX: .BLKW   1       ; INDEX 
     MG.MID: .BLKB   16.     ; MESSAGE ID
     MG.SIZ=.
      .=0
     ;
     ; NORMALLY, THE MESSAGE HEADER, AND MESSAGE FOLLOW HERE
     ;
     ; H.SNM:
     ; H.DNM:
     ; H.OFQT:
     ; . . .
     ; . . .
     ; . . .
     ;
             .ENDM
     MESSAGE STRUCTURES                                            Page A-9
                                                              13 April 1988


                                   MIDDEF.MAC
     ;
     ; SINGLE MESSAGE ID LIST HEAD STRUCTURE
     ;
     ; COPY RIGHT: 
     ;               INLAND STEEL
     ;               PROCESS AUTOMATION DEPT.
     ;               3210 WATLING ST. MS 2-465
     ;               EAST CHICAGO, IN   46312
     ;               
     ; DATE OF LAST UPDATE: 13-OCT-86
     ;
             .MACRO  MIDDEF
             .ASECT
      .=0
     M.IDSIZ = 16.                   ; SIZE OF A SINGLE MESSAGE 
                                     ; ID
     M.MID:  .BLKB   M.IDSIZ         ; ASCII MESSAGE ID
     M.FLK:  .BLKW   1               ; FORWARD LINK TO FIRST 
                                     ; BLOCK OF FIRST MESSAGE 
                                     ; IN QUEUE THIS ID
     M.BLK:  .BLKW   1               ; BACKWARD LINK TO LAST 
                                     ; BLOCK OF LAST MESSAGE 
                                     ; IN QUEUE THIS ID
     M.RNA:  .BLKW   1               ; READ BUT NOT ACK. MESG. 
                                     ; FIRST BLOCK LINK
     M.BNA:  .BLKW   1               ; READ BUT NOT ACK. MESG. 
                                     ; LAST BLOCK LINK
     M.MAX:  .BLKW   1               ; MAXIMUM NUMBER OF 
                                     ; MESSAGES ALLOWED THIS ID
     M.CNT:  .BLKW   1               ; CURRENT NUMBER IN QUEUE 
                                     ; THIS MESSAGE ID
     M.QSEQ: .BLKW   1               ; CURRENT ON QUEUE SEQUENCE 
                                     ; NUMBER
     M.R50:  .BLKW   2               ; RAD 50 CONNECTED TASK NAME
     M.TCB:  .BLKW   1               ; TCB ADDRESS OF CONNECTED 
                                     ; TASK NAME
     M.EFN:  .BLKW   1               ; READER'S EFN TO SET IF 
                                     ; M.CNT GOES NON-ZERO
     M.NVC:  .BLKW   1               ; NUMBER VOLATILE MESSAGES
     M.NVL:  .BLKW   1               ; LINK TO LAST SCANNED 
                                     ; VOLATILE MESSAGE
     M.LST:  .BLKW   1               ; LAST BLOCK NBR OF MESSAGE
                                     ; LINKED TO LAST SCANNED
     M.LEN=.
      .=0
             .ENDM
     MESSAGE STRUCTURES                                           Page A-10
                                                              13 April 1988


                                   NRBDEF.MAC
     ;
     ; NRBDEF
     ;       Routing database node routing block (NRB) offset 
     ;       definition.
     ;
     ; Date of last update:  06/08/87
     ; Author: Earl Lakia
     ;
             .MACRO  NRBDEF
             .ASECT
      .=0
     N.LUN:   .BLKW  1       ; LUN USED TO CONNECT TO NODE
     N.STS:   .BLKW  1       ; NODE STATUS SEE BELOW
     N.LNK:   .BLKW  1       ; LINK TO NEXT NRB
     N.CUR:   .BLKB  6       ; ACTUAL CURRENT NODE NAME
     N.PRI:   .BLKB  6       ; PRIMARY NODE NAME
     N.SEC:   .BLKB  6       ; SECONDARY NODE NAME
     N.ACC:   .BLKB  60.     ; ACCESS CONTROL STRING
     N.NCB:   .BLKB  N.RQL   ; NETWORK CONNECT BLOCK
     N.IDS:   .BLKW  1       ; TOTAL MSG ID'S THIS NODE
     N.ULNK:  .BLKW  1       ; LINK TO UNSOLICITED INPUT BUFFER
     N.IBSA:  .BLKW  1       ; ADDRESS OF NETWORK RECEIVE I/O 
                             ; STATUS BLOCK
     N.IOSB:  .BLKW  2       ; NETWORK RECEIVE I/O STATUS BLOCK
     N.ISAC:  .BLKW  1       ; ADDRESS OF CONNECT/DISCONNECT 
                             ; I/O STATUS BLOCK
     N.IOSC:  .BLKW  2       ; CONNECT/DISCONNECT I/O STATUS 
                             ; BLOCK
     N.ISAU:  .BLKW  1       ; ADDRESS OF NETWORK DATA I/O 
                             ; STATUS BLOCK
     N.IOSU:  .BLKW  2       ; NETWORK I/O STATUS BLOCK
     N.SEQ:   .BLKW  1       ; LINK SEQUENCE NUMBER INBOUND
     N.OSEQ:  .BLKW  1       ; LINK SEQUENCE NUMBER OUTBOUND
     N.OIDS:  .BLKW  1       ; ADDRESS OF LAST SCANNED OUTBOUND 
                             ; NRBID
     N.STAM:  .BLKW  1       ; CONNECT/DISCONNECT STATUS FOR 
                             ; WRITE TO QUEUE
     N.MBX:   .BLKB  N.CBL+30   ; SAVE BUFFER FOR NETWORK 
                                ;   CONNECT REQUEST MESSAGE
     N.IDXL=.                ; START OF THE MESSAGE ID'S ROUTED 
                             ; BY THIS NODE
      .=0
     NID.IX: .BLKW   1       ; LINK TO QUEUE MESSAGE ID LIST 
                             ; HEAD 
     NID.RA: .BLKW   1       ; RNA FOR THIS MESSAGE ID
     NID.ST: .BLKW   1       ; MSG ID STATUS WORD SEE BELOW
     NID.NM: .BLKB   16.     ; ASCII MESSAGE ID BEING ROUTED
     NID.LN=.
      .=0
     ;
     ; N.STS BIT DEFINITIONS
     ;
     NS.AVL= 1       ; NODE IS AVAILABLE
     NS.DWN= 2       ; NODE IS DOWN
     NS.CPN= 4       ; LOCAL CONNECT IN PROGRESS
     MESSAGE STRUCTURES                                           Page A-11
                                                              13 April 1988


     NS.CTM=10       ; CONNECT TIMER IS ACTIVE
     NS.SEC=20       ; SECONDARY NODE IS CONNECTED
     NS.PRI=40       ; PRIMARY NODE IS CONNECTED
     NS.RCN=100      ; REMOTE NODE REQUESTED THE CONNECTION
     NS.LND=200      ; PRIMARY NODE NAME IS A LOGICAL NODE NAME
     NS.NOD=400      ; ACTUAL NODE NAME OF A LOGICAL NODE 
                     ; RECEIVED
     NS.DPN=1000     ; LOCAL DISCONNECT IN PROGRESS
     ;
     ; NID.ST BIT DEFINITIONS
     ;
     NIS.RT= 1       ; MSG ID NOT ROUTABLE
                     ; BITS 14 AND 15 (LAST TWO MSB's) ARE USED BY 
                     ;   ROUTER FOR READ RETRY COUNTER
             .ENDM
     MESSAGE STRUCTURES                                           Page A-12
                                                              13 April 1988


                                   OUTDEF.MAC
     ;
     ; OUTDEF
     ;       Routing database output buffer offset definition
     ;
     ; Date of last update:  12/04/86
     ; Author: Earl Lakia
     ;
             .MACRO  OUTDEF
             .ASECT
      .=0
     O.LNK:  .BLKW   1       ; LINK TO NEXT BUFFER
     O.NRB:  .BLKW   1       ; LINK TO NRB USING THIS BUFFER
     O.IOSB: .BLKW   2       ; STATUS BLOCK OF NODE USING THIS 
                             ; BUFFER
     O.BUF:  .BLKW   1       ; OUTPUT BUFFER
      .=0
             .ENDM
     MESSAGE STRUCTURES                                           Page A-13
                                                              13 April 1988


                                   QHDDEF.MAC
     ;
     ; QUEUE SECTION FILE HEADER STRUCTURE
     ;
     ;
     ; COPY RIGHT: 
     ;               INLAND STEEL
     ;               PROCESS AUTOMATION DEPT.
     ;               3210 WATLING ST. MS 2-465
     ;               EAST CHICAGO, IN   46312
     ;               
     ; DATE OF LAST UPDATE:  8/27/86
     ;
             .MACRO  QHDDEF
             .ASECT
      .=0
     Q.SIZ:  .BLKW   1       ; SIZE OF QUEUE IN 512 BYTE BLOCKS
     Q.UPD:  .BLKW   4       ; QUAD WORD FOR LAST UPDATED TIME 
                             ; STAMP
     Q.IDC:  .BLKW   1       ; ACTUAL NUMBER OF ID'S IN USE OR 
                             ; DEFINED
     Q.FREE: .BLKW   1       ; NUMBER OF FREE BLOCKS 
     Q.NODE: .BLKB   6       ; LOCAL NODE NAME
     Q.KSIZ=.                ; SIZE OF LIST HEAD
      .=0
             .ENDM
     MESSAGE STRUCTURES                                           Page A-14
                                                              13 April 1988


                                   RSPDEF.MAC
     ;
     ; RSPDEF
     ;       Routing database response buffer offset definition
     ;
     ; Date of last update:  12/04/86
     ; Author: Earl Lakia
     ;
             .MACRO  RSPDEF
             .ASECT
      .=0
     R.LNK:  .BLKW   1       ; LINK TO NEXT BUFFER
     R.NRB:  .BLKW   1       ; LINK TO NRB USING THIS BUFFER
     R.IOSB: .BLKW   2       ; STATUS BLOCK OF NODE USING THIS 
                             ; BUFFER
     R.BUF:  .BLKW   1       ; RESPONSE BUFFER
     R.SIZ=.
      .=0
             .ENDM
     MESSAGE STRUCTURES                                           Page A-15
                                                              13 April 1988


                                   RTRHED.MAC
     ;
     ; RTRHED
     ;       Routing database header offset definition.
     ;
     ; Date of last update:  03/04/87
     ; Author: Earl Lakia
     ;
             .MACRO  RTRHED
             .ASECT
      .=0
     HD.NOD: .BLKB   6       ; OUR NODE NAME
     HD.ID:  .BLKW   1       ; WILL CONTAIN UNIQUE IDENTIFIER
                             ; SO CAN TELL IF DATABASE CHANGES
     HD.STR: .BLKW   1       ; WILL CONTAIN '1' AFTER ROUTER 
                             ; STARTED SO THAT ROUTER CAN'T BE 
                             ; RESTARTED WITHOUT REINSTALLING
                             ; DATABASE
     HD.NRB: .BLKW   1       ; NRB BEGINNING THREAD
     HD.NBL: .BLKW   1       ; LAST NRB SCANNED FOR OUTPUT
     HD.NCT: .BLKW   1       ; NUMBER OF NRBS (NODES)
     HD.NRT: .BLKW   1       ; NOT ROUTABLE TIMER FLAG (1= TIMER
                             ;  ACTIVE)
     HD.CTM: .BLKW   1       ; CONNECT TIMER FLAG (1= CONNECT 
                             ; TIMER ACTIVE)
     HD.OBF: .BLKW   1       ; POINTER TO OUTPUT BUFFERS
     HD.BLS: .BLKW   1       ; POINTER TO NEXT POSSIBLE 
                             ; AVAILABLE OUTPUT BUFFER
     HD.OCT: .BLKW   1       ; TOTAL NUMBER OF OUTPUT BUFFERS
     HD.BFR: .BLKW   1       ; NUMBER OF FREE OUTPUT BUFFERS
     HD.OSZ: .BLKW   1       ; SIZE OF OUTPUT BUFFER
     HD.RBF: .BLKW   1       ; POINTER TO RESPONSE BUFFERS
     HD.RLS: .BLKW   1       ; POINTER TO NEXT POSSIBLE 
                             ; AVAILABLE RESPONSE BUFFER
     HD.RCT: .BLKW   1       ; TOTAL NUMBER OF RESPONSE BUFFERS
     HD.RFR: .BLKW   1       ; NUMBER OF FREE RESPONSE BUFFERS
     HD.RSZ: .BLKW   1       ; SIZE OF RESPONSE BUFFER
      .=0
             .ENDM
     MESSAGE STRUCTURES                                           Page A-16
                                                              13 April 1988


                                   STADEF.MAC
     ;
     ; STADEF
     ;       Connect/disconnect status message written to queue 
     ;       offset definition
     ;
     ; Date of last update:  3/17/87
     ;
             .MACRO  STADEF
             .ASECT
      .=0
     SM.PRI: .BLKB   6       ; PRIMARY NODE NAME FROM DATABASE
     SM.SEC: .BLKB   6       ; SECONDARY NODE NAME FROM DATABASE
     SM.IOS: .BLKW   1       ; STATUS OF CONNECT/DISCONNECT
     SM.UD:  .BLKW   1       ; CONNECT/DISCONNECT FLAG 
                             ; (0=DISCONNECT, 1=CONNECT)
     SM.STS: .BLKW   2       ; NRB STATUS WORD FROM DATABASE 
                             ; (ONLY FIRST WORD USED)
     SM.LEN=.
      .=0
             .ENDM












                                   APPENDIX B

                            ROUTING DATABASE MACROS



     The following single  macro  defines  all  of  the  macros  needed  to
     generate  the  actual  routing  database  required by the router.  The
     reader should consult the main body  of  the  document  (ROUTING  TASK
     Chapter)  for  the parameters for the actual calls.  The actual source
     code for the macro is only included here to  help  decode  any  errors
     that might occur while developing a routing database.
     ROUTING DATABASE MACROS                                       Page B-2
                                                              13 April 1988


     ;
     ; ROUTING DATABASE MACROS
     ;
     ; DATE OF LAST UPDATE:  6/8/87
     ;
     ;  6/8/87- Modified Node macro to add save buffer 
     ;          for network connect request messages.
     ;               D.J.L.
     ;  3/4/87- Modified Node macro to add LOG parameter to 
     ;          support logical node names.
     ;               D.J.L.
     ;  2/5/87- Modified Node macro to change default access 
     ;          control string to MA_ROUTER instead of 
     ;          <TASK=MA_ROUTER>.
     ;               E.D.L.
     ;
     ; AUTHOR:  Earl Lakia
     ;
     ;
     ; Main routing macro, defines all others and header
     ; of the routing database
     ;
      .MACRO RTRDEF,MXSZ,MXOT,MXRS
     ;
     ; RTRDEF MACRO
     ; This macro is responsible for the following:
     ;       1) Defining additional macros for the node and route
     ;          definitions.
     ;       2) Defining the largest outbound message buffer size
     ;          (default is 512).
     ;       3) Defining the number of outbound messages to
     ;          be outstanding at one time (default=4).
     ;       4) Defining the number of response buffers for
     ;          acknowledging inbound messages (default=
     ;          MXOT*2)
     ;
     ;       MXSZ= Largest outbound message size in bytes
     ;       MXOT= Number of outstanding outbound messages
     ;       MXRS= Number of response message buffers.
     ;
      .IIF DF,RT$DEF,.ERROR ;MULTIPLE CALL OF THE RTRDEF MACRO
     ;
     ; SET DEFAULTS IF BLANK ARGUMENTS
     ;
      .IF B MXOT
             MXOTX=4         ; DEFAULT NUMBER OUTPUT BUFFERS
      .IFF 
             MXOTX=MXOT
      .ENDC
     ;
      .IF B MXSZ
             MXSZX=512.      ; DEFAULT SIZE OF OUTPUT BUFFER
      .IFF 
             MXSZX=MXSZ
      .ENDC
     ;
     ROUTING DATABASE MACROS                                       Page B-3
                                                              13 April 1988


      .IF B MXRS
             MXRSX=MXOTX*2   ; DEFAULT NUMBER OF RESPONSE BUFFERS
      .IFF 
             MXRSX=MXRS
      .ENDC
     ;
      .MCALL CONB$$          ; CONNECT BLOCK MACRO
      .MCALL NETDF$          ; NETWORK OFFSETS
      .MCALL NRBDEF          ; INVOKE NRB MACRO TO GET LOGICAL 
                             ;   NAME STATUS BIT VALUE
      .MCALL MGHDEF,HDRDEF   ; EVOKE MACROS TO GET ROUTER AND 
                             ;   QUEUE HEADER SIZES
      .NLIST ME
     NETDF$
     MGHDEF
     HDRDEF
     NRBDEF
      .LIST  ME
     ;
     NDCNT=0         ; NUMBER OF NODES DEFINED SO FAR.
     TIDCNT=0        ; NUMBER OF MSG ID'S DEFINED (ALL NODES)
     MXSZX=MXSZX+MG.SIZ+H.SIZ   ; ADD IN ROUTER AND 
                                ; QUEUE HEADER SIZES 
     RSPSIZ=44.      ; SIZE OF A RESPONSE BUFFER
     ;
     ; HEADER OF THE WHOLE ROUTING DATABASE
     ;
      .PSECT ARTRHD,RW,D,OVR,REL,GBL
     ;
     HD.NOD: .ASCII  /******/        ; OUR NODE NAME
     HD.ID:  .BLKW   1       ; WILL CONTAIN UNIQUE IDENTIFIER
                             ; SO CAN TELL IF DATABASE CHANGES
     HD.STR: .WORD   0       ; WILL CONTAIN '1' AFTER ROUTER 
                             ; STARTED SO THAT ROUTER CAN'T BE 
                             ; RESTARTED WITHOUT REINSTALLING 
                             ; DATABASE
     HD.NRB: .WORD   NODE0   ; NRB BEGINNING THREAD
     HD.NBL: .WORD   NODE0   ; LAST SCANNED NRB, INIT TO ZERO
     HD.NCT: .WORD   0       ; NUMBER OF NRBS (NODES)
     HD.NRT: .WORD   0       ; NOT ROUTABLE TIMER FLAG 
                             ; (1= TIMER ACTIVE)
     HD.CTM: .WORD   0       ; CONNECT TIMER FLAG 
                             ; (1= CONNECT TIMER ACTIVE)
     HD.OBF: .WORD   OUTBUF  ; POINTER TO OUTPUT BUFFERS
     HD.BLS: .WORD   OUTBUF  ; POINTER TO NEXT POSSIBLE 
                             ; AVAILABLE OUTPUT BUFFER
     HD.OCT: .WORD   MXOTX   ; TOTAL NUMBER OF OUTPUT BUFFERS
     HD.BFR: .WORD   MXOTX   ; NUMBER OF FREE OUTPUT BUFFERS
     HD.OSZ: .WORD   MXSZX   ; SIZE OF OUTPUT BUFFER
     HD.RBF: .WORD   RSPBUF  ; POINTER TO RESPONSE BUFFERS
     HD.RLS: .WORD   RSPBUF  ; POINTER TO NEXT POSSIBLE 
                             ; AVAILABLE RESPONSE BUFFER
     HD.RCT: .WORD   MXRSX   ; TOTAL NUMBER OF RESPONSE BUFFERS
     HD.RFR: .WORD   MXRSX   ; NUMBER OF FREE RESPONSE BUFFERS
     HD.RSZ: .WORD   RSPSIZ  ; SIZE OF RESPONSE BUFFER
     ;
     ROUTING DATABASE MACROS                                       Page B-4
                                                              13 April 1988


     ; OUTPUT BUFFERS
     ;
      .PSECT OUTBUF,D,RW,REL,OVR,GBL
     ;
     OUTBUF:
     I=1
      .REPT  MXOTX
      .IF EQ <I-MXOTX>
             .WORD   OUTBUF  ; NO MORE BUFFERS, POINT BACK 
                             ; TO FIRST BUFFER
             .WORD   0,0,0   ; NRB, AND STATUS BLOCK OF NODE 
                             ; USING THIS BUFFER
      .IFF
             .WORD   .+MXSZX+12 ; LINK TO NEXT BUFFER HEADER
             .WORD   0,0,0   ; NRB, AND STATUS BLOCK OF 
                             ; NODE USING THIS BUFFER
      .ENDC
             .BLKB   MXSZX   ; ALLOCATE THE BUFFER
             I=I+1
      .ENDR
     ;
     ; RESPONSE BUFFERS
     ;
      .PSECT RSPBUF,D,RW,REL,OVR,GBL
     RSPBUF:
     I=1
      .REPT  MXRSX
      .IF EQ <I-MXRSX>
             .WORD   RSPBUF  ; NO MORE BUFFERS, POINT BACK TO 
                             ; FIRST BUFFER
             .WORD   0,0,0   ; NRB, AND STATUS BLOCK OF NODE 
                             ; USING THIS BUFFER
      .IFF
             .WORD   .+RSPSIZ+12 ; LINK TO NEXT BUFFER HEADER
             .WORD   0,0,0   ; NRB, AND STATUS BLOCK OF NODE 
                             ; USING THIS BUFFER
      .ENDC
             .BLKB   RSPSIZ  ; ALLOCATE THE RESPONSE BUFFER
             I=I+1
      .ENDR
     ROUTING DATABASE MACROS                                       Page B-5
                                                              13 April 1988


     ; 
     ; UTILITY MACROS
     ;
     ; MACRO TO CREATE A LABEL
     ; 
      .MACRO LABEL,NAME
     NODE'NAME:
      .ENDM
     ;
     ; MACRO TO GENERATE A LABEL TO POINT BACK TO THE START OF 
     ; A THREADED LIST
     ;
      .MACRO ELABEL,NAME
     NODE'NAME = NODE0       ; ENDING LINK
      .ENDM
     ;
     ; MACRO TO GENERATE A LINK TO NEXT NRB
     ;
      .MACRO FLINK,LNK
             .WORD   NODE'LNK        ; LINK TO NEXT NRB
      .ENDM
     ;
     ; MACRO TO GENERATE A INPUT BUFFER AND GENERATE LINKS
     ;
      .MACRO UNSBUF,NODE,SIZ
             .WORD   USBF'NODE       ; LINK TO UNSOLICITED INPUT 
                                     ; BUFFER
             .SAVE
      .PSECT UNSBUF,D,RW,REL,OVR,GBL
             .EVEN
     USBF'NODE:
             .WORD   SIZ     ; SIZE OF THE BUFFER
             .BLKB   SIZ     ; ACTUAL BUFFER
             .RESTORE
      .ENDM
     ;
     ROUTING DATABASE MACROS                                       Page B-6
                                                              13 April 1988


     ;
     ; NODE MACRO
     ;       This macro builds a Node Routing Block (NRB).
     ;
     ;  LOG= Flag.. Primary node name is a logical node name
     ;  PRI= Primary node name (or Blank if terminating macro)
     ;  SEC= Secondary node name
     ;  ACC= Access control string (Default= MA_ROUTER)
     ;  SIZ= Largest incoming message size in bytes 
     ;       (Default=512 bytes)
     ;
     ; calling sequence:
     ;       NODE LOG,PRI=<B4750A>,SEC=<B4750B>,
     ;            ACC=<<MA_ROUTER>>,SIZ=1024.
     ;
      .MACRO NODE,LOG,PRI,SEC,ACC,SIZ
     IDCNT=0                         ; NUMBER IDs FOR THIS NODE
      .IF B PRI
             ELABEL  nDCNT           ; CREATES NULL FORWARD LINK
             RTRDID==<NDCNT*1000>+<TIDCNT> ; GLOBAL SYMBOL USED
                                           ;   BY ROUTER PGM
                                           ;   TO CHECK IF IT IS
                                           ;   USING CURRENT 
                                           ;   ROUTING DATABASE
             .PSECT  ARTRHD
             SAVEPC=.                ; SAVE PSECT PROGRAM COUNTER
             .=HD.ID
             .WORD   RTRDID          ; REPLACE HD.ID IN HEADER 
                                     ; TO IDENTIFY DBS
             .=HD.NCT
             .WORD   NDCNT           ; REPLACE HD.NCT IN HEADER
             .=SAVEPC                ; RESTORE PSECT PROGRAM 
                                     ; COUNTER
             .MEXIT
      .ENDC
     ;
     ; BUILD A NRB AS WE HAVE A NODE SPECIFIED
     ;
      .PSECT NRBS,D,OVR,RW,REL,GBL
     ;
             LABEL   nDCNT   ; DEFINE OURSELVES
             LUN=NDCNT+4     
             .WORD   LUN     ; LOGICAL UNIT NUMBER USED TO 
                             ; CONNECT TO NODE
             .IF NB LOG
             .WORD   NS.LND  ; SET LOGICAL NODE NAME STATUS BIT
             .IFF
             .WORD   0       ; N.STS NODE STATUS
             .ENDC
             NDCNT=NDCNT+1   ; INCREMENT NUMBER OF NODES BEING 
                             ; DEFINED
             FLINK   nDCNT  ; LINK TO NEXT NRB
             .BLKB   6       ; ACTUAL CURRENT NODE NAME (FILLED 
                             ; IN WHEN CONNECTED)
     LIM=.+6                 ; ONLY TAKE 6 CHARACTER NODE NAME
             .ASCII  /'PRI/
     ROUTING DATABASE MACROS                                       Page B-7
                                                              13 April 1988


      .=LIM
     LIM=.+6                 ; ONLY TAKE 6 CHARACTER SEC. NODE 
                             ; NAME
             .IF NB LOG 
             .ASCII  /      /
             .IFF 
             .IF B SEC
             .ASCII  /'PRI/  ; IF NO SECONDARY, THEN USE PRIMARY
             .IFF
             .ASCII  /'SEC/
             .ENDC
             .ENDC
      .=LIM
             .ASCII  /                              / ; INIT ACC
             .ASCII  /                              / ; TO BLANKS
      .=LIM
     LIM=.+60.               ; ONLY ALLOW 60 CHARACTER ACCESS 
                             ; CONTROL STRING
             .IF B <ACC>
             .ASCII  /MA_ROUTER/     ; DEFAULT ACCESS 
                                             ; CONTROL STRING
             .IFF
             .ASCII  /'ACC/  ; ACCESS CONTROL STRING
             .ENDC
      .=LIM
             .NLIST  ME
             .IF B <ACC>
             CONB$$  ,0,1,<MA_ROUTER>  ; BUILD DEFAULT 
                                            ; NETWORK CONNECT 
                                            ; BLOCK
             .IFF
             CONB$$  ,0,1,ACC        ;BUILD NETWORK CONNECT BLOCK
             .ENDC
             .LIST   ME
     NIDCNT=.                ; SAVE FOR REPLACEMENT BY ROUTE 
                             ; MACRO 
             .WORD   0       ; TOTAL ID'S THIS NODE FROM ROUTE 
                             ; MACRO
             .IF B SIZ
             SIZX=512.       ; DEFAULT SIZE OF UNSOLICITED 
                             ; INPUT BUFFER
             .IFF 
             SIZX=SIZ
             .ENDC
             SIZX=SIZX+MG.SIZ+H.SIZ  ; ADD IN ROUTER AND QUEUE 
                                     ; HEADER SIZES
             UNSBUF  nDCNT-1,SIZX    ; LINK TO UNSOLICITED INPUT
                                     ; BUFFER AND ALSO ALLOCATE 
                                     ; BUFFER
             .WORD   .+2     ; N.IBSA ADDRESS OF NETWORK RECEIVE
                             ; I/O STATUS BLOCK
             .WORD   0,0     ; N.IOSB NETWORK RECEIVE I/O STATUS 
                             ; BLOCK
             .WORD   .+2     ; N.ISAC ADDR OF CONNECT/DISCONNECT
                             ; I/O STATUS BLOCK
             .WORD   0,0     ; N.IOSC CONNECT/DISCONNECT I/O 
     ROUTING DATABASE MACROS                                       Page B-8
                                                              13 April 1988


                             ; STATUS BLOCK
             .WORD   .+2     ; N.ISAU ADDRESS OF NETWORK DATA 
                             ; I/O STATUS BLOCK
             .WORD   0,0     ; N.IOSU NETWORK DATA I/O STATUS 
                             ; BLOCK
             .WORD   0       ; N.SEQ LINK SEQUENCE INBOUND NUMBER
             .WORD   0       ; N.OSEQ LINK SEQUENCE OUTBOUND 
                             ; NUMBER
             .WORD   .+4+N.CBL+30  ; N.OIDS ADDRESS LAST SCANNED 
                                   ; OUTBOUND NRBID 
             .WORD   0       ; N.STAM CONNECT/DISCONNECT STATUS 
                             ; FOR WRITE TO QUEUE
             .BLKB   N.CBL+30 ; N.MBX SAVE BUFFER FOR NETWORK 
                              ;   CONNECT REQUEST MESSAGE
      .ENDM
     ROUTING DATABASE MACROS                                       Page B-9
                                                              13 April 1988


     ;
     ; The following macro performs the routing function for
     ; an outbound message id.
     ;
     ;       ID= Message Id that is to be output. If less
     ;           than 16 characters are specified, it is
     ;           padded with Blanks.
     ;
     ;       If the ID is Blank, it terminates a list of
     ;       ROUTE macros for a particular node.
     ;
     ; Calling sequence:
     ;
     ;       ROUTE  ID=<MESSAGE_ID>
     ;
      .MACRO ROUTE,ID
     ;
      .PSECT NRBS,D,OVR,RW,REL,GBL
      .IF B ID
             .WORD   0               ; INDEX FOR QUEUE
             .WORD   0               ; RNA
             .WORD   0               ; MSG ID STATUS WORD
             .ASCII  /                /  ; END MESSAGE ID
             SAVEPC=.
             .=NIDCNT                    ; RESET PC TO NUMBER OF
                                         ;  IDs IN NRB
             .WORD   IDCNT               ; STORE NUMBER OF IDs
             .=SAVEPC
             TIDCNT=TIDCNT+IDCNT         ; ADD TO TOTAL NUMBER 
                                         ;  OF ID'S
             .MEXIT
      .ENDC  
     ;
     ; Attach the message id to the current node being defined
     ;
             .WORD   0               ; INDEX FOR QUEUE
             .WORD   0               ; RNA
             .WORD   0               ; MSG ID STATUS WORD
             LIM=.
             .ASCII  /                /      ; INIT TO Blanks
             .=LIM   
             LIM=.+16.               ; DON'T LET GET BIGGER 
                                     ; THAN 16
             .ASCII  /'ID/
             .=LIM
             IDCNT=IDCNT+1           ; INCREMENT NUMBER OF MSG 
                                     ; ID'S THIS NODE
      .ENDM
      .ENDM












                                   APPENDIX C

                                  ERROR CODES



     C.1  ERRORS RETURNED BY DRIVER/ACP

     The following error codes are returned by either the ZQ driver or  the
     QUEACP  to  the  task  that  issued  the  I/O request.  The error code
     indicates why the I/O request issued could not be completed.




              IE.IFC (-02) -- Invalid  function  code.   The  I/O  function
              specified  in the QIO could not be processed by the ZQ driver
              or the ACP.

              IE.SPC (-06) -- Bad buffer address.

              IE.DNA (-07) -- ZQ:  device not mounted.

              IE.DUN (-09)  --  ZQ:   device  not  mounted  or  marked  for
              dismount.

              IE.EOF (-10) -- No messages in queue.

              IE.WLK (-12) -- A connect request has been  received  from  a
              task  that does not have a pending I/O.  Subroutine INITQ was
              probably not called to set up the task exit handlers.

              IE.DAO (-13) -- User buffer to small to contain message read.

              IE.ABO (-15) -- QUEACP has been aborted via directive  or  an
              MCR or DCL command.

              IE.PRI (-16) -- The ZQ:  device is not mounted.

              IE.LCK (-27) -- Trying to  mount  ZQ:   device  when  already
              mounted;   trying   to  dismount  ZQ:   device  when  already
              dismounted.

              IE.CKS (-30) -- Error reading queue header into queue region.

              IE.WAT (-31) -- Queue file not contiguous.
     ERROR CODES                                                   Page C-2
     ERRORS RETURNED BY DRIVER/ACP                            13 April 1988


              IE.SNC (-35) -- The wrong message is being acknowledged.

              IE.CLO (-38) -- Error closing the queue file.

              IE.NBF (-39) -- Directive error  reading  queue  header  from
              queue file.

              IE.RBG (-40) -- Message to be written to queue  exceeds  4014
              bytes.

              IE.NBK (-41) -- Queue header larger than 4K words; cannot map
              with a single APR.

              IE.ILL (-42) -- The ACP is not installed in the system.

              IE.RCN (-46) -- I/O error reading  queue  header  from  queue
              file.

              IE.FOP (-53) -- A message exists in the queue that  has  been
              read but not acknowledged.

              IE.NFW (-69) -- ACP not found in system task  directory  when
              trying to mount ZQ:  device.

              IE.PNT (-71)  --  No  message  in  this  queue  needs  to  be
              acknowledged.

              IE.NDR (-72) -- No room left in queue.

              IE.URJ (-73) -- Task cannot  connect  to  queue;  other  task
              already connected.

              IE.NLK (-79) -- Task is not connected to queue;  cannot  read
              any messages until connected.

              IE.NST (-80) -- Another task is connected  to  queue;  cannot
              read any messages while other task connected.

              IE.IQU (-91) -- Trying to mount ZQ:  device with a task  that
              is not marked as an ACP.

              IE.UKN (-97) -- Message id does not exist.

     ERROR CODES                                                   Page C-3
     ACP ERRORS                                               13 April 1988


     C.2  ACP ERRORS

     If  the  ACP  terminates  abnormally  (ie.   an  SST  occurs)   during
     execution, the message

             hh:mm:ss  *** ZQ0:  -- Select error

     will be printed.  A PMD (Postmortem Dump), QUEACP.PMD, is generated in
     LB0:[1,4].   This  PMD may be useful in solving the problem and should
     be saved.

     The following errors are output to the  console  logger  by  the  ACP,
     QUEACP.   Any error marked 'FATAL' will cause the ACP to exit.  No PMD
     is generated.  The format of the ACP error message is:

        date time (ii) QUEACP QUEUE MANAGER ERROR: nn STATUS: nnnn

                     where
                             date = current date in the form dd-mmm-yy
                             time = current time in the form hh:mm:ss
                               ii = number of error messages lost
                                    (not logged) since last log
                               nn = error number
                             nnnn = status




              ERROR 01 - The queue file MAQUEUE.DAT is not contiguous.  The
              file  must be contiguous for the ACP to access it.  No status
              is displayed.

              ERROR 02  -  The  ACP  is  unable  to  open  the  queue  file
              MAQUEUE.DAT.   The  returned  FCS error code is the displayed
              status.

              ERROR 03 - (FATAL) An I/O error occurred while  the  ACP  was
              attempting  to  read  or  write  one  block  (512 bytes) of a
              message.  The returned RSX I/O error code  is  the  displayed
              status.

              ERROR 04 - The ACP received  a  bad  directive  status  while
              attempting  to  create  the  queue header region QUEHED.  The
              displayed status is the directive status.

              ERROR 05 - The ACP received  a  bad  directive  status  while
              attempting  to  create  the  address  window to map the queue
              header region QUEHED.  The displayed status is the  directive
              status.

              ERROR 06 - The queue header region QUEHED  has  been  created
              and mapped successfully.  The displayed status is the size of
              the region in 32 word blocks.
     ERROR CODES                                                   Page C-4
     ACP ERRORS                                               13 April 1988


              ERROR 07 - The header of the  queue  is  over  8K  bytes  and
              cannot,  therefore,  be  mapped by the ACP with one APR.  The
              size of the queue header must be reduced by  either  deleting
              an  appropriate  number of message ids or reducing the number
              of message blocks in the queue.  Deleting one message id will
              reduce the size of the header by 44 bytes.  Reducing the size
              of the queue by 16 message blocks will reduce the size of the
              header  by one word.  The displayed status is the size of the
              current queue header in 32 word blocks.

              ERROR 08 - The ACP received  a  bad  directive  status  while
              attempting  to  read the the queue header from the queue file
              MAQUEUE.DAT  into  the  queue  header  region  QUEHED.    The
              displayed status is the directive status.

              ERROR 09 - An I/O error occurred while the ACP was attempting
              to  read the the queue header from the queue file MAQUEUE.DAT
              into the queue header region QUEHED.  The  returned  RSX  I/O
              error code is the displayed status.

              ERROR 10 -  The  ACP  is  unable  to  close  the  queue  file
              MAQUEUE.DAT.   The  returned  FCS error code is the displayed
              status.

              ERROR 11 - The ACP received  a  bad  directive  status  while
              attempting  to  write  the queue header (in region QUEHED) to
              the queue file MAQUEUE.DAT.   The  displayed  status  is  the
              directive status.

              ERROR 12 - An I/O error occurred while the ACP was attempting
              to  write  the  queue  header (in region QUEHED) to the queue
              file MAQUEUE.DAT.  The returned RSX I/O  error  code  is  the
              displayed status.

              ERROR 13 -  The  end  of  the  queue  was  encountered  while
              deleting a type zero message when the type zero message count
              (M.NVC) was not equal to zero.  The virtual  address  of  the
              beginning  of  the  offending  message  id  listhead  is  the
              displayed status.  The message id name is also logged.

              ERROR 14 - The ACP received  a  bad  directive  status  while
              attempting  to  detach  from  the queue header region QUEHED.
              The displayed status is the directive status.

              ERROR 15 - The ACP has been aborted via an abort directive or
              a DCL or MCR command.  The status displayed is 'ABORT'.

              ERROR 16 - (FATAL) The ACP received a  bad  directive  status
              while  attempting  to  specify  an  AST  abort  routine.  The
              displayed status is the directive status.

              ERROR 17 - (FATAL) The ACP received a  bad  directive  status
              while  attempting  to  specify  an SST vector.  The displayed
              status is the directive status.
     ERROR CODES                                                   Page C-5
     ACP ERRORS                                               13 April 1988


              ERROR 18 - The ACP received  a  bad  directive  status  while
              attempting  to  read the first block of the queue header from
              the queue file MAQUEUE.DAT.  The  ACP  needs  information  in
              this  header block to calculate the size of the header region
              QUEHED.  The displayed status is the directive status.

              ERROR 19 - An I/O error occurred while the ACP was attempting
              to  read  the  first block of the queue header from the queue
              file MAQUEUE.DAT.  The ACP needs information in  this  header
              block to calculate the size of the header region QUEHED.  The
              returned RSX I/O error code is the displayed status.

              ERROR 99 - The ACP has been activated.  It will remain  in  a
              'wait  state'  until  it  receives  an I/O packet from the ZQ
              driver.  The status displayed is 'START'.

     ERROR CODES                                                   Page C-6
     ROUTER ERRORS                                            13 April 1988


     C.3  ROUTER ERRORS

     If the Router  terminates  abnormally  (ie.   an  SST  occurs)  during
     execution, the message

             hh:mm:ss  Task "RTRRSX" terminated
                       Task exit with outstanding I/O

     will most likely be printed.  A PMD (Postmortem Dump), RTRRSX.PMD,  is
     generated in LB0:[1,4].  This PMD may be useful in solving the problem
     and should be saved.

     The following errors are output to the console logger  by  the  Router
     task, RTRRSX.  Any error marked 'FATAL' will cause the Router to exit.
     No PMD is generated.  The format of the Router error message is:

        date time RTRRSX ROUTER ERROR: nn STATUS: nnn   mmm    node

                     where
                             date = current date in the form dd-mmm-yy
                             time = current time in the form hh:mm:ss
                               nn = error number
                              nnn = status
                              mmm = additional status information
                             node = a node name




              ERROR 01 - (FATAL) The Router received a bad directive status
              while  attempting  to  specify  an SST vector.  The displayed
              status is the directive status.

              ERROR 02 - (FATAL) The Router received a bad directive status
              while  attempting to attach to the queue header region QUEHED
              created by the ACP.  The displayed status  is  the  directive
              status.

              ERROR 03 - (FATAL) The Router received a bad directive status
              while  attempting  to  create  the  address window to map the
              queue header region QUEHED.   The  displayed  status  is  the
              directive status.

              ERROR 04 - The queue header region QUEHED has  been  attached
              and mapped successfully.  The displayed status is the size of
              the region in 32 word blocks.

              ERROR 05  -  (FATAL)  The  Routing  Database  RTRDBS  is  not
              consistent  with  the  database  linked  to  the Router.  The
              displayed status is the id of  the  database  linked  to  the
              Router.  Rebuild both the Router and the Routing Database.

              ERROR 06 - (FATAL) The Router received a bad directive status
              while  attempting  to  assign  a LUN for network access.  The
              displayed status is the directive status.
     ERROR CODES                                                   Page C-7
     ROUTER ERRORS                                            13 April 1988


              ERROR 07 - (FATAL) The Router received a bad directive status
              while  attempting  to specify the AST routine to handle AST's
              from the network.  The  displayed  status  is  the  directive
              status.

              ERROR 08 - (FATAL) An I/O error occurred while the Router was
              attempting  to  specify  the AST routine to handle AST's from
              the network.  The returned  DECNET  I/O  error  code  is  the
              displayed status.

              ERROR 09 - (FATAL) The Router received a bad directive status
              while  attempting  to  get  the  local node information.  The
              displayed status is the directive status.

              ERROR 10 - (FATAL) An I/O error occurred while the Router was
              attempting  to  get the local node information.  The returned
              DECNET I/O error code is the displayed status.

              ERROR 11 - (FATAL) An I/O error occurred while the Router was
              attempting  to assign a LUN for network access.  The returned
              DECNET I/O error code is the displayed status.

              ERROR 12 - The Router received a message in its network  data
              queue  that did not have a defined network message type.  The
              undefined type is the displayed status.

              ERROR 13 - (FATAL) The Router received a bad directive status
              while attempting to place a read but not acknowledged message
              at the front of its message id subqueue immediately  after  a
              logical  link  was  established.  The displayed status is the
              directive status.

              ERROR 14 - The  Router  has  successfully  connected  to  the
              network.   No status is displayed, but the local node name is
              printed.

              ERROR 15 - The Router rejected a logical link connect request
              from  a  remote node.  No status is displayed if an I/O error
              did not occur on the rejection.  The name of  the  node  that
              requested the connection is displayed.

              ERROR 16 -  An  I/O  error  occurred  while  the  Router  was
              attempting  to accept the logical link connect request from a
              remote node.  The DECNET I/O  error  code  is  the  displayed
              status.   The  name  of the node requesting the connection is
              also displayed.  A timer will be started so  that  a  connect
              with the node may be attempted later.

              ERROR 17 - The Router received a bad directive  status  while
              attempting  to accept the logical link connect request from a
              remote node.  The displayed status is the  directive  status.
              The  name  of  the  node  requesting  the  connection is also
              displayed.
     ERROR CODES                                                   Page C-8
     ROUTER ERRORS                                            13 April 1988


              ERROR 18 - The Router received a bad directive  status  while
              attempting  to  reject  a logical link connect request from a
              remote node.  The displayed status is the directive status.

              ERROR 19 - The Router received in its network data  queue  an
              interrupt message.

              ERROR 20 - The Router received in its network  data  queue  a
              user  disconnect  message.   No  status is displayed, but the
              name of the  node  whose  Router  issued  the  disconnect  is
              displayed.   A  timer  will be started so that a connect with
              the node may be attempted later.

              ERROR 21 - The Router received in its network  data  queue  a
              user  abort message.  No status is displayed, but the name of
              the node whose Router issued the abort is displayed.  A timer
              will  be  started  so  that  a  connect  with the node may be
              attempted later.

              ERROR 22 - The Router received in its network  data  queue  a
              network abort message.  The DECNET error code (see Appendix A
              of  the  DECnet-RSX   Programmer's   Reference   Manual)   is
              displayed.   The  name  of the node that had its logical link
              with this node aborted by the network is also  displayed.   A
              timer  will be started so that a connect with the node may be
              attempted later.

              ERROR 23 -  An  I/O  error  occurred  while  the  Router  was
              attempting  to  get  data  from  the network data queue.  The
              returned DECNET I/O error code is the displayed status.

              ERROR 24 - The Router received a request in its network  data
              queue  for a logical link connection to a node not defined in
              the Router Database RTRDBS.  The connect request is  rejected
              by  the  Router.  No status is displayed, but the name of the
              node requesting the connection is displayed.  To  accept  the
              connect  request,  define  the name of the requesting node in
              the database.  If the requesting node is  associated  with  a
              logical   node   name,   Program  FNDSRV  will  complete  the
              translation so that a connection may be attempted later.

              ERROR 25 - A logical link  connection  has  been  established
              between  the  Router  and  the  Router  on a remote node.  No
              status  is  displayed.   The  name  of  the  remote  node  is
              displayed.

              ERROR 26 - The Router was attempting to connect to a  message
              id  not  in the queue.  The message id must be defined in the
              queue before any messages written to the message id  subqueue
              can  be  routed to another node.  No status is displayed, but
              the offending message id is displayed.

              ERROR 27 - The Router received a bad directive  status  while
              attempting  to  post  a  read on a remote node.  This read is
              posted so that a message can be received over an  established
              logical link from the Router on a remote node.  The displayed
     ERROR CODES                                                   Page C-9
     ROUTER ERRORS                                            13 April 1988


              status is the directive status.  The name of the remote  node
              that  will  be  sending  the  message is also displayed.  The
              Router will disconnect the logical link if it is not  already
              disconnected.

              ERROR 28 -  An  I/O  error  occurred  while  the  Router  was
              attempting to receive (read) a message sent by a remote node.
              The returned DECNET I/O error code is the  displayed  status.
              The name of the node that sent the message is also displayed.
              The Router will disconnect the logical  link  if  it  is  not
              already disconnected.

              ERROR 29 - The link sequence number received  from  a  remote
              node  does  not  agree  with  the link sequence number in the
              database for this node.  This error usually occurs  when  the
              remote system is booted or a previously sent message is never
              received.  In any case, the  link  sequence  number  received
              from  the  remote is accepted as the new link sequence number
              by the Router.  The difference between the two link  sequence
              numbers  is  the  displayed  status.  The remote node name is
              also displayed.

              ERROR 30 - The Router received a bad directive  status  while
              attempting  to write a message received from a remote node to
              its message id subqueue on this node.  The  displayed  status
              is the directive status.  The name of the message id subqueue
              that the message was to be written to is also displayed.  The
              Router  will disconnect the logical link if it is not already
              disconnected.

              ERROR 31 - The Router received an invalid router message from
              the remote note.  This router message is the response sent by
              the remote node after it receives the message this node sent.
              The  only  valid message types sent in the router message are
              types -1,  -2,  and  -3.   Any  other  type  is  invalid  and
              displayed as the status.  The name of the remote node is also
              displayed.

              ERROR 32 - The RNA (read not acknowledged) id received from a
              remote  node  does  not match the id assigned when the Router
              read the message from a message id  subqueue  on  this  node.
              Unless  the  two  RNA ids match, the Router cannot delete the
              message from the subqueue,  thereby  acknowledging  that  the
              remote  node  received the message.  The RNA id received from
              the remote node is the displayed status.   The  name  of  the
              message  id  subqueue from which the message was read is also
              displayed.   This  error  will  cause  the   read   but   not
              acknowledged  message  to  remain  in the message id subqueue
              indefinitely.  All messages queued behind it will not be sent
              to  a  remote  node  until  this  message  is acknowledged or
              deleted; the QMT delete message function may be  used  to  do
              this.

              ERROR 33 - The Router received a bad directive  status  while
              attempting  to acknowledge a message that it sent to a remote
              node.   This  error  occurred  when  the  Router  received  a
     ERROR CODES                                                  Page C-10
     ROUTER ERRORS                                            13 April 1988


              response from the remote node indicating that the message was
              successfully queued on the remote node and can now be deleted
              completely  from  its  message id subqueue on this node.  The
              displayed status is the directive status.  The  name  of  the
              message  id  subqueue  from  which  the  message is now to be
              deleted is also displayed.  This error will  cause  the  read
              but  not  acknowledged  message  to  remain in the message id
              subqueue indefinitely.  All messages queued  behind  it  will
              not   be  sent  to  a  remote  node  until  this  message  is
              acknowledged or deleted; the QMT delete message function  may
              be used to do this.

              ERROR 34 - (FATAL) The Router received a bad directive status
              while  attempting  to  connect  to a message id in the queue.
              The displayed status is the directive status.

              ERROR 35 - (FATAL) An I/O error occurred while the Router was
              attempting  to  connect  to  a  message id in the queue.  The
              returned DRIVER/ACP I/O error code is the displayed status.

              ERROR 36 -  An  I/O  error  occurred  while  the  Router  was
              attempting to place a message, sent to a remote node, back at
              the front of its message id  subqueue  on  this  node.   This
              error  occurred  when the Router received a response from the
              remote node indicating that the remote could  not  queue  the
              message  it received from this node.  The returned DRIVER/ACP
              I/O error code is the displayed  status.   The  name  of  the
              message id subqueue is also displayed.  This error will cause
              the read but  not  acknowledged  message  to  remain  in  the
              message id subqueue indefinitely.  All messages queued behind
              it will not be sent to a remote node until  this  message  is
              requeued  or  deleted; the QMT delete message function may be
              used to delete the message and Program TSTACP may be used  to
              requeue the message.

              ERROR 37 -  An  I/O  error  occurred  while  the  Router  was
              attempting  to acknowledge a message that it sent to a remote
              node.   This  error  occurred  when  the  Router  received  a
              response from the remote node indicating that the message was
              successfully queued on the remote node and can now be deleted
              completely  from  its  message  subqueue  on  this node.  The
              returned DRIVER/ACP I/O error code is the  displayed  status.
              The  name of the message id subqueue is also displayed.  This
              error will cause the read but  not  acknowledged  message  to
              remain in the message id subqueue indefinitely.  All messages
              queued behind it will not be sent to a remote node until this
              message  is  acknowledged  or deleted; the QMT delete message
              function may be used to do this.

              ERROR 38 - The Router received a bad directive  status  while
              attempting  to  get  data  from  the network data queue.  The
              displayed status is the directive status.

              ERROR 39 -  An  I/O  error  occurred  while  the  Router  was
              attempting  to send a message to a remote node.  The returned
              DECNET I/O error code is the displayed  status.   The  remote
     ERROR CODES                                                  Page C-11
     ROUTER ERRORS                                            13 April 1988


              node  name is also displayed.  The Router will disconnect the
              logical link if it is not already disconnected.

              ERROR 40 - (FATAL) The  Router  was  unable  to  allocate  an
              output buffer (a buffer that holds a message after it is read
              from the queue and before it is sent to a remote  node)  when
              there  were  buffers available.  An IOT is executed so that a
              PMD can be generated.  No status is displayed.

              ERROR 41 - The Router received a bad directive  status  while
              attempting  to  read  a message from a message id subqueue so
              that it could be sent to a remote node.  The displayed status
              is the directive status.  The name of the message id subqueue
              from which the message  was  read  is  also  displayed.   The
              messages  in  this  message id subqueue will not be sent to a
              remote  node  until  the  Router  is  restarted  by  invoking
              STARTR.CMD.

              ERROR 42 -  An  I/O  error  occurred  while  the  Router  was
              attempting  to  read  a message from a message id subqueue so
              that it could  be  sent  to  a  remote  node.   The  returned
              DRIVER/ACP  I/O error code is the displayed status.  The name
              of the message id subqueue from which the message was read is
              also  displayed.   The  messages  in this message id subqueue
              will not be sent  to  a  remote  node  until  the  Router  is
              restarted by invoking STARTR.CMD.

              ERROR 43 - The Router received a bad directive  status  while
              attempting to send a message to a remote node.  The displayed
              status is the directive status.  The remote node name is also
              displayed.  The Router will disconnect the logical link if it
              is not already disconnected.

              ERROR 44 - The Router received a bad directive  status  while
              attempting to place a message, sent to a remote node, back at
              the front of its message id  subqueue  on  this  node.   This
              error  occurred  when the Router received a response from the
              remote node indicating that the remote could  not  queue  the
              message  it received from this node.  The displayed status is
              the directive status.  The name of the message id subqueue is
              also  displayed.   This  error  will  cause  the read but not
              acknowledged message to remain in  the  message  id  subqueue
              indefinitely.  All messages queued behind it will not be sent
              to a remote node until this message is requeued  or  deleted;
              the  QMT delete message function may be used to to delete the
              message and  Program  TSTACP  may  be  used  to  requeue  the
              message.

              ERROR 45 - The Router received a bad directive  status  while
              attempting  to  request  a  logical  link connection with the
              Router on the node displayed.  The displayed  status  is  the
              directive status.

              ERROR 46 - The Router failed to create a logical link (make a
              connection) with the node displayed.  The returned DECNET I/O
              error code is the displayed status.  If a  second  status  is
     ERROR CODES                                                  Page C-12
     ROUTER ERRORS                                            13 April 1988


              displayed,  see  Appendix  A  of  the DECnet-RSX Programmer's
              Reference Manual for its meaning.

              ERROR 47 -  An  I/O  error  occurred  while  the  Router  was
              attempting   to  send  a  response  to  the  remote  node  to
              acknowledge that it had received a message from  the  remote.
              The  returned  DECNET I/O error code is the displayed status.
              The name of the remote node is also  displayed.   The  Router
              will  disconnect  the  logical  link  if  it  is  not already
              disconnected.

              ERROR 48 - The Router received a bad directive  status  while
              attempting   to  send  a  response  to  the  remote  node  to
              acknowledge that it had received a message from  the  remote.
              The  displayed  status  is  the directive status.  The remote
              node name is also displayed.  The Router will disconnect  the
              logical link if it is not already disconnected.

              ERROR 49 - The Router received a bad directive  status  while
              attempting to issue a mark time.  The displayed status is the
              directive status.  The remote node name  or  the  message  id
              name  is  also  displayed.  The Router should be restarted by
              invoking STARTR.CMD since it could not start a timer to cause
              a later event to be performed.

              ERROR 50 - (FATAL) The Router received a bad directive status
              while attempting to set up the queue exit handler.  This exit
              handler (in the ACP) disconnects all of the subqueue  message
              ids  connected  to  the  Router  when  the Router exits.  The
              displayed status is the directive status.

              ERROR 51 - The Router received a bad directive  status  while
              attempting  to disconnect the logical link with the node that
              is displayed.  The displayed status is the directive status.

              ERROR 52 -  An  I/O  error  occurred  while  the  Router  was
              attempting  to disconnect the logical link with the node that
              is displayed.  The returned DECNET  I/O  error  code  is  the
              displayed status.

              ERROR 53 - The Router has disconnected successfully from  the
              node  that  is  displayed.  A timer will be started so that a
              connect with the node may be attempted later.  No  status  is
              displayed.

              ERROR 54 - (FATAL) The Routing Database was  not  initialized
              properly.   Before  the  Router  is  restarted,  the  Routing
              Database must be removed and reinstalled from  disk.   Invoke
              STARTR.CMD  to reinstall the database and restart the Router.
              No status is displayed when this error occurs.

              ERROR 55 - The Router received a bad directive  status  while
              attempting   to  run  Program  FNDSRV.   This  task  must  be
              installed to translate all logical node names to actual  node
              names.  The displayed status is the directive status.
     ERROR CODES                                                  Page C-13
     ROUTER ERRORS                                            13 April 1988


              ERROR 56 - The Router received a bad directive  status  while
              attempting  to  write  a connect/disconnect status message to
              the message id subqueue NET_STATUS.  The displayed status  is
              the  directive  status.   The  name of the node connecting or
              disconnecting is also displayed.

              ERROR 57 -  An  I/O  error  occurred  while  the  Router  was
              attempting to to write a connect/disconnect status message to
              the message id subqueue NET_STATUS.  The returned  DRIVER/ACP
              I/O error code is the displayed status.  The name of the node
              connecting or disconnecting is also displayed.  This  message
              id   subqueue   does   not   have  to  be  in  the  queue  if
              connect/disconnect messages do not have to  be  queued.   The
              resulting  'message  id  does  not  exist' error will only be
              logged once and can be ignored.

                                                               Page Index-1


                                     INDEX



     ACKQ Subroutine                       Defined, C-2
       Defined, 6-2                        Referenced, 5-4
       Referenced, 2-2                   IE.LCK
     ATCHQ Subroutine                      Defined, C-1
       Defined, 6-5                        Referenced, 5-3
       Referenced, 2-2                   IE.NBF
                                           Defined, C-2
     CLSMSG Task                         IE.NBK
       Defined, 7-2                        Defined, C-2
                                           Referenced, 6-26, 6-29
     DELQ Subroutine                     IE.NDR
       Defined, 6-7                        Defined, C-2
     DISCQ Subroutine                      Referenced, 6-26, 6-29
       Defined, 6-9                      IE.NFW
       Referenced, 2-2, 7-1                Defined, C-2
                                           Referenced, 5-3
     FNDSRV Task                         IE.NLK
       Defined, 4-3                        Defined, C-2
       Overview, 1-2                       Referenced, 6-21
       Referenced, 8-2, C-8, C-12        IE.NST
                                           Defined, C-2
     HDRDEF.TXT File                       Referenced, 6-21
       Referenced, 7-2                   IE.PNT
                                           Defined, C-2
     IE.ABO                                Referenced, 6-4
       Defined, C-1                      IE.PRI
     IE.CKS                                Defined, C-1
       Defined, C-1                      IE.RBG
     IE.CLO                                Defined, C-2
       Defined, C-2                      IE.RCN
     IE.DAO                                Defined, C-2
       Defined, C-1                      IE.SNC
       Referenced, 6-14, 6-17, 6-20        Defined, C-2
     IE.DNA                                Referenced, 6-4
       Defined, C-1                      IE.SPC
       Referenced, 5-3                     Defined, C-1
     IE.DUN                                Referenced, 5-3
       Defined, C-1                      IE.UKN
     IE.EOF                                Defined, C-2
       Defined, C-1                        Referenced, 6-4, 6-6, 6-8, 6-17,
       Referenced, 6-21                        6-20, 6-23, 6-26, 6-29
     IE.FOP                              IE.URJ
       Defined, C-2                        Defined, C-2
       Referenced, 6-21                    Referenced, 6-6, 6-8
     IE.IFC                              IE.WAT
       Defined, C-1                        Defined, C-1
       Referenced, 5-3                   IE.WLK
     IE.ILL                                Defined, C-1
       Defined, C-2                        Referenced, 5-3
       Referenced, 5-3                   INITQ Subroutine
     IE.IQU                                Defined, 6-11
                                                               Page Index-2


       Referenced, 2-2, 5-3, 7-1, C-1    READID Subroutine
                                           Defined, 6-15
     MA_ROUTER Process                   READQ Subroutine
       Referenced, 1-1 to 1-2, 4-1 to      Defined, 6-18
           4-3                             Referenced, 2-2
     MAQUEUE.DAT File                    REDQ Task
       Defined, 3-2                        Defined, 7-2
       Referenced, 1-2, 3-1, 8-2, C-3    RNAQ Subroutine
           to C-5                          Defined, 6-22
     MIDDEF.TXT File                     ROUTE Macro
       Referenced, 7-2                     Defined, 4-4
                                         RTRDBS Routing Database
     NODE Macro                            Defined, 4-2
       Defined, 4-3                        Referenced, 1-2, 4-1, 8-2, C-6,
     NRBDMP Task                               C-8
       Defined, 4-3                      RTRDEF Macro
       Overview, 1-2                       Defined, 4-3
       Referenced, 7-3, 8-2              RTRRSX Task
                                           Defined, 4-1
     QHDDEF.TXT File                       Overview, 1-2
       Referenced, 7-2                     Referenced, 2-3, 5-2, 8-2, C-6
     QMT Task
       Defined, 3-1                      TRACEQ Task
       Overview, 1-2                       Defined, 7-2
       Referenced, 2-1, 8-2, C-9 to      TSTACP Task
           C-11                            Defined, 7-2
     QUEACP Task                           Overview, 1-2
       Defined, 2-3                        Referenced, 8-2, C-10 to C-11
       Overview, 1-2
       Referenced, 2-1, 7-2, 8-2, C-1,   VAXQAD Subroutine
           C-3                             Define, 6-30
     QUEHED Region                       VAXQDD Subroutine
       Defined, 2-1                        Defined, 6-31
       Referenced, 4-2, C-3 to C-6
     QUELOG Task                         WRITEQ Subroutine
       Defined, 7-2                        Defined, 6-24
     QUEUE.MLB Library                     Referenced, 2-2, 6-28
       Referenced, 7-2                   WRTQ Task
     QUEUE.OLB Library                     Defined, 7-2
       Referenced, 7-2                   WRTRTR Subroutine
     QUEUEIDS.DAT File                     Defined, 6-27
       Defined, 3-2                      WTQUE Task
       Referenced, 1-2, 3-1, 7-2, 8-2      Defined, 7-1
      
     RAND Task
       Defined, 7-2                      ZQ Driver
     RDQUE Task                            Defined, 5-1
       Defined, 7-1                        Overview, 1-1
     READHD Subroutine                     Referenced, 2-1 to 2-2, 6-1,
       Defined, 6-13                           C-1
