.he 'ZTP'Dec 1978'ZTP'
.fo ''- % -''
.ce 3
ZTP
or How To Read UNIX Tapes On CDC-SCOPE
(without black magic)
.sp 3
PREREQUISITION
.in +5
The described package is designed for an installation running
UNIX without magtapes, which has a connection to a CDC 6400 or CYBER,
running SCOPE (or NOS) with its Record Manager.
The connection should enable the users to submit UNIX files as jobs
for SCOPE, and receive the jobs' output into files. (The HUJI system
uses a UT-200 emulation on DU-11, which uses UNIX files as pseudo
card reader and line printer).
.sp 1
.ti -5
HOW TO START
.br
SCOPE enables reading stranger tapes, defined by
.ti +5
REQUEST(T,S,NT)
.br
Each block on the tape will now be a standard SCOPE record on file T; the
files on the tape (marked by EOF) will be standard SCOPE files,
recognized by programs such as COPYBR & COPYBF.
.br
We found it convenient to copy the whole tape (by COPYBF) and
catalog it as a permanent file; however, it is possible to deal
directly with the tape
if cataloging is not possible.
.sp 1
.ti -5
READING FILES
.br
The first step is to read the tape's directory, by COPYBRing
its first 63 blocks, dump it on output by one of the
methods described below, transfer it to UNIX and undump.
 To list contents, simply link it to
/dev/mt0 and use 'tp'.
.br
Using the directory, 'ztp' will issue a SCOPE job to copy a given
UNIX file off the tape and dump it on output, to be transferred
to UNIX and be deciphered.
.sp 1
.ti -5
DUMPING
.br
Since the CYBER words are 60 bits long, containing 6-bit characters,
each block will be read as 69 words containing 683 chars.
There are 3 method to dump raw data to output:
.br
1)
.ix +3
Hexadecimal - each 60 bit word was dumped as 15 hex digits,
combined upon deciphering pairwise into 8-bit bytes.
This method is simple to decipher, even manually if necessary.
(see HDUMP).
.in -3
2)
.ix +3
SCOPE character - each 6-bit character is dumped literally onto output.
(Except the null char, which is escaped, since it serves as EOL at
SCOPE). This method is preferred as it requires shorter transfer
time.
(see CHDMP).
.in -3
3)
.ix +3
Conversion - each byte is translated from ascii to the parallel SCOPE
character. This program recognizes newlines,tabs and backspaces, and is
used to print ascii files directly on the CYBER.
(see CONV).
.in -3
.sp 1
.ti -5
ARCHIVES
.br
Limited archive facility is available by the ARCX program which reads
a file name, looks for it in an archive file that was copied off
the tape, and outputs the given file as if it was copied off the
tape, to be dumped later.
 This program enables transferring single files where whole
archives will be too large to be transfered.
.sp 1
.ti -5
PROGRAMS
.br
These are the available programs. Names in capitals are of programs
stored and run on the CYBER.
.ti -5
ztp - parameters: [-] file [file1]
.br
where: "file" is the name of a
file to be copied off the tape, "file1" - a file to be extracted
from "file" if it is an archive, '-' to indicate use of "conv" to
dump the file instead of the standard "chdmp".
.br
input: the tape directory on file "dir".
.br
output: a job to copy the file from the tape (as cataloged),which
looks like this (comments are not part of the job):
.in +5
.nf
taaa,t15,cm40000,ms500,io100.skip-copy
taaa,809910,comp
attach(u,unix3,id=cs)
/* could be "request" for direct tape reading */
skipf(u,2774,0)
copybr(u,tmp,145)
rewind(tmp)
map(off)
/* next 4 lines are optional for archives */
attach,arcx,id=cs.
/* write file name in hex on "name" */
l,name.77686F2E63000000000000000000
arcx(name,tmp,tmp1)
rewind(tmp1)
/* l=0 to avoid line limit */
route(unx,dc=pr,def,l=0,tid=sc)
/* '-' option changes "chdmp" to "conv" */
attach(chdmp,id=cs)
chdmp(tmp1,unx)
.fi
.in -5
The output of this job will contain diagnostics of "chdmp" or "conv"
and (optionally) "arcx". The routed job will contain dumped output.
.ti -5
HDUMP,CHDMP,CONV - parameters: tape1,tape2,output. (default for 3 file names)
.br
input: file to be dumped in raw block mode, from tape1.
.br
output: dumped file in hex,SCOPE chars dump, or ascii conversion
(respectively) on tape2; no. of
lines dumped is printed on output.
.ti -5
ARCX - parameters: input,tape1,tape2,output. (default for 4 file names)
.br
input: archive file in raw block mode from tape1; name of
file to be extracted, in hex, null padded to 14 bytes, from input.
.br
output: extracted file (if found) in raw block mode on tape2;
length in bytes (as read from files headers) of all files encountered
in the archive, up to and including the extracted file, is printed on output.
.ti -5
undmp - parameter: n - length in bytes of file to be undumped.
(usually taken from the tape directory's list).
.br
input: output of "chdmp" in upper or lower case, optionally preceded
by empty lines, from std. input.
.br
output: undumped file on file "out".
.ti -5
zh2b - The same as "undmp" for the output of "hdump" (upper case),
with optional parameters n1,n2... for undumping several files whose
output will be left on "out1","out2"... respectively.
