@0
This program will help you build and execute a tape drive command.
  You don't have to be an expert in the command notation to use this program.
  I will build the command by asking you a series of questions.
  After we construct the command you will have a chance to study it,
 add options to it if you wish, and then request that I execute the command,
 start over, or quit.  I will not execute the tape command until you tell
 me to do so.   (Note that this MENU program does not provide access to all
 of the command options).   Also note that you may use the computer's function
 keys to access some of the tape drive utility programs:   F2 will call the
 SHOW program which is used to look at existing tape contents or to move to a
 specific file or block;   F3 allows you to move the tape to a specific
 file;   F4 rewinds the tape.

@1
Answering the question below with a 'W' will write disk files onto tape.
  Answering with an 'R' will read tape files and copy them onto disk.
  I will ask you questions after this to determine which tape drive program
 to use, which files to write or read, and which command options we might want
 to put into effect.  Please note that I will NOT read or write onto the tape
 until we finish building a tape command and you have a chance to review it.
  Press the 'Esc' key if you want to quit.

@2
We are going to write one or more disk files out to the tape.  I now need to
 know whether you want to make a 'backup' copy of the disk or you want to
 copy an existing disk file, or files, to tape in 'exchange format'.
  Backup copies usually are made either to safeguard the contents of
 your disk files, or to move disk files to other DOS-based microcomputers.
  Some form of exchange format, on the other hand, usually is required if you
 want to write files onto tape that will be read by a mini or mainframe
 computer.

@3
We are going to read one or more files from the tape and copy them to disk.
  I now need to know whether you want to read and load files from a 'backup'
 tape or you want to read one or more files from an 'exchange format' tape.
   If you are reloading disk files from a 'backup' tape, that tape must have
 been created by the 'SAVE' program in this software package.   Exchange tape
 files usually have been created by a mini or mainframe computer.

@4
I need to know which disk drive you want to use to write the file(s) we copy
 from tape.  Disk drives are identified by single letters of the alphabet.
  The 'A' and 'B' disks usually are floppy drives on most computer systems.
  'C' and 'D' usually are hard disk drives, if they exist.  Sometimes the
 'D' drive, or 'E' drive, is a remote disk accessed through a 'local
 area network'.   Most computers don't have all of these drives attached.
  The question below shows the drive letter of the current default disk
 drive.  Answer 'Y' if you want to use that drive.

@5
I need to know from which disk drive you want to copy file(s) to tape.
  Disk drives are identified by single letters of the alphabet.  The 'A' and
 'B' disks usually are floppy drives on most computer systems.   'C' and 'D'
 usually are hard disk drives, if they exist.  Sometimes the 'D' drive, or 'E'
 drive, is a remote disk accessed through a 'local area network'.   Most
 computers don't have all of these drives attached.  The question below shows
 the drive letter of the current default disk drive.  Answer 'Y' if you want
 to use that drive.

@6
Disk drives are identified by single letters of the alphabet.  The 'A' and
 'B' disks usually are floppy drives on most computer systems.   'C' and 'D'
 usually are hard disk drives, if they exist.  Sometimes the 'D' drive, or 'E'
 drive, is a remote disk accessed through a 'local area network'.  Please type
 a single letter representing the disk drive you want to use.

@7
Answering the question below with a 'Y' will create a SAVE command that can
 be used to backup ALL files from the selected disk drive onto tape.  If you
 want to backup less than the whole disk drive then reply to the question
 with 'N'.

@8
Disks drives can be divided into one or more 'subdirectories'.   Each
 subdirectory can contain one or more files.  The main directory is denoted
 by a the backslash (\) character.  A subdirectory one level down from the
 main directory named SOMEDIR would be specified as \SOMEDIR.  A subdirectory
 of SOMEDIR (named MYDIR in this example), two levels down from the main
 directory, would be specified as \SOMEDIR\MYDIR.  I need to know into which
 disk directory or subdirectory you want to start the copying of file(s) from
 tape.  Answer 'Y' if you want to use the directory shown below.

@9
Disks drives can be divided into one or more 'subdirectories'.  Each
 subdirectory can contain one or more files.  The main directory is denoted
 by a the backslash (\) character.  A subdirectory one level down from the
 main directory named SOMEDIR would be specified as \SOMEDIR.  A subdirectory
 of SOMEDIR (named MYDIR in this example), two levels down from the main
 directory, would be specified as \SOMEDIR\MYDIR.  I need to know from which
 disk directory or subdirectory you want to start the copying of file(s) to
 tape.  Answer 'Y' if you want to use the directory shown below.

