User manual

Computer Gateway User Manual 4-111 5/96
4.10.2
4.10.2 Read LCN File
This request/response pair reads a single file and its attributes from a volume on an HM to
the host. Contiguous or linked files can be transferred.
Record size is affected by file type.
Contiguous files have a fixed record size of 256 bytes.
Linked files can have either a fixed or a variable record size.
- The record size common to all records of a fixed-length linked file is returned in
word 34 of the response message.
- The record size of each variable-length record is found in the first two bytes of the
record itself.
The maximum file data size in a single transmittal is 5760 words, thus several transmission
request/response pairs can be required to transfer a complete file. Partial files can be
transmitted, but a record or block is always complete within one transmission.
Files being read from the HM are opened for shared read. Since read operations can hold
up HM write operations, the recommended method when reading system files that are
periodically written to is to first copy the HM file locally to a user volume. The copy is
then read to the host. If a file write request is occurring on the LCN when a file read is
requested from the host, a busy abort is returned.
The reading of files from continuous history volumes and directories is prohibited while the
HM's online (HMO) personality is loaded. Reads are permitted to all volumes while the
HM's initialization (HMI) personality is loaded.
4.10.2.1 Read LCN File Request
Header information: Word 1—Transaction Code = 62
Word 2—Number of Words = 40
Word 5—CG Identifier = 2
Message format: Words 1..8—Reserved for future use
Word 9—Command type = 1
Word 10—File handling when file does not fit within maximum
transfer size: 1 = return partial file
2 = return abort error
3 = return full file - This option works
like option 1 except the CG/PLNM
expects the subsequent file transfer
requests to read the rest of the file.
The CG/PLNM will copy the file
into memory to speed up the reading
of the file.
Word 11—Reserved for response data
Word 12—Reserved for response data
Words 13..26—LCN pathname for the file (ASCII characters)
(PN:nn>vdir>filename.xx or NET>vdir>filename.xx)
Word 27—Number of records requested 0 = all
Word 28—Starting record requested