home *** CD-ROM | disk | FTP | other *** search
- ====================================================================
- PrintDir/REXX 1.00, Copyright 1992 Brad Berson, Psycho Psoftware
- Version 1.00, April 28, 1992
- ====================================================================
-
- Introduction:
-
- PrintDir/REXX is Shareware with a twist... you get the source code!
- I wrote versions in C and QuickBASIC but decided that since OS/2
- comes with REXX, the potential users would be best served by being
- able to tailor PrintDir if they wished. Everyone who has PMcomm has
- OS/2, and everyone who has OS/2 has REXX. It's easy to learn and
- forgiving to the amateur programmer. How's that for flexibility?!
- All I demand is that my copyrights remain intact and that modified
- versions are not distributed. If you find PrintDir/REXX useful, I
- request that you show your appreciation in the form of a Shareware
- donation of $10. As simple as it may look, there are many traps to
- be found in REXX (particularly when working with non-native data
- files) and much effort and thought went into coding PrintDir/REXX.
- As a programmer, seeing code that works and makes life easy for
- others is gratifying, but that small indication of appreciation is
- the incentive I need to keep pumping out nicely useful, nicely
- coded and documented programs and utilities and then sharing them.
-
- Details:
-
- PrintDir/REXX has been tested with OS/2 version 1.30 and 2.0, and
- with PMcomm version 1.09, 1.10 and 1.11. There are currently no
- known bugs, anomolies or limitations with PrintDir/REXX.
-
- Running PrintDir/REXX is easy. The syntax of the command is:
- "PRINTD [PMCOMM.FON [PMCOMM.LST]]" (without the quotes) where the
- first optional parameter is the path and name of PMcomm's directory
- file (defaults to PMCOMM.FON in the current directory) and the
- second is the optional name of the output file suitable for viewing
- or printing, and defaults to PMCOMM.LST in the current directory.
- You can't specify the second without also specifying the first. Any
- Existing output files will be over-written. REXX is not the fastest
- language but even large (100-entry) files should still translate in
- less than a minute. There's a few second delay the first time that
- PrintDir is run, while OS/2 tokenizes the REXX file into an OS/2
- extended attribute.
-
- Note that REXX/2 is a CPU-hog, not my fault! But only only lasts a
- few seconds. DCL under VMS is no better and far more lame.
-
- The format of the output file is 132 columns wide and just about
- everything is self-explanatory. Entries that print with an asterisk
- in the first column denote entries that have the auto-select box
- checked in PMcomm. Setting your printer for an 8-point fixed-width
- font and .25" left and right margins should permit hardcopy on an
- 8.5x11 page. To make the output compatible with Ventura Publisher,
- create a .STY sheet with .25" margins and edit PrintDir to change
- the 'crlf' variable line to 'crlf=cr||lf||cr||lf' (so VP doesn't go
- and choke on "long paragraphs").
-
- Examples:
-
- C:\UTILS> PRINTD \PMCOMM\PMCOMM.ONE \VENTURA\
- Creates \VENTURA\PMCOMM.LST from \PMCOMM\PMCOMM.ONE
-
- C:\UTILS> PRINTD \PMCOMM\SUPPORT \VENTURA\PMCOMM.TXT
- Creates \VENTURA\PMCOMM.TXT from \PMCOMM\SUPPORT.FON
-
- C:\PMCOMM> PRINTD OTHERBBS
- Creates \PMCOMM\PMCOMM.LST from \PMCOMM\OTHERBBS.FON
-
- Discussion:
-
- Some of the conversions required a bit of trickery to get working
- correctly. The REXX function C2D doesn't know from the swapped
- bytes of stored integers typical to C and most other compilers, so
- you must use REVERSE on 2-byte and 4-byte integers for C2D not to
- return kaka instead of the correct decimal conversion.
-
- REXX has a time function whose time base bears no resemblance to C,
- BASIC or any other common compiler. So I wrote a REXX version of
- ctime returning a MM/DD/YY format without seconds from a C time
- value. To those of you who never set their machine's system date
- correctly, take note - C compilers have a bug which convert very
- early (pre-'85) dates to the year 2013! Rather than duplicate this
- quirk, very early dates will show as blank. For evidence of this
- hilarity, fire up PMcomm and create a new dialing entry. Then with-
- out calling from that entry, hit the "INFO" button and check the
- last-called date. The functions DPD and GETLEAP are used only by
- CTIME. GETLEAP is crude but accurate for the immediate time being.
-
- The functions of C2R, RPD and RST are for converting and then
- formatting the data from the .FON file. REXX has no "record" type
- so the routines BRPM and PRLI assign a record's values to variables
- and printing the conversions to the output file. LFHD prints the
- header, and can be called at intervals set by the variable maxlines
- (page lines). As delivered only one header will print.
-
- For all the Xmodem and Ymodem protocols, two different values are
- interpreted for each respective protocol. This is to make up for a
- bug in preliminary versions of QMTOPM due to incorrect documentation
- from Multinet. The released QMtoPM/REXX does not exhibit this bug.
- The supplied REXX utility FIXPRT.CMD will correct the wrong values
- so that PMcomm will recognise the new values. PrintDir/REXX will
- report the correct protocols regardless of which values exist in the
- file. I recommend using FIXPRT.CMD anyway.
-
- Epilogue:
-
- If you use Qmodem, look at QMtoPM/REXX to convert your Qmodem .FON
- files into PMcomm .FON files quickly and easily. If you use one or
- more Bulletin Board Systems using PCBoard software and optionally
- using the Qmail4 mail packing/unpacking system, you will surely find
- PCBOARD.CMD great for automating all your PCBoard logins and Qmail4
- mail transfers with just one .CMD file to attach to all your PCBoard
- dialing entries in PMcomm. PCBOARD.CMD also automates ordinary file
- downloads and uploads in the same session!
-
- Brad Berson
- Psycho Psoftware
- #2 Chaparral Road
- Chestnut Ridge, NY 10977
- (212) 887-4216 voice
- (212) 887-2154 FAX
- CIS: 71631,132
-
- The end.
-