@10
Disks drives can be divided into one or more 'subdirectories'.  Each
 subdirectory can contain one or more files.  The main directory is denoted
 by a the backslash (\) character.  A subdirectory one level down from the
 main directory named SOMEDIR would be specified as \SOMEDIR.  A subdirectory
 of SOMEDIR (named MYDIR in this example), two levels down from the main
 directory, would be specified as \SOMEDIR\MYDIR.   If you answer the
 question below with a ?, then I will look at the disk and show you all of
 the directory names that currently exist.

@11
The directory or file name shown below contains a character that the DOS
 operating system does not allow to appear in disk directory or file names.

@12
The disk directory name shown below cannot be found on the specified disk
 drive.  If you press a key, I will next ask if I can show you all of the
 directory names that are on this disk.  From the list presented you may
 then select the appropriate directory where the copying of files will begin.

@13
If you answer 'Y' to the question below, I will show you all of the directory
 names that are on this disk.  From the list presented you may then select
 the appropriate directory where the copying of files will begin.

@14
Do you wish to begin the copying of files with the disk directory shown
 below ?

@15
I need to know to which disk file(s) you want to copy the tape file(s).  I
 will copy the file(s) to which the tape drive is currently positioned.
  FILE16 and LETTERS.TXT are examples of legitimate disk file names.  You
 may copy more than one file to disk by specifying more than one name.
  Multiple names are separated by a space.  An example of multiple names,
 in which 3 files would be copied from tape, is FILE1  FILE2  PROG.BAK.
  You also may use FILE###, for example, as a single file name.  This would
 copy multiple files from tape and generate a sequence of files on disk named
 FILE001, FILE002, etc.   Please don't use * or ? wildcard characters in
 the file name.  Using wildcard characters with COPYIN can be done in
 special situations (when the tape is 'labeled') but this MENU program
 cannot handle those situations.

@16
I need to know the name(s) of the disk file(s) involved in this copy.
  An example of a disk file name is DOCFILE or LETTERS.TXT.  You may use
 * and ? 'wildcard' characters in the file name(s).  For example,
 *.TXT would mean copy all of the files with the suffix '.TXT'.
   *.* would mean copy all files.  Multiple file names may be specified,
 separated by a space.  For example,  *.PAS  P3*.*  would mean copy all
 files with '.PAS' as a file name suffix plus all files which had 'P3'
 as the first 2 letters of their file name.  You may use 'file name
 expressions' using + and - operators.  For example,  *.* - *.COM  would
 mean copy all files except .COM files.   *.TXT + *.EXE - MYPROG.EXE  would
 mean copy all .TXT files and all .EXE files except MYPROG.EXE.  The + and -
 operators in file name expressions must be preceded and followed by a space.

@17
COPYIN can use *,? wildcard file name characters but their use is
 complicated enough that this MENU program cannot help you select
 the right combinations of command options.  For example,
 if the input tape is unlabeled then there are no file names
 on the tape, so there is nothing on which COPYIN can 'name match' against
 the wildcard file names.  If the tape is labeled and has file names, it is
 not always a straightforward matter to use the names from the tape labels.
  The tape labels probably were created by a mini or mainframe computer
 that does not produce DOS compatible file names.  COPYIN has several
 options governing this unfortunately complicated situation.
  I'm sorry that I can't be of more help with this particular problem but
 you can get much more information by reading the COPYIN documentation.
  Look for the COPYIN /L/N/H/T options.

@18
@19
Because you specified a file name with * or ? wildcard characters, more
 than one file may be copied by this command.  The question now is
 whether you want to restrict the wildcard name matching to the disk
 directory specified or do you also want to include subdirectories of the
 specified directory in the copy process ?

@20
Some tapes are recorded with internationally standardized blocks called
 label blocks.  Almost all mini and mainframe computer systems can read
 and write labeled tapes.  Labels contain information such as the tape
 reel identification, file names, block sizes, record sizes and formats,
 and the date of creation of the tape file.  COPYIN can recognize
 and process the information from labeled tapes.  If the input tape is
 labeled you must tell me so that I do not read the label blocks as if
 they were data.  If you are unsure whether the tape is labeled you can
 look at the first few blocks with the SHOW program.  If the first few
 blocks are 80 to 90 bytes long and begin with 'VOL1', 'HDR1', or
 'HDR2' then the tape is labeled.  The labels might be recorded in
 EBCDIC rather than ASCII so you may have to tell SHOW to translate
 them for you.

