Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/certification/nft-fal-image-v2.mem
There are no other files named nft-fal-image-v2.mem in the archive.


+---------------+
! d i g i t a l !   I N T E R O F F I C E  M E M O R A N D U M
+---------------+

TO: DECNET-20 Users
                                       DATE:  May 15, 1980

                                       FROM:  NCSS

                                       LOC:   MR1-2/H22

                                       EXT:   HOTLINE (5911)


SUBJ:  TOPS-20 NFT/FAL Image mode file transfer notes



1.0  GENERAL NOTES

1.1  Image Mode File Transfer Is Unsupported

     The DECnet-20 SPD only specifies ASCII sequential  file
transfer.   However,  the  code exists to transfer all files
between  TOPS-20  systems,  and  some  non-ascii  files   to
non-TOPS-20  Digital systems.  This document describes those
unsupported features.



1.2  The TOPS-20 File System

     The understanding of image mode file transfer  requires
an  understanding  of  the  file systems of the two machines
involved in the transfer.  Each non-TOPS-20  section  begins
with an overview of that operating system's file system.

     The TOPS-20 file system stores data  in  units  of  512
36-bit  words,  called pages.  Descriptive information about
the file is stored in a special  "header"  page  called  the
File  Descriptor Block (FDB).  Record formats and attributes
are not stored in the FDB!  Only the programs  which  access
the  file  know  whether  the  record  format  is undefined,
stream,  fixed,  variable,  VFC,  or  etc.   Only  accessing
programs  know  whether the items in a record are characters
(sixbit, ASCII, ebcdic, etc.) or fixed or floating numbers.

     The following information is however, kept in the  FDB:
BYTE SIZE and LENGTH IN BYTES.  This lack of knowledge about
the  file's  format  makes  heterogeneous   non-ASCII   file
transfer very complex.  When you read the NFT chapter of the
DECnet-20 manual you may notice that there are file switches
for  TOPS-20  files such as /VAR and /MACY11.  Most of these
formats are not native to TOPS-20, nor are they produced  or
read  by any TOPS-20 utility.  Following is a description of
TOPS-20 NFT/FAL Image mode file transfer notes (DECnet-20 V2.0)Page 2


each of these file formats  (except  for  /MACY11/IMAGE  for
which we cannot determine a use).  These descriptions should
allow you to design your data transfer  techniques  to  take
full advantage of the file transfer capabilities of DECnet.



1.2.1  TOPS-20 MACY11 File Format (/MACY11) - 

     The MACY11 file format is the format  of  object  files
produced  by  the  MACY11  and  DNMAC  cross assemblers.  An
object file produced by MACY11 can be copied to an RSX11M or
VMS system, task built, and run successfully.

     A  MACY11  file  is  a  36-bit  or  18-bit  byte   file
containing  variable length records of the following format.
Four bytes are stored in each 36-bit word:

[<2 ZERO BITS><BYTE 2><BYTE  1><2  ZERO  BITS><BYTE  4><BYTE
3>].

