home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / PMAC10.ZIP / PRINTD.DOC < prev    next >
Text File  |  1992-05-07  |  7KB  |  125 lines

  1.      ====================================================================
  2.       PrintDir/REXX 1.00,  Copyright 1992 Brad Berson,  Psycho Psoftware
  3.                         Version 1.00, April 28, 1992
  4.      ====================================================================
  5.  
  6.      Introduction:
  7.  
  8.      PrintDir/REXX is Shareware with a twist... you get the source code!
  9.      I wrote versions in C and QuickBASIC but decided that since OS/2
  10.      comes with REXX, the potential users would be best served by being
  11.      able to tailor PrintDir if they wished.  Everyone who has PMcomm has
  12.      OS/2, and everyone who has OS/2 has REXX.  It's easy to learn and
  13.      forgiving to the amateur programmer.  How's that for flexibility?!
  14.      All I demand is that my copyrights remain intact and that modified
  15.      versions are not distributed.  If you find PrintDir/REXX useful, I
  16.      request that you show your appreciation in the form of a Shareware
  17.      donation of $10.  As simple as it may look, there are many traps to
  18.      be found in REXX (particularly when working with non-native data
  19.      files) and much effort and thought went into coding PrintDir/REXX.
  20.      As a programmer, seeing code that works and makes life easy for
  21.      others is gratifying, but that small indication of appreciation is
  22.      the incentive I need to keep pumping out nicely useful, nicely
  23.      coded and documented programs and utilities and then sharing them.
  24.  
  25.      Details:
  26.  
  27.      PrintDir/REXX has been tested with OS/2 version 1.30 and 2.0, and
  28.      with PMcomm version 1.09, 1.10 and 1.11.  There are currently no
  29.      known bugs, anomolies or limitations with PrintDir/REXX.
  30.  
  31.      Running PrintDir/REXX is easy.  The syntax of the command is:
  32.      "PRINTD [PMCOMM.FON [PMCOMM.LST]]"  (without the quotes) where the
  33.      first optional parameter is the path and name of PMcomm's directory
  34.      file (defaults to PMCOMM.FON in the current directory) and the
  35.      second is the optional name of the output file suitable for viewing
  36.      or printing, and defaults to PMCOMM.LST in the current directory.
  37.      You can't specify the second without also specifying the first.  Any
  38.      Existing output files will be over-written.  REXX is not the fastest
  39.      language but even large (100-entry) files should still translate in
  40.      less than a minute.  There's a few second delay the first time that
  41.      PrintDir is run, while OS/2 tokenizes the REXX file into an OS/2
  42.      extended attribute.
  43.  
  44.      Note that REXX/2 is a CPU-hog, not my fault!  But only only lasts a
  45.      few seconds.  DCL under VMS is no better and far more lame.
  46.  
  47.      The format of the output file is 132 columns wide and just about
  48.      everything is self-explanatory.  Entries that print with an asterisk
  49.      in the first column denote entries that have the auto-select box
  50.      checked in PMcomm.  Setting your printer for an 8-point fixed-width
  51.      font and .25" left and right margins should permit hardcopy on an
  52.      8.5x11 page.  To make the output compatible with Ventura Publisher,
  53.      create a .STY sheet with .25" margins and edit PrintDir to change
  54.      the 'crlf' variable line to 'crlf=cr||lf||cr||lf' (so VP doesn't go
  55.      and choke on "long paragraphs").
  56.  
  57.      Examples:
  58.  
  59.      C:\UTILS> PRINTD \PMCOMM\PMCOMM.ONE \VENTURA\
  60.                Creates \VENTURA\PMCOMM.LST from \PMCOMM\PMCOMM.ONE
  61.  
  62.      C:\UTILS> PRINTD \PMCOMM\SUPPORT \VENTURA\PMCOMM.TXT
  63.                Creates \VENTURA\PMCOMM.TXT from \PMCOMM\SUPPORT.FON
  64.  
  65.      C:\PMCOMM> PRINTD OTHERBBS
  66.                 Creates \PMCOMM\PMCOMM.LST from \PMCOMM\OTHERBBS.FON
  67.  
  68.      Discussion:
  69.  
  70.      Some of the conversions required a bit of trickery to get working
  71.      correctly.  The REXX function C2D doesn't know from the swapped
  72.      bytes of stored integers typical to C and most other compilers, so
  73.      you must use REVERSE on 2-byte and 4-byte integers for C2D not to
  74.      return kaka instead of the correct decimal conversion.
  75.  
  76.      REXX has a time function whose time base bears no resemblance to C,
  77.      BASIC or any other common compiler.  So I wrote a REXX version of
  78.      ctime returning a MM/DD/YY format without seconds from a C time
  79.      value.  To those of you who never set their machine's system date
  80.      correctly, take note - C compilers have a bug which convert very
  81.      early (pre-'85) dates to the year 2013!  Rather than duplicate this
  82.      quirk, very early dates will show as blank.  For evidence of this
  83.      hilarity, fire up PMcomm and create a new dialing entry.  Then with-
  84.      out calling from that entry, hit the "INFO" button and check the
  85.      last-called date.  The functions DPD and GETLEAP are used only by
  86.      CTIME.  GETLEAP is crude but accurate for the immediate time being.
  87.  
  88.      The functions of C2R, RPD and RST are for converting and then
  89.      formatting the data from the .FON file.  REXX has no "record" type
  90.      so the routines BRPM and PRLI assign a record's values to variables
  91.      and printing the conversions to the output file.  LFHD prints the
  92.      header, and can be called at intervals set by the variable maxlines
  93.      (page lines).  As delivered only one header will print.
  94.  
  95.      For all the Xmodem and Ymodem protocols, two different values are
  96.      interpreted for each respective protocol.  This is to make up for a
  97.      bug in preliminary versions of QMTOPM due to incorrect documentation
  98.      from Multinet.  The released QMtoPM/REXX does not exhibit this bug.
  99.      The supplied REXX utility FIXPRT.CMD will correct the wrong values
  100.      so that PMcomm will recognise the new values.  PrintDir/REXX will
  101.      report the correct protocols regardless of which values exist in the
  102.      file.  I recommend using FIXPRT.CMD anyway.
  103.  
  104.      Epilogue:
  105.  
  106.      If you use Qmodem, look at QMtoPM/REXX to convert your Qmodem .FON
  107.      files into PMcomm .FON files quickly and easily.  If you use one or
  108.      more Bulletin Board Systems using PCBoard software and optionally
  109.      using the Qmail4 mail packing/unpacking system, you will surely find
  110.      PCBOARD.CMD great for automating all your PCBoard logins and Qmail4
  111.      mail transfers with just one .CMD file to attach to all your PCBoard
  112.      dialing entries in PMcomm.  PCBOARD.CMD also automates ordinary file
  113.      downloads and uploads in the same session!
  114.  
  115.      Brad Berson
  116.      Psycho Psoftware
  117.      #2 Chaparral Road
  118.      Chestnut Ridge, NY 10977
  119.      (212) 887-4216 voice
  120.      (212) 887-2154 FAX
  121.      CIS: 71631,132
  122.  
  123.      The end.
  124.  
  125.