@21
You can write tapes with standardized label blocks that
 are recognized by almost all mini and mainframe computer systems.  Labels
 contain information such as the tape reel identification, file names, block
 sizes, record sizes and formats, and the date of creation of the tape file.
  The purpose of labeling is to identify and protect the tapes, particularly
 in a mini or mainframe computer environment.  COPYOUT can produce labeled
 tapes for you if you wish.  COPYOUT's tape labeling simultaneously conforms
 to standards set by IBM, by ANSI (the American National Standards Institute),
 and by ISO (the International Standards Organization).  You may have to
 determine the tape labeling capabilities of the mini or mainframe computer
 to which you might be sending this tape.

@22
You have elected to write labels on the tape.  The label blocks may be
 recorded in the ASCII character set or they may be recorded in the older
 EBCDIC character set.  Some older IBM computer systems require that the
 tape labels be in EBCDIC, even if the data on the tape is in ASCII.
  If you are writing tapes to be read on a mini or mainframe computer
 system you will have to determine the tape labeling requirements of the
 operating system running on that computer.

@23
If the data on the tape is in the EBCDIC character set you probably will
 want to convert it to ASCII as you copy it to disk.  EBCDIC is an older
 character set representation.  Virtually all microcomputer systems expect
 that the data on disk be in the more modern ASCII character set.
  Of course, if the tape is already in ASCII, or if you want to copy
 binary information straight from tape to disk, then answer the question
 below with a 'N' reply and no character set translation will be done.

@24
It is almost certain that the data on DISK is in the ASCII character set
 because that is the standard for microcomputers.   Tapes, on the other
 hand, are sometimes recorded in EBCDIC to satisfy the requirements of
 older IBM mainframe computers.  If the tape is to be recorded in the
 older EBCDIC character set representation, then it will have to be
 converted as the file(s) are copied from disk to tape.  Of course,
 if you want the data on tape to be in the more modern ASCII standard
 character set, or if you are copying binary information straight from
 disk to tape, then answer the question below with a 'N' reply and no
 character set translation will be done.

@25
Block level I/O means that blocks of data are transferred between the
 disk and tape drive without looking inside the blocks.  A straight data
 transfer is performed and, therefore, no requirements are imposed on the
 format of the data.  Record level I/O, on the other hand, means that the
 tape copy program will look at records within blocks.  You usually will
 want to do record level I/O because the format of records within blocks
 on tape often is different than the representation of records on the
 disk.  Record level I/O will do the necessary reformatting of the records
 during the copy process.

@26
This question asks about the record length on TAPE.  It may be a fixed
 number of bytes.  Fixed length records are packed into tape blocks with
 no punctuation, descriptors, or delimiters.  Usually the tape block size is
 an integer multiple of the fixed length record size.   On the other hand, if
 the record length on tape is variable then each record is preceded by a 4
 byte numeric field that describes the length of the record, in bytes.
  Its range is 0004 to 9999.  This value represents the length of the record
 plus the length of the descriptor.  Therefore the possible net variable
 record length range is 0 to 9997 bytes, unless limited by the tape block size.

@27
A standard DOS text file on DISK is composed of variable length records each
 of which is terminated by carriage return and line feed characters.  The
 records are text in the ASCII character set.   On the other hand, fixed length
 records on DISK are non-standard and are used less frequently because they
 require more disk space.  They are composed of a fixed number of bytes
 in each record usually with no special record delimiters.  The disk format for
 fixed length records does NOT require the records to be text - they may
 contain any type of information.  Some word processors and some integrated
 software packages write the fixed length record format onto disk.

@28
I must allocate memory in the computer to hold the blocks read from the
 input tape.  The memory will be divided into 'buffers' into which the tape
 blocks will be read.  I therefore need to know the maximum block size
 that will be encountered when reading this tape.  If this value is set
 too low then I may read a block from tape that cannot fit into a memory
 buffer.  If this value is set too high then I will have fewer buffers
 to work with and the speed of the tape drive will degrade.  If you do
 not know the tape block size you can use the SHOW program to read the
 tape and find out.  Try the SHOW program's 'Ctrl End' command.

@29
I need to know what size blocks you want to write onto tape.  If you are
 using fixed length records then the block size should be some multiple of
 the record length.  For variable length records the block size should be
 large enough to contain one or more records.  If you don't know what to do,
 try a block size of 8192 bytes (unless you record size is larger than that).
  Remember that smaller block sizes result in the tape holding less data.
  Note that the COPYOUT program might write blocks that are smaller than you
 specify.  For example, if the block size is set at 8000 bytes and records are
 fixed at 120 bytes, then the actual block size written will be 7920 bytes
 (unless block padding is used - see the COPYOUT /P option).  Also note that
 the last block written in a file may be smaller than normal because it may
 contain fewer records.

