;
                                  JETCP.COM                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
               4k (26)   E78F  1.20       Carson Wilson 6/91       Z3COM10

  1- Syntax/Options  2- Usage  3- Patching  4- Error Handling  5- Notes       

   JET CoPy for CP/M+ was  designed  as  a  fastest-possible  speed file  copy
program for Z3PLUS.   It achieves high speed throughput chiefly through multi-
sector i/o and advanced  BDOS  error  handling.   Copy buffers are as large as
memory will allow,  and  JetCP doesn't  attempt to  make  the destination file
until it has  finished  reading the input file or has filled its read buffer.

   JetCP also preserves CP/M Plus datestamps.   The  physical datestamp of the
copy matches that of the copied file.   However, JetCP does NOT read directory
labels, so you should be using the same selection of  active logical stamps on
both destination and source disks to avoid confusing CP/M Plus Creation stamps
with Last Access stamps.  Initial version (12/14/89) by Carson Wilson. 
:1
 Syntax   JETCP
             or
          JETCP //
             or
          JETCP ?
 
or copies files if invoked as

          JETCP [dir:]ufn [dir:][ufn] [[/]D]

   The current defaults are  assumed for all items  other than the "ufn" which
must be included and is the unambiguous  name of the source file to be copied.
If you just specify  a directory for  output,  a  file  of  the  same  name is
produced at the destination directory.   The "/D" option  toggles datestamping
off by default,  or on if you have patched JetCP not to preserve datestamps by
default.
:2
 Usage 

   JetCP does not include many of the  amenities  found in  more sophisticated
(but slower) copy programs,  such as multiple  file capability, copy verifica-
tion, or user-query options.   While these options are  sometimes  convenient,
they take up memory which can otherwise be used as copy buffer space.   In any
case,  I find that the  sophistication  of Z System largely rules out the need
for sophisticated utility programs.   For example,  to do multiple copies with
JetCP,  I simply invoke  JetCP as part of a ZFILER Group Macro command, or use
Dreas  Nielsen's  remarkable   FOR/NEXT  utility  to  generate  multiple  copy
commands.   Similar  techniques can be  used to do  user-prompted  copying and
verification.

   I have used JetCP on a Morrow MD5 and an  Osborne Executive,  and find that
JetCP works significantly faster than  currently  available file copy programs
under Z3PLUS.   Typically  JetCP  runs  about  1.25 times as  fast as the best
conventional copy  programs  for  CP/M.   Some of  the  same  techniques could
probably  be  implemented  in  a  copy  program  for  CP/M 2.2-based  systems,
especially under ZSDOS and ZDDOS where extended error handling is available.
:3
 Patching 

   If you don't want datestamping (there IS a time penalty involved, as Z3PLUS
must relog the destination disk  after  every copy),  you can turn this option
OFF by default by changing the byte  after the ASCII label  "[OPTIONS>" at the
start of JETCP.COM from 0FFh to 000h.   Now JetCP will preserve stamps only if
you give the "/D" option on the command line.
:4
 Error Handling - 1/4 

   Pardon my boast,  but  JetCP's error handling is  among  the best.  Several
errors merely cause JetCP to prompt you for a  "Y"  or  "N"  response.  If the
target file exists, JetCP rings the terminal's bell and asks

   Erase destination file (Y/N)? N

   If you hit any key other than "Y" or "y" the copy operation is aborted.  If 
the target file turns out to be Read-Only, JetCP rings again and further asks

 Erase R/O file (Y/N)? N

Again,  any response other than  a  YES is taken as a NO, and the operation is 
cancelled.
 Error Handling - 2/4 
 
   While copying,  several problems may develop,  the most  common of which is
probably running out of space.   In this case,  JetCP chains to  the  Z-SYSTEM
ERROR HANDLER  (make sure you are using one!),  with  error  code  11 decimal.
If you are using ZERR,  you may  cancel  the  operation,  prepend  some  other
commands to the operation, or restart the operation.   ZERR also allows you to
optionally cancel the rest of any pending ZEX or SUBMIT script, which is often
very  important.   Moral:  INSTALL  AN  ERROR  HANDLER!   The  best  currently
available is in ZERR12.LBR on most Z-Nodes.
 Error Handling - 3/4 

   Several other  errors  may  also  occur.   Most chain to the  current error
handler with appropriate messages  (duplicate or ambiguous filespecs,  illegal
directory specification, etc.).  Another sort of error occurs during filestamp
transfer, and is usually not fatal.   If there  was  a  problem  copying file-
stamps, JetCP displays one of the following messages, and continues the copy: 

     Set stamp error: BIOS write
     Set stamp error: BIOS read
     Set stamp error: drive invalid
     Set stamp error: BIOS sectors > 1k
     Set stamp error: no stamps on disk
     Set stamp error: file not found
     Set stamp error: unknown
 Error Handling - 4/4 

   These messages simply  signify that the  filestamp  was not preserved,  and
attempt to provide clues as to why.   Most  often the reason is that there are
no stamps on the destination disk.   This is  only  cause  for  concern if you
thought that there  WERE  stamps on the  destination  disk.   Other  set stamp
errors should rarely occur.   If they do,  make  note of the circumstances and
attempt to remedy them.

   One possible difficulty that is not the fault of the target system is "BIOS
sectors >1k".   If you get this  error,  your system reads and writes physical
sectors greater than 1 kilobyte in size, and JetCP must be modified to allow a
larger directory sector buffer in order to do file datestamping.  Otherwise no
datestamps will be preserved, although no harm should result from this type of
error (the file copy will still be intact).

   Of course,  if the  source disk did not include  valid  file datestamps, no
attempt will be made to set the  stamp of the target file,  and  none of these
errors will appear.
:5
 JETCP Notes - 1/2 

   a. Version 1.2 updates (3/31/90, Carson Wilson):
      - Now skips stamp read if the file stamping is toggled off.

   b. Version 1.1 updates (3/23/90, Carson Wilson):
      - Removed DMABUF for Set Stamp calls; use RAMPTR instead for even more 
        buffer space.  
      - Changed BUFnRECS storage to 1 byte each.

   c. Version 1.0 updates (2/22/90, Carson Wilson):
      - Cleaned up output screens.
      - Added installable "no stamp" (/D) command line toggle.

   d. Version 0.9 updates (2/16/90, Carson Wilson):
      - Added test for validity of BCD stamp (CPM3 may return 00's).
      - Cleaned up exit code.
      - Checks for CP/M plus, and aborts if not found.
      - More explicit set stamp error messages.
      - Consolidated multiple read/write routines to save space.
      - Tells KBytes transferred instead of records.
 JETCP Notes - 2/2    

   e. Version 0.8 updates (2/7/90, Carson Wilson):
      - Cleaned up code, bell on erase messages, better help, etc.

   f. Version 0.7 updates (2/6/90, Carson Wilson):
      - Use ZCPR error handler routines.
