home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
maxsrt12.zip
/
MAXUSORT.DOC
< prev
next >
Wrap
Text File
|
1994-12-05
|
24KB
|
733 lines
MAXUSORT
Maximus CBCS User SORT and archive utility
Version 1.2b (OS/2 + DOS)
for MAXIMUS CBCS version 2.0+
December 5, 1994
Rob Hamerling
Vianen, The Netherlands
Phone: ++31-3473-72136 (voice)
FIDO: 2:280/804.1098
Maximus User Maintenance Utility
Maximus User Maintenance Utility
CONTENTS
Functional Description . . . . . . . . . . . . . . . . . . . . . . 1
Copyrights, Shareware Contribution, etc. . . . . . . . . . . . . 1
Specification: . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Sample specifications: . . . . . . . . . . . . . . . . . . . . . . 5
Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Hints, restrictions, dependencies, system requirements . . . . . . 7
Statement of intent . . . . . . . . . . . . . . . . . . . . . . . 7
Appendix A. History of changes and version legend: . . . . . . . 8
Version 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Version 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Version 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Version 0.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Version 0.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Version 0.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Version 0.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Version 0.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Version 0.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Version 0.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Version 0.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
version 0.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Contents ii
Maximus User Maintenance Utility
FUNCTIONAL DESCRIPTION
Archive inactive users (selectively on privilege) and sort the
remaining user records to allow 'best' users a faster logon than less
'valuable' users.
User records can be printed (if desired to a file) in the same run.
The program does not require operator intervention: may be used in
batch files with unattended console (e.g. at night around mailing
hour).
COPYRIGHTS, SHAREWARE CONTRIBUTION, ETC.
This program may be used under the same conditions as MAXIMUS:
■ no changes allowed to program or documentation
■ no charge for distribution of program or documentation
■ only distribution of the complete package (MAXUSORT.EXE +
MAXUSORT.DOC).
SPECIFICATION:
■ Sort records in USER.BBS in following sequence:
1. highest privilege
2. lowest number of days since last call (not significant above 254
days)
3. highest number of calls to date (with 10 day resolution)
4. highest key/lock value (only keys 1..8)
■ Optionally: archive obsolete (inactive) users based on privilege in
combination with number of days since last call, if credit and
key/lock allows. These records will be appended to the history
file: USER.RMV, with the date of removal in the last part of the
CITY field in the user's record. The user's LASTREAD values are set
to null in the LASTREAD.BBS files of all message area's found in
AREAS.DAT.
Functional Description 1
Maximus User Maintenance Utility
USAGE
The commandline specification is as follows:
┌────────────────────────┐
v │
──┬─────────┬─┬────────┬─ MAXUSORT ────┬────────────────────┬─┴─────┤
└─ drive ─┘ └─ path ─┘ ├── upath ─┬─────────┤
│ └─ apath ─┤
├── /P─┬─────────────┤
│ └─ outfile ───┤
│ ┌───────────┐ │
│ v │ │
├── /Dnnp ────┴──────┤
├── /nn ─────────────┤
├── /A ──────────────┤
├── /Kxyz────────────┤
├── /L ──────────────┤
└── /T ──────────────┘
upath Specifies the PATH (drive + directory-tree) to the directory
containing the file USER.BBS. This directory will be
searched for USER.BBS and also used for related user-files
(the newly sorted file and the archive file USER.RMV).
If 'upath' not specified, MAXUSORT tries to locate the file
USER.BBS without any PATH information. So if USER.BBS is not
in the current directory this parameter is required!
Default: NULL-string (current directory)
apath Specifies PATH to AREA.DAT. This file is only referenced,
when users are archived or LASTREAD values have to be reset.
If 'apath' not specified, MAXUSORT tries to locate the file
AREAS.DAT without any path information. If AREA.DAT is not
in the current directory, and users are being archived, this
parameter is required! This requires the upath parameter be
specified as well!
Default: <upath> specification (or current default
directory).
/P.... Print formatted USER.BBS (remaining users in sorted
sequence). Per user the following items will be printed:
1. User record number (SYSOP is number 0)
2. Name (max 30 chars)
3. City (max 24 chars)
4. Phone (max 14 chars)
5. Privilege
6. Keys (hexadecimal, bits to be read right to left for
1..8,a..x)
7. Permanent flag
8. Netmail balance (credit-debit)
9. Last read pointer (index in LASTREAD.BBS)
Usage 2
Maximus User Maintenance Utility
10.Number of calls (Times)
11.Days since last call (Away)
12.UPload amount
13.DOWNload amount
outfile When /P is followed by one or more non-blank characters,
these will be considered as output file specification. The
'printed' output will then be in this outputfile (including
some printer control characters, for later printing if you
wish).
note.Only "filename.ext" is expected!
Default: PRN (= LPT1:)
/D... Delete user-records from USER.BBS file and archive them in
USER.RMV.
..nnp Users of specified privilege 'p' are archived when they did
not logon for more than 'nn' days.
..xx. a decimal number of up to 5 digits.
....p a one letter indication of the user's privilege for which the
specified inactivity period is intended.
Valid letters: T - Twit
D - Disgrace
L - Limited
N - Normal
W - Worthy
P - Privil
F - Favored
E - Extra
C - Clerk
A - Assistsysop
Note: The /Dnnp option should be used once for every class of
users you want to archive.
Note: Some user-records will not be archived:
■ Users with privilege SYSOP. To archive these records
reset the SYSOP privilege manually to a lower value.
■ Users with the 'Permanent' flag. To archive these
user-records reset the 'Permanent' flag manually.
■ Users with positive netmail balance (credit-debit), unless
the /A options is specified.
■ Users with with ANY key/lock value set, unless the /K
option is used with at least all keys of the user
specified (or /K*).
The last 2 options should be combined with an inactivity
period and user-privilege letter, see following explanation
of [xxp]:
Usage 3
Maximus User Maintenance Utility
Default: no user will be archived.
/nn Archive 'one-time-logged-on-and-never-again' users after 'nn'
days. That is: those users who did logon EXACTLY 1 time, and
did not come back within a period of 'nn' days. The value
'nn' should be specified as a decimal number greater than
zero. The deletion is regardless of privilege, but respects
credit-balance and the key/lock value, like the /D option.
So if you have 'special' 1-timers you don't want to lose,
give'm some credit or a key/lock setting!
Default: one-timers user will not be archived.
/A Allow deletion of users with positive credit-debit saldo (if
the user qualifies for deletion in the first place).
Specification of "/A" is only useful in combination with the
/D or /nn option.
Default: users with positive balance will not be archived.
/K... A user with any key/lock-value will normally not be archived.
Specification of the "/K" parameter allows these users to be
archived (key/lock-values have to be specified).
..xyz Adjacent to the "/K"-parameter, one or more characters should
be specified. This allows the program to archive users that
have no key/lock set, or ALL of there specified key/lock
values ("AND"-relationship). In other words: a user with any
key/lock-value outside the specified values will NOT be
archived. If archiving has to be performed regardless of the
key/lock value "/K12345678abc...(etc)...vwx" has to be
specified. Specification of '/K*' has the same effect (= any
key/lock combination). Specification of "/Kxyz" is only
useful in combination with the /D or /nn option.
Default: users with any key/lock-setting will not be
archived.
/L Set LASTREAD pointer for every user to zero. This might be
useful to wipe out the message-read history of all users (for
example after loading a new or reloading an old message-base.
Default: lastread-pointers will not be reset.
/T Test-mode (mainly for debugging purposes):
■ Shows parts of each user record and the 'sort-value' of a
user, during initial user-file reading. The HEX value in
front of the username is the sort-key. This info is
useful for visual checking of input of sort.
■ The original USER.BBS file is 'read-only', the output will
be put in USER.TMP, which would have become the new
USER.BBS normally (when NOT in test-mode). 'Archived'
user records will actually NOT be removed and are NOT
written to the USER.RMV file. The Lastread pointers are
referenced but NOT modified!
Usage 4
Maximus User Maintenance Utility
Default: program will not run in test-mode!
Notes:
1. Options letters may be specified in UPPER, lower or MiXeD case.
2. You may use the option-indicator '-' in stead of '/', or mixed if
you prefer, all options should be separated with at least one space.
3. There is no check on duplicate specifications, the last (from left
to right on commandline) is used, any previous specification of this
options is ignored.
4. The exception to rule 3 is the /D option when it is specified for
different privilege levels.
SAMPLE SPECIFICATIONS:
■ MAXUSORT
Calling MAXUSORT without any parameters shows you the command
syntax.
■ MAXUSORT d:\max\USER.BBS
SORT ONLY of the file USER.BBS in directory d:\max
■ MAXUSORT /21
Archive users that logged on only 1 time ever before during the
lifetime of the user-record when that was at least 21 days ago.
Archiving is NOT done if a candidate has a positive debit/credit
balance or any key/lock value set, or the user is 'permanent'. Sort
the remaining records of USER.BBS in the current default directory,
without printing them.
■ MAXUSORT f:\max\ctl\ -P -d90l -d60d -A
The USER.BBS file and AREAS.DAT file are located in the directory
"\MAX\CTL\" on drive F. The following category of users will be
archived:
∙ all LIMITED users who did not logon for 90 days, and
∙ all DISGRACE users who did not logon for 60 days, even if the
user has a positive credit/debit balance ("/A"-parameter!), but
no archiving will take place if the user has any key/lock-value
active, or is 'permanent'.
All other user records are kept (incl. TWIT and one-timers!). The
remaining records in USER.BBS will be sorted and printed on the
printer.
■ MAXUSORT /D35D -K1x
Archive DISGRACE users that did not logon during the last 35 days
even if they have key/locks '1' and 'x' set. Archiving will NOT
take place if the user has a positive debit/credit balance (no
Usage 5
Maximus User Maintenance Utility
"/A"-parameter is specified), or if he/she has any key/lock-value
set OTHER than '1' or 'x', or is 'permanent'. So users with
key/locks '2' through '8' and 'a' through 'w' will NOT be archived.
The remaining records are sorted, not printed.
ERROR HANDLING
The program might end prematurely with the following error codes:
2 Counting error: number of new+archived users not equal to original
usercount. Probably programming error, please report!
3 New USER.BBS filelength not in accordance with number of remaining
active users (disk full?).
5 USER.BBS file could not be opened, or not enough memory for
allocation of sort matrix.
6 Error while opening new USER.BBS file (USER.TMP).
7 Error while opening the archive-file for removed user-records
(USER.RMV).
8 Error while opening the AREA.DAT file to obtain PATH information
to message area's (USER.RMV).
These errors and others will generally also produce messages on the
display, with most probable cause and the action taken by the program.
Some workfiles may remain on your disk, just erase them! Userrecords
that would have been removed from USER.BBS are still in that file, but
will also appear in the USER.RMV file. You might just leave them, but
they will be copied again the next time you run MAXUSORT, or you may
discard those records (e.g. with the regular MAXIMUS user maintenance
funtion).
Usage 6
Maximus User Maintenance Utility
HINTS, RESTRICTIONS, DEPENDENCIES, SYSTEM REQUIREMENTS
■ The program MAXUSORT works for MAXIMUS CBCS version 2.0 only.
■ The maximum number of users in USER.BBS should not exceed about
8000.
■ The first user-record (normally SYSOP) always remains first, and is
never archived.
■ Assumes for date calculations that system date reflects REAL date,
you may loose users when running with 'future' system date!
■ If you use programs, which rely on USER-record-numbers (relative
position in the USER-file), run them AFTER MAXUSORT.
■ The program produces progress signals which allows you to follow
different stages of the process visually.
STATEMENT OF INTENT
I'll promise the following:
■ Add a flexible sort specification (specification at runtime) is
considered, rather than the static sort algorithm now.
■ More extensive error-detection will be built-in. But don't be
afraid for the integrity of your user file now: for example a
disk-full situation is detected now and the program ends with the
old userfile still in place.
■ Follow the enhancements of MAXIMUS.
Hints, restrictions, dependencies, system requirements 7
Maximus User Maintenance Utility
APPENDIX A. HISTORY OF CHANGES AND VERSION LEGEND:
VERSION 1.2
■ Key/Lock letter with '/K'-parameter may now also be upper case!
VERSION 1.1
■ Check on message-base type (*.MSG or Squish) for update of lastread
pointers, and lastread pointers in Squish message base now also
updated.
■ Bug fixed for <apath> specification.
VERSION 1.0
■ Support now only Maximus CBCS version 2.00. Backup your old
user-archive (of previous versions of MAXUSORT) and start a new
archive for this version of MAXUSORT. It is not a problem for
MAXUSORT, but user editors will probably not handle mixed record
types (and sizes). It might become difficult to retrieve user
information from the archive.
■ Sort sequence changed to: (1) privil (2) away (3) calls (4) key 1..8
■ Support added for 32 Lock/Keys.
'/K*' means: all 32 key/locks.
■ The 'permanent'-flag is now supported: permanent users will NEVER be
archived, there is no override-parameter in MAXUSORT.
■ /B parameter removed: we have now a 'controlled' date format in the
user record.
■ Key/Lock field now printed HEXadecimal (to get whole record on a
single line).
■ Netmail-balance and 'permanent'-flag are printed, password not
anymore.
■ Command-line help extended.
■ Use of Microsoft C compiler version 6.00A and IBM OS.2 1.2/1.3
Program Development Toolkit and Information.
■ Compiled at 80286-code level (are there XT-based Boards running
MAXIMUS CBCS?).
VERSION 0.9
■ Now supports MAXIMUS CBCS versions 1.00 AND 1.02.
■ No functional changes.
Appendix A. History of changes and version legend: 8
Maximus User Maintenance Utility
VERSION 0.8
■ Due to a mistake with testing, version 0.7 still contained a wrong
date-calculation, sorry for this!
■ Revision of source code structure.
VERSION 0.7
■ Adapted to new AREA.DAT file/record structure, with an effort to
make the program independent of this structure. If uncertain, the
program refuses to update LASTREAD pointers of archived users.
■ Some internal re-organisation.
■ Improved(?) documentation format (this file).
■ Fixed calculation error in 'last-date-used' period, and related
print-formatting error (with /P option).
VERSION 0.6
■ Option "/B" added to archive users with a bad 'last-date-used' field
(generally a registration problem).
■ Printout of userfile now also contains the print-date in the header
and the key/lock of the user (2-byte hex).
VERSION 0.5
■ Sorting sequence slightly changed. For details: see top of this
file. In short: key/lock value now taken as second sort field,
upload/download quotient neglected.
■ Support for 'Lock and Key' as archiving argument has been added. See
explanation of "/Kyy"-parameter, and the extended sample
specifications in this file.
VERSION 0.4
■ The path to the directory with USER.BBS and AREAS.DAT may now
[optionally] be specified, but only if as FIRST parameter on the
command-line. This allows for having the mentioned files in another
subdirectory than the current default directory.
VERSION 0.3
■ Solved bug 'unable to open [path]LASTREAD.BBS'.
■ Term 'removed user' changed into 'archived user' consistently.
Appendix A. History of changes and version legend: 9
Maximus User Maintenance Utility
VERSION 0.2
■ Re-organised source code for program maintenance purposes.
■ File-only area's now skipped for LASTREAD.BBS updates!!
■ Users with invalid 'last-date-on' value are sorted now just in front
of TWITs: usually these are due to irregularities, like disconnects
before the registration process ended succesfully. These
user-records are probably not in use, and should be removed manually
(with MAXUSORT user maintenance facility), MAXUSORT does not want to
take responsibility for this remove.
VERSION 0.1
■ First version for MAXIMUS CBCS (changes to name and logic).
■ Compiled for OS/2 by IBM's C/2 Compiler.
■ Binded as 'family application' to be used under OS/2 + DOS.
■ Sort sequence slightly changed: most recent access more important
than most frequent user: following history of a user more closely!
■ support of simple '/D' option removed: DELeted user-records are
dynamically removed with MAXIMUS SYSOP maintenance!
■ Support for additional MAXIMUS privilege classes added.
■ NOTE: OPUS USER.BBS-files may still be sorted and printed ONLY! Be
careful NOT use any [/Dxxp] option!!!
Appendix A. History of changes and version legend: 10