Each record looks like this:
Byte 0  <1>     sync byte
Byte 1 <0>      null follows sync
Byte 2 <cnt>    low order of (length of "Data" in bytes)+4=[n]
Byte 3 <cnt>    high order of (length of "Data in bytes)+4=[n]
Byte 4  <data>
Byte n          (last byte of "Data")
Byte n+1        Checksum byte (Two's complement add with carry ignored)
                Checksum includes all bytes in record including header

6 Nulls followed by next record (The nulls are ignored)



1.2.2  TOPS-20 Variable Length Record File Format (/VARIABLE:n) - 

     A TOPS-20 variable length file suitable for transfer to
or  from  a  VMS or RSX11M type file system is an 8-bit byte
file consisting of a sequence of variable length 8-bit  byte
records.   The  first  two  bytes of each record contain the
byte count of the data in the remainder of the  record  (Low
order  byte  first, high order byte second).  Four bytes are
stored in each 36-bit word as follows:

[<BYTE 1><BYTE 2><BYTE 3><BYTE 4><4 ZERO BITS>]



1.2.3  TOPS-20 MACY11 Variable Length Record File Format (/MACY11/VAR:n) - 

     A TOPS-20 MACY11 variable length file is  a  36-bit  or
18-bit byte file consisting of a sequence of variable length
8-bit byte records where each record starts  on  a  word  or
half  word  boundary  and the first two bytes of each record
TOPS-20 NFT/FAL Image mode file transfer notes (DECnet-20 V2.0)Page 3


contain the count of  the  data  in  the  remainder  of  the
record.   The  count  is  stored  low order byte first, high
order byte second.  Four bytes are  stored  in  each  36-bit
word as follows:

[<2 ZERO BITS><BYTE 2><BYTE 1><2 ZERO BITS><BYTE 4><BYTE 3>]



1.2.4  TOPS-20 MACY11 Fixed Length Record File Format (/MACY11/FIX:n) - 

     A TOPS-20 MACY11 fixed length record file is  a  36-bit
or  18-bit byte file consisting of a sequence of 8-bit bytes
stored in 36-bit words where the length of  each  record  is
arbitrary  (remember  that TOPS-20 does not store the record
length anywhere!).  This is the format of task files  (.TSK)
produced  by  TKB20  (the fixed record size must be 512).  A
task file produced by TKB20 can  be  copied  by  NFT  to  an
RSX11M  system  and  run  provided  that  PIP is used on the
RSX11M system to make the copied task file contiguous.

     If the last record is  only  a  record  fragment,  then
different  target systems may act differently.  Refer to the
discussion for each target system.  Four bytes are stored in
each 36-bit word as follows:

[<2 ZERO BITS><BYTE 2><BYTE 1><2 ZERO BITS><BYTE 4><BYTE 3>]



1.2.5  TOPS-20 Fixed Length Record File Format (/FIX:n) - 

     A TOPS-20 fixed length file suitable for transfer to or
from  a VMS or RSX11M type file system is an 8-bit byte file
consisting of a sequence of 8-bit bytes.  Since TOPS-20 does
not  store  the record size in the FDB, it can be considered
to be any length.  If the  last  record  is  only  a  record
fragment, then different target systems may act differently.
Please refer to the section for each  target  system.   Four
bytes are stored in each 36-bit word as follows:

[<BYTE 0><BYTE 1><BYTE 2><BYTE 3><4 ZERO BITS>]



1.3  Undocumented DAPLIB Features

     NFT and FAL on TOPS-20 share a common  module,  DAPLIB.
DAPLIB  provides  code  which implements DNA's DAP protocol.
The following items are undocumented features of DAPLIB.
TOPS-20 NFT/FAL Image mode file transfer notes (DECnet-20 V2.0)Page 4


1.3.1  Files Return As They Were Sent - 

     No matter what switches are used, if a file  is  copied
back  to  a TOPS-20 system using the same switches as it was
sent with, the file will be in the same format with no  data
added  or  lost.   This  rule may not seem important, but it
implies that NFT/FAL must always know the format of a  file,
either  from  switches  or  from  file  header  information.
Certain file transfers and transformations  cannot  be  done
because they violate this rule.



1.3.2  Supported Devices - 

     When using NFT on a TOPS-20 system, the local file  can
be  on  any  of  the following devices:  DSK, LPT, CDP, CDR,
PLT, MTA, TTY, and NUL.



1.3.3  ASCII Break Characters - 

     The following ASCII characters serve as logical  record
delimiters  whenever NFT/FAL must isolate logical records in
a TOPS-20 stream ASCII file:  ESC, Z, DC1-DC4, DLE, FF,  VT,
LF.



1.3.4  NFT Mode Defaults - 

     When NFT acts as the active task  to  send  files,  the
default  mode  for  reading  files is /IMAGE unless the byte
size is 7 or 36 in which case it is /ASCII.  If  the  remote
file  has  no  file  attribute  switches, it will be created
using the mode of the input file.  If  this  fails  and  the
attempted mode was /ASCII, then /ASCII/VARIABLE will also be
attempted.



1.3.5  NFT File Specification Defaults - 

     The default TOPS-20 local file spec device is PS:.  The
default  local  file  spec directory is <current-user>.  The
default remote file spec directory or UIC is  obtained  from
the  access  control information.  The default extension for
submitted files is CTL on TOPS-20 systems.  If the byte size
of  the file to be submitted is not 7 or 36, the submit will
fail.
TOPS-20 NFT/FAL Image mode file transfer notes (DECnet-20 V2.0)Page 5


1.3.6  FAL Mode Defaults - 

     When the TOPS-20  FAL  creates  a  file,  an  error  is
returned  if  the mode is not native to TOPS-20.  Image mode
with no byte size specified defaults to 8-bit bytes.   Image
mode  with byte size 0 defaults to 36-bit bytes.  ASCII mode
always defaults the byte size to 7.

     When the TOPS-20 FAL reads a  file,  a  nonnative  file
access  mode causes FAL to open the file in image mode using
the file's actual byte size.  If a native file  access  mode
is  sent, the byte size required by that mode is used except
for image.  If image mode is  requested  and  byte  size  is
null,  use  the  files  actual  byte  size.   The attributes
returned by FAL always reflect the  byte  size  used  during
OPEN, which may not be the same as the byte size in the FDB.



1.3.7  NFT/FAL Debugging Technique - 

     When debugging NFT you can request  a  trace  of  NFT's
message  traffic  by inserting the primary output designator
at DAPIB+1.
TOPS-20 NFT/FAL Image mode file transfer notes (DECnet-20 V2.0)Page 6


2.0  TOPS-20 IMAGE MODE FILE TRANSFER

     If both nodes in a transfer are TOPS-20 nodes,  and  no
file  attribute switches are specified, and both devices are
disk, then the file is transferred in a page by  page  mode.
This  mode preserves holes in files and sends the entire FDB
insuring that no inappropriate  transformations  have  taken
place.  This mode also generates the least overhead by doing
disk IO with PMAPs.  This mode is suggested for all 20 -  20
transfers.



3.0  VMS IMAGE MODE FILE TRANSFER (DECNET VAX V1.2)

     Image mode file transfers to and from VMS  systems  are
identical to image mode transfers to and from RSX11M systems
except for the handling of short records at  the  end  of  a
TOPS-20  fixed  format  file which is being transferred to a
remote node.  If an RSX11M system sees an end of file before
the   end  of  the  last  fixed  length  record  (/FIXED  or
/MACY11/FIXED) it will fill the record to its  correct  size
with  junk bytes.  A VMS system will cause the file transfer
to fail by sending a ?Wrong length record error message.  In
order to transfer fixed length files from TOPS-20 to VMS one
must either specify a record  length  which  divides  evenly
into  the file size, or extend the file to the proper length
for the record size desired.



4.0  RSX11M PHASE III IMAGE MODE FILE TRANSFER (DECNET/M V3.0)

     Files on RSX11M systems are  stored  in  units  of  512
8-bit  bytes.   Each  file  has associated with it a special
"header" record which contains descriptive information about
the  file.   This  header, unlike TOPS-20 FDBs, contains the
record format (undefined, fixed, variable, or variable  with
fixed  control),  record attributes (such as implied CRLF or
FORTRAN carriage control  for  ASCII  files),  size  of  the
largest  record,  and  size of the file in bytes.  Note that
like TOPS-20, the meaning of  each  byte  (ASCII  character,
EBCDIC  character,  half  of  a  fixed integer, etc.) is not
defined in the file header.

     All fixed and variable length  records  are  stored  on
word  boundaries.   If  a  byte must be skipped to begin the
next record on a word boundary, then the  contents  of  that
byte  is  indeterminate.   Keep  this  in mind when choosing
fixed length record sizes.  If you choose an odd  size,  one
byte  per  record  will  be filler in the RSX11M file.  Note
that this word alignment is only used on the TOPS-20  system
for  /MACY11/VAR  files.   All other TOPS-20 file formats do
not PDP-11 word  align!   The  cooperating  NFT/FALs  always
insure that the transformations are done correctly.
TOPS-20 NFT/FAL Image mode file transfer notes (DECnet-20 V2.0)Page 7


     Whenever a fixed length record is copied from a TOPS-20
node  to an RSX11M node, if the last record is only a record
fragment, then the last record will be filled  to  become  a
full  record.   The  bytes  used  to  fill  the  record  are
indeterminate.



4.1  Using RSX11M's NFT

     Non-ASCII mode files cannot be  transferred  in  either
direction  using  RSX11M's  NFT.   However, since image mode
files can be transferred in both directions using  TOPS-20's
NFT, an RSX11M user could transfer image files by creating a
TOPS-20 batch control file, transferring it to  the  TOPS-20
node  and  executing it.  This control file could run NFT on
the  TOPS-20  node  to  cause  the  needed   files   to   be
transferred.



4.2  Using TOPS-20's NFT

     A number of different image mode file  formats  can  be
processed  by  NFT.  Refer to the general notes given in the
preceding section for a description of the format  of  image
mode files in a TOPS-20 system.



4.2.1  An Arbitrary Stream Of 8-bit Bytes. - 

     An arbitrary stream of 8-bit bytes can be viewed  as  a
collection   of  fixed  length  records  of  length  1  byte
(actually any record length is acceptable if it can be  used
on the 11M side).  To copy such a TOPS-20 file (BYTE-SIZE=8,
FORMAT=FIXED) to an RSX11M file (F.RTYP=R.FIX, F.RATT=0) use
the NFT command:

     COPY filename/IMAGE/FIX:n (TO) filename/IMAGE/FIX:n


     An RSX11M fixed length  file  (F.RTYP=R.FIX,  F.RATT=0)
can  be copied to a TOPS-20 file (BYTE-SIZE=8, FORMAT=FIXED)
using the NFT command:

     COPY filename/IMAGE/FIX:n (TO) filename/IMAGE
TOPS-20 NFT/FAL Image mode file transfer notes (DECnet-20 V2.0)Page 8


4.2.2  8-bit Byte Variable Length Records. - 

     A  TOPS-20  file  containing  variable  length  records
(BYTE-SIZE=8,  FORMAT=VARIABLE)  can  be copied to an RSX11M
file (F.RTYP=R.VAR, F.RATT=0) using the NFT command:

     COPY filename/IMAGE/VAR:n (TO) filename/IMAGE/VAR:n


     An RSX11M file (F.RTYP=R.VAR, F.RATT=0) can  be  copied
to  a  TOPS-20 file (BYTE-SIZE=8, FORMAT=VARIABLE) using the
NFT command:

     COPY filename/IMAGE/VAR:n (TO) filename/IMAGE/VAR:n




4.2.3  MACY11 Or DNMAC Object File - 

     An object file produced by MACY11 or DNMAC on a TOPS-20
system  (BYTE-SIZE=36,  FORMAT=MACY11)  can  be copied to an
RSX11M file (F.RTYP=R.VAR, F.RATT=0) using the NFT command:

     COPY filename/MACY11 (TO) filename/IMAGE/VAR:512


     An RSX11M object file (F.RTYP=R.VAR, F.RATT=0)  can  be
copied  to  a  TOPS-20  MACY11  format  file  (BYTE-SIZE=36,
FORMAT=MACY11) using the NFT command:

     COPY filename/IMAGE/VAR:n (TO) filename/MACY11




4.2.4  MACY11 Variable Length Record File - 

     A  TOPS-20   MACY11   variable   length   record   file
(BYTE-SIZE=36, FORMAT=MACY11/VAR) can be copied to an RSX11M
variable length record file (F.RTYP=R.VAR,  F.RATT=0)  using
the NFT command:

     COPY filename/MACY11/VAR:n (TO) filename/VAR:n


     An RSX11M variable length  record  file  (F.RTYP=R.VAR,
F.RATT=0)  can be copied to a TOPS-20 MACY11 variable length
record file (BYTE-SIZE=36, FORMAT=MACY11/VAR) using the  NFT
command:

     COPY filename/VAR:n (TO) filename/MACY11/VAR:n
TOPS-20 NFT/FAL Image mode file transfer notes (DECnet-20 V2.0)Page 9


4.2.5  MACY11 Fixed Length Record File - 

     A   TOPS-20   MACY11   fixed   length    record    file
(BYTE-SIZE=36, FORMAT=MACY11/FIX) can be copied to an RSX11M
fixed length record file (F.RTYP=R.FIX, F.RATT=0) using  the
NFT command:

     COPY filename/MACY11/FIX:n (TO) filename/FIX:n


     An  RSX11M  fixed  length  record  file  (F.RTYP=R.FIX,
F.RATT=0)  can  be  copied  to a TOPS-20 MACY11 fixed length
record file (BYTE-SIZE=36, FORMAT=MACY11/FIX) using the  NFT
command:

     COPY filename/FIX:n (TO) filename/MACY11/FIX:n




5.0  RSX-11M PHASE II IMAGE MODE FILE TRANSFER

     The SDC-released Phase II implementations of NFT/FAL on
RSX11Mwill not communicate with TOPS-20.  It may be possible
to develop patches which fix the problems but  we  have  not
tested with a system which had these patches installed.



6.0  RSTS IMAGE MODE FILE TRANSFER

     No tests have yet been done to test  RSTS  -  20  image
mode file transfers.



7.0  RT IMAGE MODE FILE TRANSFER

     No tests have yet been done to test RT - 20 image  mode
file transfer.



8.0  IAS IMAGE MODE FILE TRANSFER

     No tests have yet been done to test IAS - 20 image mode
file transfer.