TBBS23M32B.exe.x/TBBS23M32B.IMA.x/SAMPDATA/WINDOWS/CIGRTT.ZIP.x/ULEDIT.DOC

11 KB 6d2afbc07c0a9d4f…
             Documentation for ULEDIT Printing Options

                          TBBS Version 2.3



                            INTRODUCTION

ULEDIT now has the capability of printing userlog information.  All
printing is achieved through the use of a print template file. Print
template files are simple text files with the extension of .PTM (or
the extension of your choice).  Each line of the template file is
read and processed by ULEDIT for each record printed from the
userlog.  Several sample .PTM files are included with TBBS 2.3 for
your use directly or as examples to build from.

Printing uses the concept of a "print device."  Although most
commonly a physical printer connected to a parallel port on the
computer, the "print device" can alternatively be designated as a
disk file.



                        TEMPLATE FILE FORMAT

There are three types of lines in the template file.  They are:

                           Comment Lines
                           -------------

These lines are used by the operator to comment on various portions
of the print template file.  The contents is not actually used by
ULEDIT for any function.  Comment lines begin with a semi-colon as
the first character. Example:

   ;
   ;  These are comment lines
   ;


                           Command Lines
                           -------------

These lines are used by the operator to perform special functions,
route printing data to a specific printer or file, and to control
which sections of a template file are printed based on privilege
levels or access flags.  Each command line begins with a pound sign
(#) and follows with a command and possible arguments.  Valid
commands are:



  #FORMFEED
  ---------

  This command simply outputs a formfeed character (ASCII 12) to the
  print device.  Most printers will advance to the next page when
  receiving this character.



  #PRINTER <x>
  ------------

  This command switches the current print device.  The <x> argument
  is a printer port number (1-3) for further output.

  Example: #PRINTER 1



  #FILE <filespec>
  ----------------

  This command switches the current print device to an ASCII text
  file. The <filespec> argument is the full drive, path and filename
  to be used for further output.

  Example: #FILE C:\TBBS\OUTPUT\ULLABEL.TXT



  #RESTRICT [PRIV = | < | > x] [A1=--------] [A2=--------]
        [A3=--------] [A4=--------]
  --------------------------------------------------------

  This command restricts one of more print template lines based on
  the current userlog record's privilege and/or access flag
  settings.  Any lines of commands in the template up to an
  #ENDRESTRICT commands will be conditioned based on the designated
  privilege level and/or access flags.

  Privilege levels can be designated to be equal to a number (=),
  less than a number (<), greater than a number (>), less than or
  equal to a number (<=), greater than or equal to a number (>=) or
  anything other than a number (<>).

  Examples:
    #RESTRICT PRIV<=50 A2=XXX--..X
    #RESTRICT PRIV>100 A1=X------- A3=X.X.---- A4=------X.



  #ENDRESTRICT
  ------------

  This command ends any current restriction parameters specified by
  the #RESTRICT command (see above).



                         Printer Text Lines
                         ------------------

These lines are used as actual templates for output to the current
print device.  Printer text lines can contain insertion parameters
as a mechanism to retrieve data from the record currently being
printed.  Insertion parameters are as follows:

    %RECNO%         Userlog Record #
    %NAME%          User's name
    %LOCATION%      User's location
    %PASSWORD%      User's Password
    %PWDCHGD%       Date of last password change
    %NOTES%         Notes
    %ADDR1%         Address Line 1
    %ADDR2%         Address Line 2
    %CITY%          City Name
    %STATE%         State Name
    %ZIP%           Zip Code
    %COUNTRY%       Country Name
    %PHONE%         Phone Number
    %PRIV%          Privilege Level
    %MINSPERCALL%   Minutes allowed per call
    %EXPERT%        Expert level
    %A1%            A1 Authorization Flags
    %A2%            A2 Authorization Flags
    %A3%            A3 Authorization Flags
    %A4%            A4 Authorization Flags
    %MINS24%        Minutes used in past 24 hours
    %BYTES24%       # of bytes downloaded in past 24 hours
    %CALLS24%       # of calls in past 24 hours
    %LOGONS24%      Total # of times logged on in past 24hr
    %LOGGEDHR24%    Total time logged on (hours)
    %LOGGEDMIN24%   Total time logged on (minutes)
    %BYTESDL24%     Total bytes downloaded in past 24 hrs
    %MSGNEWPTR%     New message pointer method
    %ASKPREPARE%    Ask for prepared message text
    %FSEMODE%       Full screen editor setting
    %MSGPROMPT%     Line editor prompt style
    %EXPIRATION%    User's expiration date
    %WIDTH%         Terminal width
    %LOGONS%        Total # of times logged on
    %MORE%          Terminal length (-More- setting)
    %TOTHR%         Total logged on time (hours)
    %TOTMIN%        Total logged on time (minutes)
    %NULLS%         Null settings
    %TOTDL%         Total bytes downloaded
    %TOTUL%         Total bytes uploaded
    %CLSCODES%      Clear screen codes
    %LINEFEEDS%     Line feeds
    %UPPERCASE%     Uppercase
    %GRAPHICS%      IBM Graphics
    %ANSI%          ANSI
    %KEEP%          Keep flag
    %REVIEWED%      Review flag
    %NETFREE%       Net Mail Free
    %NETCRASH%      Net Mail Crash
    %FULLACCESS%    Full access
    %INVISIBLE%     Invisible
    %PUBLICACCT%    Public account
    %LASTL10%       Last logon (#10)
    %LASTL9%        Last logon (#9)
    %LASTL8%        Last logon (#8)
    %LASTL7%        Last logon (#7)
    %LASTL6%        Last logon (#6)
    %LASTL5%        Last logon (#5)
    %LASTL4%        Last logon (#4)
    %LASTL3%        Last logon (#3)
    %LASTL2%        Last logon (#2)
    %LASTL1%        Last logon (#1)
    %SYSFG0%        SYSFLGS Set 0
    %SYSFG1%        SYSFLGS Set 1
    %SYSFG2%        SYSFLGS Set 2
    %SYSFG3%        SYSFLGS Set 3
    %SYSFG4%        SYSFLGS Set 4
    %SYSFG5%        SYSFLGS Set 5
    %SYSFG6%        SYSFLGS Set 6
    %BC0TOTHR%      Billing class 0 total hours
    %BC0TOTMIN%     Billing class 0 total minutes
    %BC0LEFTHR%     Billing class 0 hours remaining
    %BC0LEFTMIN%    Billing class 0 minutes remaining
    %BC1TOTHR%      Billing class 1 total hours
    %BC1TOTMIN%     Billing class 1 total minutes
    %BC1LEFTHR%     Billing class 1 hours remaining
    %BC1LEFTMIN%    Billing class 1 minutes remaining
    %BC2TOTHR%      Billing class 2 total hours
    %BC2TOTMIN%     Billing class 2 total minutes
    %BC2LEFTHR%     Billing class 2 hours remaining
    %BC2LEFTMIN%    Billing class 2 minutes remaining
    %BC3TOTHR%      Billing class 3 total hours
    %BC3TOTMIN%     Billing class 3 total minutes
    %BC3LEFTHR%     Billing class 3 hours remaining
    %BC3LEFTMIN%    Billing class 3 minutes remaining
    %BC4TOTHR%      Billing class 4 total hours
    %BC4TOTMIN%     Billing class 4 total minutes
    %BC4LEFTHR%     Billing class 4 hours remaining
    %BC4LEFTMIN%    Billing class 4 minutes remaining
    %BC5TOTHR%      Billing class 5 total hours
    %BC5TOTMIN%     Billing class 5 total minutes
    %BC5LEFTHR%     Billing class 5 hours remaining
    %BC5LEFTMIN%    Billing class 5 minutes remaining
    %BC6TOTHR%      Billing class 6 total hours
    %BC6TOTMIN%     Billing class 6 total minutes
    %BC6LEFTHR%     Billing class 6 hours remaining
    %BC6LEFTMIN%    Billing class 6 minutes remaining
    %BC7TOTHR%      Billing class 7 total hours
    %BC7TOTMIN%     Billing class 7 total minutes
    %BC7LEFTHR%     Billing class 7 hours remaining
    %BC7LEFTMIN%    Billing class 7 minutes remaining
    %BC8TOTHR%      Billing class 8 total hours
    %BC8TOTMIN%     Billing class 8 total minutes
    %BC8LEFTHR%     Billing class 8 hours remaining
    %BC8LEFTMIN%    Billing class 8 minutes remaining
    %BC9TOTHR%      Billing class 9 total hours
    %BC9TOTMIN%     Billing class 9 total minutes
    %BC9LEFTHR%     Billing class 9 hours remaining
    %BC9LEFTMIN%    Billing class 9 minutes remaining
    %NETCREDIT%     Net Mail Credit
    %NETDEBIT%      Net Mail Debit



                   Insertion Parameter Formatting
                   ------------------------------

Insertion parameters are expressed in the form:

  %PARAM[:[+/-]n[U|L|C]]%

This means that the parameter can be optionally followed by a format
specifier.  If no format specifier is present, the parameter is
printed unchanged and takes a length equal to whatever length the
parameter ends up being.  If a format specifier is present, it is
signaled by the parameter being followed by a colon (:), then an
optional justification parameter.

The default justification parameter is LEFT justified and
corresponds to a minus (-) symbol in this position.  If a plus (+)
is found in this position, the string is filled on the left to make
it RIGHT justified.

Next is the length of the string.  The default if not present is to
end the string without padding it.  If a number is present here, the
insertion parameter will be truncated or padded to fit the given
length.  By default, if the string needs to be padded, it will be
padded with blank spaces.

If the string length parameter starts with a 0, the string will be
padded with 0's instead.  The last optional parameter is one of U,
L, or C, which corresponds to the "case" of the final result.  By
default, no alphabetic case translation is done to the string.  If U
is specified, the string is converted to all upper case, L converts
to all lower case, while C converts to a mixed case format.



               Simple Example of Print Template File
               -------------------------------------

  ;
  ;  This is a sample file that will output userlog records into a comma
  ;  delimited text file for later import via a database application.
  ;
  #FILE DATA.TXT
  "%NAME%","%ADDR1%","%ADDR2%","%CITY%","%STATE%","%ZIP%","%COUNTRY%","%PHONE%"



                   Invoking ULEDIT Print Function
                   ------------------------------

The ULEDIT print function is invoked one of three different ways,
they are:

  1.  The "Print" selection from the FILE pull-down menu

  2.  Pressing the P key when reviewing a userlog record

  3.  Via the ULEDIT command line using the /P: switch.  The format is:

         ULEDIT /P:<filespec>

      The <filespec> parameter is the print template filename to
      use.  If no <filespec> is specified then ULEDIT.PTM is
      assumed.

The print template filename defaults to ULEDIT.PTM.  If you wish to
use an alternate filename, you may use the "set Print Template"
option on the OTHER pull-down menu inside ULEDIT.  If changed, this
setting will only hold for the duration of the current ULEDIT
session.