@30
The COPYOUT program must pack one or more records into tape blocks.  Records
 must fit wholly within tape blocks (a record cannot 'span' a tape block).
  Block sizes, therefore, must be large enough to contain one or more records.
  The tape block size you specified is too small to meet this requirement.

@31
The command we have constructed is shown in the main screen window.  If you
 study it closely you can learn the command notation and eventually bypass
 this MENU program and type your own tape drive commands.  You may now do
 one of 5 things:   1. Typing a / will cause me to ask you for additional
 command options to be added to the command line.  This is an advanced
 feature and to use it you should study the tape command documentation to
 learn about the various options.   2. You may answer 'N' and we will go
 back to the beginning of the MENU program without executing the tape
 command.   3. You may answer 'Y' and we will execute the tape command.
   4. Pressing F10 will toggle back to the main screen.   5. Pressing Esc
 will quit this program entirely.

@32
You have asked me to add additional options to the command line shown in the
 main screen window.  If you change your mind and don't want to add options
 to the tape command line then just press the 'Enter' key.  Please study the
 documentation to determine what additional options, if any, you would like
 to add to the tape command.  The F10 key will toggle back to the main window
 where you can study the command line we have generated.

@33
I can't find the tape command program.  My assumption when looking for the
 tape command programs is that they are located on the same disk and the same
 directory as this MENU program.  If you are using a version of the DOS
 operating system older than level 3.0 then my assumption when looking for
 the tape command programs is that they are located on the default disk
 drive and the default directory.

@34
The DOS operating system gave me an indication of an error when I asked it
 to execute the tape drive command program.  The error is related to finding
 and loading the tape drive command program, not in the execution of that
 program.  Error 8 means that there is insufficient memory to load the tape
 command program.  See the DOS technical reference manual section on
 'Extended Error Codes' for more (but not much more) information.

@35
I now need to know how many files to MOVE the tape.  A file is defined as the
 information on tape punctuated by 'file marks'.  File marks are special
 patterns recorded on tape that contain no data and are used as indications
 of the beginning or ending of files.  If you ask me to MOVE 1 file, I will
 move the tape forward to the next file mark.  If you ask me to MOVE the tape
 -1 file, I will move the tape backward.  I will be counting files relative to
 the current position of the tape.  Note that files counted by reference to
 file marks, which is what I will be doing, does not correctly count labeled
 tape files.  Labeled tape files are composed of a label group, followed by
 the data file, followed by another label group.  Therefore, a labeled tape
 file is composed, in most cases, of 3 files from the MOVE command program's
 perspective.

@36
When using the sequenced file name generation option (the COPYIN file name
 contains # characters), only one file name may be used on the command line.
  A single name containing # wildcard characters will generate a sequence of
 disk file names as the files are being copied from tape.   As an example, if
 the COPYIN file name is FILE###, then as files are copied to disk they will
 be named FILE001, FILE002, etc.

@37
ANSI and ISO standard exchange format variable length records are preceded
 by a 4 byte length descriptor composed of ASCII or EBCDIC numeric characters.
  An older IBM format, however, is still used that has the record length
 descriptors represented as a 4 byte binary field, (and also has a block length
 descriptor, again in binary, in the front of every tape block).   Answer
 'A' for the standard ANSI/ISO variable length records;   Answer 'I' for the
 old IBM format  (which, in mainframe computer terminology is known as the IBM
 'V' format).

@38
You have elected to write a labeled exchange format tape using the COPYOUT
 command.   If the tape has been written upon previously, COPYOUT will read
 the first block from the tape to see if it is a standard labeled tape.
  If it is labeled then COPYOUT can extract the tape volume serial number
 from the existing tape label information and use it when writing new files
 to tape.   If the tape is completly blank than COPYOUT cannot attempt to
 read labels because reading from a blank tape will cause an error.
  Also note that if you have an automatic density detecting tape drive,
 you should answer the question below with "Y" to prevent COPYOUT from
 reading the tape labels, and therefore possibly resetting the density
 selected for writing onto the tape.

@39
Fixed length records on DISK usually have no end-of-record punctuation.
  In rare cases, however, you may have fixed length DISK records and also
 have carraige return and/or line feed characters appended to them.   Answer
 this question 'Y' if that is the case.    The DISK records will be one byte
 longer (or two bytes longer if you have both a carriage return and a line
 feed) than the fixed record length from TAPE that you specified in an
 earlier question.

@@
