;
                                 DATSTP.COM                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
DATSTP-U.CIM   5k (36)   FCA4  1.30       Gene Pizzetta 10/90      Z3COM5
DATSTP-U.COM   5k (36)   AF70  1.30       Gene Pizzetta 10/90      Z3COM5
DATSTP-Z.CIM   4k (30)   5C7A  1.30       Gene Pizzetta 10/90      Z3COM5
DATSTP-Z.COM   4k (30)   F6CA  1.30       Gene Pizzetta 10/90      Z3COM5

  1- Syntax/Options  2- Date/Time Entry  3- Configuration/Assembly  4- Notes  

   DATSTP displays or changes the  create and  modify date stamps on any file.
(Under Z3PLUS, DATSTP will display the file dates, but not change them.)
:1

 Syntax   DATSTP {dir:}fn.ft {{date} {time} {{/}options}}

   If no DU or DIR is given, the current  drive/user is assumed.   If no date/
time is given, the current date  stamps for the  given file will be displayed.
If date/time is given, the given file's create date  stamp will  be updated as
the default (but see options M and B, below.
 Options - 1/2 

   Options should be preceded by a slash, unless they are the fourth parameter
on the command line.

     M    Edit and write modify date stamp.  Without this option, 
          the creation date stamp will be read into the edit 
          buffer, edited, and then written back to the create 
          stamp on disk.  With the M option, one modification 
          date will be read into the edit buffer, edited, and 
          then written back to the modify stamp on disk.

     B    Write to both create and modify date stamps.  The 
          edited date is ordinarily written back to the stamp 
          from which it came.  With this option, the edited date 
          is written to both the create and modify stamps on 
          disk.
 Options - 2/2 

     Q    Toggle current setting of quiet mode.  DATSTP checks 
          the ZCPR3 quiet flag when it is invoked and enters 
          quiet mode if the quiet flag is on.  If the quiet flag 
          is off, DATSWP then checks a configurable internal 
          quiet flag to determine if it should default to quiet 
          mode.  In either case, the Q option toggles off quiet 
          mode, if it is on, and toggles it on, if it is off.

   On error, DATSTP sets the program error flag to standard error codes listed
in Z34ERR.LIB.  If an error handler is installed, it will also be invoked.
:2
 Date/Time Entry - 1/3 

   DATSTP uses a  modified  version of Carson Wilson's  ZSPARSDS module in his
ZSLIB.   It allows  date  entry in both European and American order (configur-
able) and allows both "." and "/" as delimiters in the date field:
     {mm{/dd{/yy{ hh{:mm}}}}} -- American clock time
or
     {dd{.mm{.yy{ hh{:mm}}}}} -- European clock time
Time must always be entered  based  on  a  24-hour clock;  i.e.,  3:00 p.m. is
entered as 15:00.   Relative time can also be entered,  for those who use that
method (but this mode has not been tested):
     {mm{/dd{/yy{ +nnnn}}}} -- American relative time
or
     {dd{.mm{.yy{ +nnnn}}}} -- European relative time
Either periods or slashes may be used as date  delimiters with either American
or European date order.

In the discussion which follows,  American  order  is  assumed.   Those  using
European order will have to make the necessary mental changes.
 Date/Time Entry - 2/3  

   DATSTP does not actually  replace the  date  and  time,  it  edits it.   By
default, the editing buffer is  loaded  with the current create date stamp and
the command line  date  applied to it.   Any blank  fields on the command line
remain unchanged in the buffer.   For instance,  if the current create date is
"3/15/89 21:35" and the command line date is
     DATSTP TEST.DOC /25
then only the day would be changed  ("3/25/89 21:35").   If the  command  line
entry was
     DATSTP TEST.DOC // 9
then only the hour would be changed ("3/15/89 09:35").   There must be a space
between the date and time; otherwise, the result will be different:
     DATSTP TEST.DOC //9
changes the year ("3/15/09 21:35").

   With the M option,  the modify  date  stamp  will  be  loaded into the edit
buffer instead of the create stamp.
 Date/Time Entry - 3/3 

   If the original date field is  empty and you do not  give valid entries for
at least the day and month fields, you will get an "invalid date/time" error.

   Whichever date field you choose for editing, the create stamp or the modify
stamp (M option),  the B option will cause the resulting date to be written to
both stamp fields.

   You can easily move  dates  between  fields.   For instance, if you want to
move the create date stamp to the modify stamp, use:
     DATSTP TEST.DOC // /b
The create stamp will be loaded into the  edit  buffer,  but,  since  all date
fields are empty,  it will not be changed.   It will  then  be written back to
both stamp fields per the B option.  The modify stamp can also be moved to the
create stamp field similarly:
     DATSTP TEST.DOC // /mb

   The dates and times displayed are always those actually on disk.  If a date
is given, DATSTP first reads the  current file stamp,  modifies  it,  and then 
writes in back.  Finally, the file stamp read from disk again and displayed.

:3
 Configuration 

   You may use ZCNFG and the  DATSTPnn.CFG file to  configure defaults to suit
yourself.  ZCNFG will find the configuration file automatically as long as you
don't change its name, even if you change the name of DATSTP.COM.

   As distributed,  DATSTP defaults to  verbose  operation.  You can set it to
default to quiet mode, if you wish.  Civilian (12-hour) time is used in screen
displays in the  distributed  version,  but you  can  configure  DATSTP to use
military (24-hour) time.   On the  command  line you  must  always use 24-hour
time.   You may also  configure  DATSTP to display and accept from the command
line dates in European  order (dd.mm.yy).   As distributed,  use American date
order (mm/dd/yy).
 Assembly - 1/2 

   DATSTP was developed with SLRMAC and SLRNK+.  Linkage also requires 
PARSDS.REL, ZSLIB.REL (v2.1), and the version 4 libraries.  PARSDS is a 
special version, not the version in ZSLIB:

     slrmac parsds/m
     slrmac datstp/m
     slrnkp datstp/n,/v,/a:100,/j,datstp,parsds,zslib/s,dslib/s,
          vlib/s,z3lib/s,syslib/s,/e

or, for type 3:

     slrnkp datstp/n,/v,/a:8000,/j,datstp,parsds,zslib/s,dslib/s,
          vlib/s,z3lib/s,syslib/s,/e
 Assembly - 2/2 

   Before assembly the  equate  "ZSDOS" must  be  set  for the version wanted.
Setting the equate to "TRUE" creates a version that works only under ZSDOS and
ZDDOS, using date stamp routines from ZSLIB.   Setting the  equate  to "FALSE"
creates a universal version that  also works with DateStamper under ZRDOS, and
with  Z3PLUS  (display only),  using date  stamp  routines  from  DSLIB.   The
universal version is 6 records larger, which puts it over 4K, but I think it's
a little faster.

   The usage screen displays "Version Z-n.n" for the ZSDOS or  "Version U-n.n"
for the universal version.
:4
 DATSTP Notes - 1/2 

   a. The distribution library contains four versions of DATSTP.  Two of them,
      with filetype CIM, are type-3  programs that load  at  8000h and require
      ZCPR 3.3 or higher.  The COM files load at 100h, the normal address.

      The DATSTP-Z versions were  assembled for  ZSDOS and  ZDDOS only,  using
      date stamp routines from ZSLIB.  They are under 4 K.

      The DATSTP-U versions were  assembled  using  date  stamp  routines from
      DSLIB and are universal.   They are larger (about 5K), but they read and
      write file stamps under ZSDOS,  ZDDOS, and ZRDOS with DateStamper.  They
      will also display file stamps under  Z3PLUS,  although it will not write
      them.
 DATSTP Notes - 2/2 
      
   b. Vs 1.3 updates (October 8, 1990 -- Gene Pizzetta):
      - Optimizations to cut code size considerably.  
      - Equates to create a universal version using DSLIB date stamp routines 
        for operation under ZRDOS DateStamper, & under Z3PLUS (display only).
        ZSDOS version is considerably smaller, however.
      - Corrected lingering bug in the PARSDS module that gave an error when a
        colon was given that was not followed by a minute specification, but 
        WAS followed by another command line parameter.

   c. Vs 1.2A updates (September 12, 1990 -- Howard Goldstein):
      - Optimized code.  No functional changes.

   d. Vs 1.2 updates (September 8, 1990 -- Gene Pizzetta):
      - Corrected failure to initialize option B flag.

   e. Vs 1.1 updates (September 7, 1990 -- Gene Pizzetta):
      - Improved display, especially for reverse video highlighting. 
      - Corrected small bug in usage message, and made a few other minor code 
        changes.
