CDIFF - Compare Equivalent Text Files

This program compares two text files in which corresponding records are assumed to be equivalent but which might have minor differences within them. It simply scans each pair of records comparing each pair of characters, and reporting any records that are different, high-lighting their differences with a line of asterisks.

Primary Input File: as specified

The primary input file is any text file and its name must be specified in full.

Secondary Input File: as specified

The secondary input file is any text file and its name must be specified in full.

Diagnostic File: {related}CDIFF.PRT

This output file contains a copy of any diagnostics output by the program caused by differences between the two files.

The file will be created in the same device/directory that contains the primary input file and will be called "cdiff.prt".

Command Line Options: None
Version History: None
Outstanding Issues: None


CHECK - Check order of entries in (S)BOOKS file

This program checks that the entries in a single UK or US data file are in
alphabetical order. To check this order it looks at each type `A' record and
constructs a string of the form:

Author^_Category^_Title^_Date~

where:

a) ^_ is a non-printing divider that ensures that, for instance, LYONESSE sorts
before LYONESSE II.
b) Any co-authors or author notes are removed from the author name.
c) If the book is edited then the !ed. or !eds. string is replaced by "~E" to
ensure that such entries come after ordinary entries for the author.
d) If the author name has a trailing ![ref.] then this is replaced by "~R" to
ensure that such entries come after both ordinary entries and edited entries
for the author.
e) All non-alphanumeric characters (other than " " and ",") are removed from both
author and title names, as are adjacent spaces.
f) The category identifies the type of 'A' record encountered and is "1" for
ordinary 'An' records; "2" for 'AP' records; "3" for 'AS' records; and "4"
for 'AR' records.
g) The date is reformatted so that the most explicit date sorts first - e.g. so
that 950314 precedes 9503 which, in turn, precedes 95??.

Primary Input File - {LOCUSDIR}SBOOKS.xxx
-----------------------------------------

The primary input file is a data file conforming to either the UK or the US
version of the Locus Format rules. The program allows you to enter either the
month abbreviation (e.g. 959) on its own or a full file specification. In the
former case the program will prefix "sbooks." to the abbreviation to create a
file name, which means that this approach is only appropriate if you are
checking a UK data file.

The program will first attempt to open the file as specified. If this fails,
and an explicit device/directory was NOT given, then the program will attempt
to open a file of the given name in the director(ies) specified by the
environment variable LOCUSDIR.

Diagnostic File - {related}CHECK.PRT
------------------------------------

This output file contains a copy of any diagnostics output by the program caused
by problems with the order of records in the input file.

The file will be created in the same device/directory that contains the primary
input file and will be called "check.prt".

Command Line Options
--------------------

The name (or abbreviation) of the primary input file may be specified on the
command line as in:

check 959

Version History
---------------

V2.00 - April 1996

Outstanding Issues
------------------
None


CHRON - Generate Chronological Index

This programs generates a skeleton Chronological Index of Prose Fiction from
a bibliography text file.

Version History
---------------

None

Outstanding Issues
------------------

Program needs to be written!


COMPARE - Compare two (S)BOOKS files

This program compares two UK (SBOOKS) or US (BOOKS) data files to try to identify
the differences in a helpful manner.

Primary Input File - {LOCUSDIR}SBOOKS.xxx
-----------------------------------------

The primary input file is a UK data file conforming to the UK version of the
Locus Format rules, or a US data file conforming to the US version of the rules.
The program allows you to enter either the month abbreviation (e.g. 959) on its
own or a full file specification. In the former case the program will prefix
"sbooks." to the abbreviation to create a file name.

The program will first attempt to open the file as specified. If this fails,
and an explicit device/directory was NOT given, then the program will attempt to
open a file of the given name in the director(ies) specified by the environment
variable LOCUSDIR.

Secondary Input File - {LOCUSDIR}SBOOKS.xxx
-------------------------------------------

The secondary input file is a UK data file conforming to the UK version of the
Locus Format rules, or a US data file conforming to the US version of the rules
- the format must be the same as for the Primary Input File. The program allows
you to enter either the month abbreviation (e.g. 959) on its own or a full file
specification. In the former case the program will prefix "sbooks." to the
abbreviation to create a file name.

The program will first attempt to open the file as specified. If this fails,
and an explicit device/directory was NOT given, then the program will attempt to
open a file of the given name in the director(ies) specified by the environment
variable LOCUSDIR.

Report File - {related}COMPARE.PRT
----------------------------------

This output file contains a report on all the differences detected between the
two input files, together with a copy of any diagnostics output by the program
caused by problems with the format of the input files.

The file will be created in the same device/directory that contains the primary
input file and will be called "compare.prt".

Command Line Options
--------------------

The name (or abbreviation) of the primary input file may be specified on the
command line as in:

compare 950

If the name is specified, then the name (or abbreviation) of the secondary
input file may also be specified as in:

compare 950 icbooks.950

Version History
---------------

V2.00 - September 1996

Outstanding Issues
------------------

None


CVTDAT - Convert Catalogue File to Locus File

This program is intended to convert an "old format" catalogue data file into a
UK-format LOCUS data file. It is at a very early stage of development and
currently only parses the input file to try to determine exactly what the old
format consisted of!

Primary Input File - {OLDFMTDIR}xxx.DAT
---------------------------------------

The primary input file is a catalogue data file conforming to the 'old format'
catalogue rules. The program only allows you to enter the file name (e.g. A)
on its own and will append ".dat" to the name to create a full file name.

The program will first attempt to open the file as specified. If this fails,
then the program will attempt to open a file of the given name in the
director(ies) specified by the environment variable OLDFMTDIR.

Primary Output File - {related}CBOOKS.xxx
-----------------------------------------

The primary output file is a UK data file conforming to the UK version of the
Locus Format rules. The file will be created in the same device/directory that
contains the primary input file and will be called "cbooks.xxx" where "xxx" was
the name specified for the input file.

Diagnostic File - {related}CVTDAT.PRT
-------------------------------------

This output file contains a copy of any diagnostics output by the program caused
by problems with the format of the input file.

The file will be created in the same device/directory that contains the primary
input file and will be called "cvtdat.prt".

Command Line Options
--------------------

The name (or abbreviation) of the primary input file may be specified on the
command line as in:

cvtdat a

Version History
---------------

None

Outstanding Issues
------------------

90% of program needs to be written


CVTFORTH - Convert an SBOOKS file into "Forthcoming Books" list

This program converts a UK (SBOOKS) data file into a listing format that is
similar to that used by Locus for forthcoming books.

Primary Input File - {LOCUSDIR}SBOOKS.xxx
-----------------------------------------

The primary input file is a UK data file conforming to the UK version of the
Locus Format rules. The program allows you to enter either the month
abbreviation (e.g. 959) on its own or a full file specification. In the former
case the program will prefix "sbooks." to the abbreviation to create a file name.
Typically FTH would be specified at this point.

The program will first attempt to open the file as specified. If this fails,
and an explicit device/directory was NOT given, then the program will attempt to
open a file of the given name in the director(ies) specified by the environment
variable LOCUSDIR.

Primary Output File - {related}FORTH.LOC
----------------------------------------

The primary output file is a text file that contains formatted entries listing
all the books in the input file sorted into publisher order, and to month order
within publisher and author/title order within month. For books of an 'unusual'
class or with an 'unusual' binding, notes are appended to the entry to detail
these.

The file will be created in the same device/directory that contains the primary
input file and will be called "forth.loc".

Diagnostic File - {related}CVTFORTH.PRT
---------------------------------------

This output file contains a copy of any diagnostics output by the program caused
by problems with the format of the input file.

The file will be created in the same device/directory that contains the primary
input file and will be called "cvtforth.prt".

Command Line Options
--------------------

The name (or abbreviation) of the primary input file may be specified on the
command line as in:

cvtforth fth

Version History
---------------

V2.00 - April 1996

Outstanding Issues
------------------

None


CVTLOCUS - Convert UK SBOOKS file to US format

This program is used for converting a UK-format data file of some kind into a US format of some kind. Exactly what kind depends on the optional (second) parameter as follows:

Primary Input File - {LOCUSDIR}SBOOKS.xxx

The primary input file is a UK data file conforming to the UK version of the Locus Format rules (if the optional second parameter is omitted). The program allows you to enter either the month
abbreviation (e.g. 959) on its own or a full file specification. In the former case the program will prefix "sbooks." to the abbreviation to create a file name.

The program will first attempt to open the file as specified. If this fails, and an explicit device/directory was NOT given, then the program will attempt to open a file of the given name in the director(ies) specified by the environment variable LOCUSDIR.

Primary Output File - {related}BOOKS_WC.xxx/{related}yyyyy.WC/yyyyy.XXX

For Type L conversions, the primary output file is a data file conforming to the US version of the Locus Format rules, except that '~' is used as a divider and accented characters are left in their "expanded" format. The file will be created in the same device/directory that contains the primary input file and will be called "books_wc.xxx" where "xxx" is the 'extension' of the input file (i.e. the month abbreviation), unless that extensions is "mag" in which case the file will be called "yyyyy.wc" where "yyyyy" is the name of the input file.

For Type A conversions, the primary output file is identical to the primary input file except that UK accents and dividers are translated to their (real) US equivalents. The file will be created in the current working directory and will be called "yyyyy.xxx" where "yyyyy" is the name of the input file.

Secondary Input File - {LOCUSDIR}PUBL.IDX

This file is only used for Type L conversions and defines any translations that are required between the format of a particular publisher name as used in UK data files and that used in US data files. Note that the program will always convert a publisher name of the form "The xxx" to "xxx, The".

The program will first attempt to open "publ.idx" in the current directory. If this fails, then the program will attempt to open "publ.idx" in the directory specified by the environment variable LOCUSDIR.

Diagnostic File - {related}CVTLOCUS.PRT

This output file contains a copy of any diagnostics output by the program caused by problems with the format of the input file.

The file will be created in the same device/directory that contains the primary output file and will be called "cvtlocus.prt".

Command Line Options

Outstanding Issues

None


EXTRACT - Extract one Locus file from another

This program extracts a single month's SBOOKS file from the SBOOKS.FTH file. It
was originally used when I did the Locus column, but is believed not to be used
by Ian and hence is probably obsolete.


FORMAT - Format a Bibliography

This program formats a bibliography source file into a bibliography text file.
It just reads through the input file, formatting each bibliography section in
turn.

Primary Input File - {BIBLIODIR}xyzzy.SRC
-----------------------------------------

The primary input file is a bibliography source file conforming to the
(unwritten) bibliography source format rules. Note that the file must have been
sorted into order using the sort definition file BIB.LSR. The program allows
you to enter just the sub-directory and file name, prefixing the former with the
bibliography root directory and appending ".src" to the latter.

The program will first attempt to open the file as specified. If this fails,
and an explicit device was NOT given, then the program will attempt to open a
file of the given name relative to the directory specified by the environment
variable BIBLIODIR.

Primary Output File - {related}xyzzy.TXT
----------------------------------------

The primary output file is a bibliography text file conforming to the (unwritten)
bibliography text format rules.

The file will be created in the same device/directory that contains the input
file and will be called "xyzzy.txt" where "xyzzy" is the 'file name' of the input
file.

Diagnostic File - {related}FORMAT.PRT
-------------------------------------

This output file contains a copy of any diagnostics output by the program that
relate to the formatting exercise.

The file will be created in the same device/directory that contains the input
file and will be called "format.prt".

Command Line Options
--------------------

None

Version History
---------------

V2.00 - In Progress

Outstanding Issues
------------------

1. Diagnostics do not indicate location of problem.
2. Pseudonyms not output.
3. Awards not handled.
4. Magazine Entries not handled correctly.
5. Abbreviations are not being converted successfully.
6. Fiction Books not handled.
7. Series entries not handled.
8. Poetry & Drama Books not handled.
9. Articles not handled.
10. Miscellaneous not handled.
11. Non-fiction Books not handled.
12. Publications Edited not handled.
13. Other Media not handled.
14. Article on not handled.
15. Reviews not handled.
16. Books About not handled.
17. Phantom & Forthcoming not handled.
18. Related Items not handled.
19. Textual Variations not handled.
20. Leftovers not handled.
21. File formats not documented.


GENERATE - Generate a Bibliography Source File

This program generates a bibliography source file from a set of Locus data
files. Note that the generated file must be sorted before being input to the
FORMAT program.

Primary Input File - {LOCUSDIR}DATA.IDX
---------------------------------------

The primary input file is a text file containing a list of data files that should
be used to generate the bibliography. Each line in this file must contain either
a comment line (starting with !) or the name of a data file to used to help
generate the file.

The program will first attempt to open a file called "data.idx" in the current
device/directory. If this fails, then the program will attempt to open a file
called "data.idx" in the director(ies) specified by the environment variable
LOCUSDIR.

Secondary Input Files - {LOCUSDIR}yyy.xxx
-----------------------------------------

The secondary input files are each data files conforming to either the UK or the
US version of the Locus Format rules. The name of each file is specified in the
primary input file.

For each file, the program will first attempt to open the file as specified. If
this fails, and an explicit device/directory was NOT given, then the program
will attempt to open a file of the given name in the director(ies) specified by
the environment variable LOCUSDIR.

Primary Output File - C:\BOOKS\BIB\WORK\xyzzy.SRC
-------------------------------------------------

The primary output file is a bibliography source file conforming to the
(unwritten) bibliography source format rules.

The file will be created in c:\books\bib\work and will be called "xyzzy.src"
where "xyzzy" is derived from the 'author name' specified to the program.

Diagnostic File - {related}GENERATE.PRT
---------------------------------------

This output file contains a copy of any diagnostics output by the program that
relate to the generation exercise.

The file will be created in the same device/directory that contains the output
file and will be called "generate.prt".

Command Line Options
--------------------

None

Version History
---------------

V2.00 - In Progress

Outstanding Issues
------------------

1. Remove hard-wiring of output directory name.
2. Handle AP records.
3. Handle DQD records.
4. Handle DQQ records.
5. Handle DN records.
6. Handle EB records.
7. Handle EC records.
8. Handle EI records.
9. Handle old format data files.


GENPRT - Format a Locus file for printing

This program converts a UK (SBOOKS) data file into a listing file in a variety of formats. Exactly what kind depends on the optional (second) parameter which should currently always be specified as 'F' to produce a file in a format suitable for posting on Fictionmags.

Primary Input File - {LOCUSDIR}xxx.xxx

The primary input file is a UK data file conforming to the UK version of the Locus Format rules. The program will first attempt to open the file as specified. If this fails, and an explicit device/directory was NOT given, then the program will attempt to open a file of the given name in the director(ies) specified by the environment variable LOCUSDIR.

Primary Output File - {related}SPRT.xxx or xxx.PRT

The primary output file is a listing file suitable for posting on Fictionmags (or similar). The file will be created in the same device/directory that contains the primary input file and will be called "xxx.prt" if the input file was called "xxx.mag" or "sprt.xxx" in all other cases (where xxx was the extension on the input file).

Diagnostic File - {related}GENPRT.PRT

This output file contains a copy of any diagnostics output by the program caused by problems with the format of the input file. The file will be created in the same device/directory that contains the primary input file and will be called "genprt.prt".


ISBN_LST - Generate List of ISBNs

This program just generates a list of ISBN's for a given (hard-wired) ISBN prefix.


MERGE - Merge two or more (S)BOOKS files

This program merges two or more UK or US data files into a single file,
preserving the alphabetical order of the input file. It uses the same definition
of alphabetical order as defined for CHECK.EXE (see above).

Primary Input Files - {LOCUSDIR}SBOOKS.xxx
------------------------------------------

The primary input files are each data files conforming to either the UK or the
US version of the Locus Format rules. For each file the program allows you to
enter either the month abbreviation (e.g. 959) on its own or a full file
specification. In the former case the program will prefix "sbooks." to the
abbreviation to create a file name, which means that this approach is only
appropriate if you are merging UK data files.

For each file, the program will first attempt to open the file as specified. If
this fails, and an explicit device/directory was NOT given, then the program
will attempt to open a file of the given name in the director(ies) specified by
the environment variable LOCUSDIR.

The program allows up to 30 input files to be merged in a single run and insists
that at least 2 are specified. When all input files have been specified, just
press <ENTER> or <RETURN> to the prompt for an input filename. Note that all
the files must be of the same format (i.e. they must either ALL be UK format or
ALL be US format) - the program will abort if mixed format input files are used.

Primary Output File - {related}SBOOKS.xxx
-----------------------------------------

The primary output file is a data file containing the merged contents of the
input files and hence conforming to whichever version of the Locus Format rules
the input files conformed to. The program allows you to enter either the month
abbreviation (e.g. 950) on its own or a full file specification. In the former
case the program will prefix "sbooks." to the abbreviation to create a file name,
which means that this approach is only appropriate if you are merging UK data
files.

The file will be created in the same device/directory that contains the first
primary input file. Note that it is quite possible (and even likely) that the
output file will have the same name as one of the input files. To minimize the
chance of losing any data the output file is first created with a temporary name
and is only renamed to the specified file name if the program completes
successfully. In addition, any existing file with the same name as the output
file will be renamed to a file whose first character has been replaced by a "$"
(e.g. "$books.tmp").

If the program aborts (or is aborted) partway through then the file will be left
with the temporary name and must be deleted by hand (all such file names start
with "_"). In this case no damage will be done to the input files.

Diagnostic File - {related}MERGE.PRT
------------------------------------

This output file contains a copy of any diagnostics output by the program caused
by problems with the format of the input file. In particular, it will record
any instances where the records in a given input file were already out of
sequence (although note that the checks performed are not as sophisticated as
CHECK.EXE is).

The file will be created in the same device/directory that contains the primary
input file and will be called "merge.prt".

Command Line Options
--------------------

None

Version History
---------------

V2.00 - April 1996

Outstanding Issues
------------------

None


MRG_STY - Merge story details from an (S)BOOKS file

This program attempts to merge first appearance data specified in a single BOOKS
or SBOOKS file with that stored in the master file STORY.IDX, identifying any
discrepancies at the same time. Note that this is still at an early stage and
currently:

a) Ignores "miscellaneous" item types such as 'ai' and 'aw' that are likely to
have the same title for different items and unlikely to be reprinted.
b) Ignores "book" item types such as 'an' and 'no' when used on EA records.
c) Supports up to 10000 items in a given (S)BOOKS file.
d) Ignores any details in the title after a '[', and any "title additional
information", when comparing entries. All other details (including item type)
are currently significant.
e) Ignores any qualifying information in ED records (although the master file
currently contains some such information).

Note also that it is a fairly slow program as well as it has to read and write
the entirety of the STORY.IDX file (approx 100,000 records).

Primary Input File - {LOCUSDIR}SBOOKS.xxx
-----------------------------------------

The primary input file is a data file conforming to either the UK or the US
version of the Locus Format rules. The program allows you to enter either the
month abbreviation (e.g. 959) on its own or a full file specification. In the
former case the program will prefix "sbooks." to the abbreviation to create a
file name, which means that this approach is only appropriate if you are merging
information from a UK data file.

The program will first attempt to open the file as specified. If this fails,
and an explicit device/directory was NOT given, then the program will attempt to
open a file of the given name in the director(ies) specified by the environment
variable LOCUSDIR.

Secondary Input File - {LOCUSDIR}STORY.IDX
------------------------------------------

The secondary input file is the master file containing first appearance data for
stories. Each record has the same format as an 'EA' record with the first field
(page number) omitted - this allows entries to be added to an SBOOKS file easily
when required.

The program will first attempt to open the file in the current device/directory.
If this fails, then the program will attempt to open a file of the given name in
the director(ies) specified by the environment variable LOCUSDIR.

Primary Output File - {related}STORY.IDX
----------------------------------------

The primary output file is an updated version of the first appearance master file
containing any new information from the input (S)BOOKS file. Note that, where
discrepancies are reported, both versions will currently be written to the
output file. It is important to edit the created file to remove the "incorrect"
version of each such discrepancy.

The file will be created in the same device/directory that contains the input
first appearance master file. To minimize the chance of losing any data the
output file is first created with a temporary name and is only renamed to the
specified file name if the program completes successfully. In addition, any
existing file with the same name as the output file will be renamed to a file
whose first character has been replaced by a "$" (i.e. "$tory.idx").

If the program aborts (or is aborted) partway through then the file will be left
with the temporary name and must be deleted by hand (all such file names start
with "_"). In this case no damage will be done to the input files.

Diagnostic File - {related}MRG_STY.PRT
--------------------------------------

This output file contains a copy of any diagnostics output by the program, in
particular any discrepancies in first appearance information discovered.

The file will be created in the same device/directory that contains the primary
input file and will be called "mrg_sty.prt".

Command Line Options
--------------------

The name (or abbreviation) of the primary input file may be specified on the
command line as in:

mrg_sty 963

Version History
---------------

V2.00 - April 1996

Outstanding Issues
------------------

1. Handle Book data
2. Handle alternate titles
3. Handle alternate author names


PAGINATE - Paginate a Bibliography

This program paginates a bibliography text file. Its primary purpose is to
break the input file into pages of 59 lines each. Of these, the 59th line
contains a running 'title' (in italics) and the page number, and the 58th line
is always blank. The program always attempts to break the input file "sensibly",
following twin rules of trying to keep each page "fairly full" while, at the
same time, trying to break the page where there is a natural break (i.e. a
blank line) in the input file.

To this end, it tries (in order) to break the page after 53, 54, 52, 55, 51 or
56 lines. If there is no blank line there it then tries 50 to 41 lines in
reverse order. If that still fails then it tries 57 lines. If that also fails
then it breaks at 54 lines (or, to be precise, just prior to the first line of
the item entry, part or all of which is on line 55).

Note that:

a) If a blank line could not be found, then a line stating "continued on next
page" is output at the bottom of the current page and the most recent
"header" line is repeated at the top of the next page with "(continued)"
suffixed to it.
b) For these purposes, a "header line" is any line that is not completely blank
and which does not start with a tab. When used as a continuation header,
any text following a '(', a '[' or a '{' is ignored, as are trailing spaces.
c) Lines that contain only ".SP" are treated exactly the same as blank lines
except that, if a page is broken at such a line, then the continuation
markers are output as for a) above (this is used for blank lines inside
single item groupings).
d) Lines that contain only ".NSP" are treated exactly the same as blank lines
except that they are not treated as good candidates for page breaks.
e) When checking for the "first line of an item entry" (see above), the
program discounts any lines that start with two tabs or a tab followed
by a space.
f) If a title change (.HL record) is encountered then a new page is thrown
no matter how many lines are on the current page.
g) If a "test page" (.TP record) is encountered then a new page is thrown
if the count on the record added to the current number of lines exceeds
55; otherwise the record is ignored.

While this forms the bulk of the behaviour of the program, there are also a
couple of other minor functions it performs:

1. It checks each line to see if it extends beyond column 68 (after expanding
any tabs) and, if so, outputs a diagnostic. One or two characters beyond
this limit are usually acceptable (but should be avoided if possible) but
any more may cause the line to wrap in Microsoft Word.
2. It translates any accents in each line, either Fully or Partially depending
on the user's specification (Partial is currently recommended).
3. It replaces all occurrences of '\' with a Sterling Pound sign.
4. When a new section is encountered, the program outputs a line to the Table of
Contents file and outputs the line itself in Underlined Italics. For these
purposes a new section is defined as a line that has more than 5 characters
of which the first 2 are spaces, the 3rd is an upper case alphabetic
character and the 4th is a dot.

Primary Input File - {BIBLIODIR}xyzzy.TXT
-----------------------------------------

The primary input file is a bibliography text file conforming to the (unwritten)
bibliography text file format rules. The program allows you to enter just the
sub-directory and file name, prefixing the former with the bibliography root
directory and appending ".txt" to the latter.

The program will first attempt to open the file as specified. If this fails,
and an explicit device was NOT given, then the program will attempt to open a
file of the given name relative to the directory specified by the environment
variable BIBLIODIR.

Primary Output File - {related}xyzzy.PRT
----------------------------------------

The primary output file is a bibliography print file, suitable for reading into
Microsoft Word (or equivalent package) for final formatting.

The file will be created in the same device/directory that contains the input
file and will be called "xyzzy.prt" where "xyzzy" is the 'file name' of the input
file.

Primary Output File - {related}xyzzy.TOC
----------------------------------------

The primary output file is a bibliography table of contents file, to be prefixed
to the bibliography print file during final formatting.

The file will be created in the same device/directory that contains the input
file and will be called "xyzzy.toc" where "xyzzy" is the 'file name' of the input
file.

Diagnostic File - {related}PAGINATE.PRT
---------------------------------------

This output file contains a copy of any diagnostics output by the program that
relate to the pagination exercise.

The file will be created in the same device/directory that contains the primary
input file and will be called "paginate.prt".

Command Line Options
--------------------

None

Version History
---------------

V2.00 - April 1996

Outstanding Issues
------------------

None


REBOILER - Reboiler a Bibliography Text File

This program reboilers a bibliography text file - in other words, it attempts
to update all anthology entries with the latest "official" versions in the
boilerplate file BOILER.BKS. This is important for two reasons:

a) It assists in maintaining consistency between multiple bibliographies.
b) It picks up the latest information on variant contents and such-like.

Note that only items in sections A, D, F, G, K and L are reboilered. In
addition, the program ignores any entries where:

1. There is a "(19" or "(20" near the end of the entry (ignoring any notes).
This is assumed to be an author collection.
2. The entry contains " by " (other than in notes at the end). This is
assumed to be a book by another author (and these are not handled).
3. The second character (ignoring the leading tab) is lower case. This is
assumed to be a magazine (and these are not handled).
4. The second, third and fourth characters are "SF " and the sixth character
is lower case. This is also assumed to be a magazine.

Note that, the entry to be reboilered is assumed to be anything up to, but
not including, any '{' character. The remainder of the line (including the
'{' is assumed to be a note and is preserved across reboilering.

Primary Input File - {BIBLIODIR}xyzzy.TXT
-----------------------------------------

The primary input file is a bibliography text file conforming to the (unwritten)
bibliography text file format rules. The program allows you to enter just the
sub-directory and file name, prefixing the former with the bibliography root
directory and appending ".txt" to the latter.

The program will first attempt to open the file as specified. If this fails,
and an explicit device was NOT given, then the program will attempt to open a
file of the given name relative to the directory specified by the environment
variable BIBLIODIR.

Secondary Input File - {BIBLIODIR}BOILER.BKS
--------------------------------------------

The secondary input file is the boilerplate anthology entry file. This has
a fixed name and location. The format of the contents of this are key to
the reboilering exercise - see the file description for details.

Primary Output File - {related}xyzzy.TXT
----------------------------------------

The primary output file is a reboilered bibliography text file and is typically
created with the same file name as the input file (it insists on an extension of
".txt" but otherwise copies the input file specification). To minimize the
chance of losing any data the output file is first created with a temporary name
and is only renamed to the appropriate file name if the program completes
successfully. In addition, any existing file with the same name as the output
file will be renamed to a file whose first character has been replaced by a "$"
(e.g. "$evv.txt").

If the program aborts (or is aborted) partway through then the file will be left
with the temporary name and must be deleted by hand (all such file names start
with "_"). In this case no damage will be done to the input file.

Diagnostic File - {related}REBOILER.PRT
---------------------------------------

This output file contains a copy of any diagnostics output by the program that
relate to the reboilering exercise. In particular, this contains all unmatched
entries that possibly need to be added to the boilerplate file.

The file will be created in the same device/directory that contains the primary
input file and will be called "reboiler.prt".

Command Line Options
--------------------

None

Version History
---------------

V2.00 - April 1996

Outstanding Issues
------------------

1. Ignore translations


RENUMBER - Renumber entries in bibliography

This program renumbers a bibliography text file. It scans the file twice,
first compiling a list of all entry numbers (e.g. A24, B19.65) and their
renumbered equivalents, and then goes through the file again replacing all the
old values with new values. It assumes that all occurrences of entry numbers
(other than the entries themselves) will either be in section 'C' or will be
contained within square brackets.

Note that numbering is restarted at 1 whenever a new section is encountered.
For this purpose a new section is defined as a line that has more than 5
characters of which the first 2 are spaces, the 3rd is an upper case alphabetic
character and the 4th is a dot. Note also that an entry number is defined as
the start of a line which has either a space or a letter in the range 'A' to
'Q' in column 1, a dot in column 6 and numbers to the left (and possibly the
right) of the dot (Xnnn.[mm]).

Primary Input File - {BIBLIODIR}xyzzy.TXT
-----------------------------------------

The primary input file is a bibliography text file conforming to the (unwritten)
bibliography text file format rules. The program allows you to enter just the
sub-directory and file name, prefixing the former with the bibliography root
directory and appending ".txt" to the latter.

The program will first attempt to open the file as specified. If this fails,
and an explicit device was NOT given, then the program will attempt to open a
file of the given name relative to the directory specified by the environment
variable BIBLIODIR.

Primary Output File - {related}xyzzy.TXT
----------------------------------------

The primary output file is a renumbered bibliography text file and is typically
created with the same file name as the input file (it insists on an extension of
".txt" but otherwise copies the input file specification). To minimize the
chance of losing any data the output file is first created with a temporary name
and is only renamed to the appropriate file name if the program completes
successfully. In addition, any existing file with the same name as the output
file will be renamed to a file whose first character has been replaced by a "$"
(e.g. "$evv.txt").

If the program aborts (or is aborted) partway through then the file will be left
with the temporary name and must be deleted by hand (all such file names start
with "_"). In this case no damage will be done to the input file.

Diagnostic File - {related}RENUMBER.PRT
---------------------------------------

This output file contains a copy of any diagnostics output by the program that
relate to the renumbering exercise.

The file will be created in the same device/directory that contains the primary
input file and will be called "renumber.prt".

Command Line Options
--------------------

None

Version History
---------------

2.00 - April 1996

Outstanding Issues
------------------

None


SPLITBOK - Convert SBOOKS file into Locus/NotLocus files

This program converts a UK (SBOOKS) data file containing a mixture of records
that are of interest to Charlie and records that are not into two separate files
- one containing the former and one the latter. The program prompts for the last
month that is of interest to Charlie (this must be entered in the format YYMM)
and then splits the SBOOKS file into an LBOOKS file and an NBOOKS file as
follows:

a) If an entry contains a DQN or DQX record, then it will unilaterally be output
to the NBOOKS file.
b) Otherwise, if the publication date of an entry is after the last month
specified then the entry will be output to the NBOOKS file.
c) Otherwise the entry will be output to the LBOOKS file. For all such entries,
if the publication date is specified as a "season" then the last month of the
season is specified instead.

Primary Input File - {LOCUSDIR}SBOOKS.xxx
-----------------------------------------

The primary input file is a UK data file conforming to the UK version of the
Locus Format rules. The program allows you to enter either the month
abbreviation (e.g. 959) on its own or a full file specification. In the former
case the program will prefix "sbooks." to the abbreviation to create a file name.

The program will first attempt to open the file as specified. If this fails,
and an explicit device/directory was NOT given, then the program will attempt to
open a file of the given name in the director(ies) specified by the environment
variable LOCUSDIR.

Primary Output File - {related}LBOOKS.xxx
-----------------------------------------

The primary output file is a data file conforming to the UK version of the Locus
Format rules, containing only those records that are of interest to Charlie.

The file will be created in the same device/directory that contains the primary
input file and will be called "lbooks.xxx" where "xxx" is the 'extension' of the
input file (i.e. the month abbreviation).

Secondary Output File - {related}NBOOKS.xxx
-------------------------------------------

The secondary output file is a data file conforming to the UK version of the
Locus Format rules, containing only those records that are NOT of interest to
Charlie.

The file will be created in the same device/directory that contains the primary
input file and will be called "nbooks.xxx" where "xxx" is the 'extension' of the
input file (i.e. the month abbreviation).

Command Line Options
--------------------

The name (or abbreviation) of the primary input file may be specified on the
command line as in:

splitbok 963

If the name is specified, then the last month of interest may also be specified
as in:

splitbok fth 9703

Version History
---------------

V2.00 - April 1996

Outstanding Issues
------------------

None


SPLITFIL - Split Text File into Smaller Files

This program splits a text file into one or more separate text files, each of
which is no larger than a specified size. This makes it easy to copy a text
file that is larger than 1.4Mb via floppy disks.

Primary Input File - as specified
---------------------------------

The primary input file is any text file and its name must be specified in full.

Primary Output Files - xyzzynn
------------------------------

The primary output files are text files whose names are created by appending a
number to the output file specification given. Thus, for instance, a
specification of "temp." will create files "temp.1", "temp.2" and so on.

Command Line Options
--------------------

This program can only be run from the command line and requires a command
of the form:

splitfile infile outfile -snnn

where "infile" is the name of the input file; "outfile" is the root of the
output file; and "nnn" is the maximum number of bytes to put in each output
file segment.

Version History
---------------

None

Outstanding Issues
------------------

None


TRANSLTE - Translate Accents in Text File

This program translates all accents in a text file from the US format to the
expanded format, or vice versa.

Primary Input File - {LOCUSDIR}xyzzy
------------------------------------

The primary input file is any text file.

The program will first attempt to open the file as specified. If this fails,
and an explicit device/directory was NOT given, then the program will attempt to
open a file of the given name in the director(ies) specified by the environment
variable LOCUSDIR.

Primary Output File - {related}xyzzy
------------------------------------

The primary output file is a translated text file and is created with the same
file name as the input file. To minimize the chance of losing any data the
output file is first created with a temporary name and is only renamed to the
appropriate file name if the program completes successfully. In addition, any
existing file with the same name as the output file will be renamed to a file
whose first character has been replaced by a "$" (e.g. "$books.tmp").

If the program aborts (or is aborted) partway through then the file will be left
with the temporary name and must be deleted by hand (all such file names start
with "_"). In this case no damage will be done to the input file.

Command Line Options
--------------------

None

Version History
---------------

None

Outstanding Issues
------------------

1. Cope with non-printing characters with no translation
2. Handle US divider


TSTAUTH - Test Harness for SPLIT/BUILD_AUTH

This program is just a simple test harness for some of the routines in
AUTH_RTN.C.


TWOSIDE - Convert Bibliography to 2-sided Text File

This program re-orders the pages of a bibliography print file (and its associated
files) so that they are suitable for two-sided printing.

Primary Input File - {BIBLIODIR}xyzzy.PRT
-----------------------------------------

The primary input file is a bibliography print file as created by PAGINATE.
The program allows you to enter just the sub-directory and file name, prefixing
the former with the bibliography root directory and appending ".prt" to the
latter. An explicit device/directory may be specified, but an extension MUST
NOT be specified.

The program will first attempt to open the file as specified. If this fails,
and an explicit device was NOT given, then the program will attempt to open a
file of the given name relative to the directory specified by the environment
variable BIBLIODIR.

Secondary Input File - {BIBLIODIR}xyzzy.TOC
-------------------------------------------

The first secondary input file is a bibliography table of contents file as
created by PAGINATE. The program looks for a file with the same name as the
print file (see above) but with an extension of ".toc".

The program will first attempt to open the file as specified. If this fails,
and an explicit device was NOT given, then the program will attempt to open a
file of the given name relative to the directory specified by the environment
variable BIBLIODIR.

Secondary Input File - {BIBLIODIR}xyzzy.HDR
-------------------------------------------

The next secondary input file is a bibliography header file, created by hand,
containing the current list of available titles. The program looks for a file
with the same name as the print file (see above) but with an extension of ".hdr".

The program will first attempt to open the file as specified. If this fails,
and an explicit device was NOT given, then the program will attempt to open a
file of the given name relative to the directory specified by the environment
variable BIBLIODIR.

Secondary Input File - {BIBLIODIR}xyzzy.INT
-------------------------------------------

The next secondary input file is a bibliography introduction file, created by
hand, containing the introduction to the bibliography. The program looks for
a file with the same name as the print file (see above) but with an extension
of ".int".

The program will first attempt to open the file as specified. If this fails,
and an explicit device was NOT given, then the program will attempt to open a
file of the given name relative to the directory specified by the environment
variable BIBLIODIR.

Primary Output File - {related}xyzzy.2SD
----------------------------------------

The primary output file is a 2-sided bibliography print file, suitable for
reading into Microsoft Word (or equivalent package) for final formatting.

The file will be created in the same device/directory that contains the input
file and will be called "xyzzy.2sd" where "xyzzy" is the 'file name' of the input
file.

Diagnostic File - {related}TWOSIDE.PRT
--------------------------------------

This output file contains a copy of any diagnostics output by the program that
relate to the exercise.

The file will be created in the same device/directory that contains the primary
input file and will be called "twoside.prt".

Command Line Options
--------------------

None

Version History
---------------

V2.00 - April 1996

Outstanding Issues
------------------

None


VALIDATE - Validate contents of an (S)BOOKS file

This program attempts to validate the contents of a UK (SBOOKS) or US (BOOKS)
data file to ensure that they conform to the Locus Format rules. The checks
performed are two numerous to list, but each diagnostic message should be
self-explanatory. Note that this program is purely advisory - it may report
problems with valid entries and miss problems in invalid entries - but it will
pick up many common mistakes.

Primary Input File - {LOCUSDIR}SBOOKS.xxx
-----------------------------------------

The primary input file is a UK data file conforming to the UK version of the
Locus Format rules, or a US data file conforming to the US version of the rules.
The program allows you to enter either the month abbreviation (e.g. 959) on its
own or a full file specification. In the former case the program will prefix
"sbooks." to the abbreviation to create a file name.

The program will first attempt to open the file as specified. If this fails,
and an explicit device/directory was NOT given, then the program will attempt to
open a file of the given name in the director(ies) specified by the environment
variable LOCUSDIR.

Secondary Input File - {LOCUSDIR}ABBR.IDX
-----------------------------------------

This file defines the type of entry associated with a given three letter
abbreviation (i.e. #nn, vnnmm or MMMDD). Note that for any abbreviations not
listed in this file, the program will assume magazines use the MMMDD format and
book series use #nn.

The program will first attempt to open "abbr.idx" in the current directory. If
this fails, then the program will attempt to open "abbr.idx" in the director(ies)
specified by the environment variable LOCUSDIR.

Secondary Input File - {LOCUSDIR}ABBREV.CVT
-------------------------------------------

This file defines all official abbreviations as established by Bill in the US.
The program uses it to check the validity of abbreviations in the file.

The program will first attempt to open "abbrev.cvt" in the current directory.
If this fails, then the program will attempt to open "abbrev.cvt" in the
director(ies) specified by the environment variable LOCUSDIR.

Secondary Input File - {LOCUSDIR}ABBREV.NEW
-------------------------------------------

This file defines any abbreviations that have been defined in the UK and which
have not yet been incoporated in ABBREV.CVT. The program uses it as a
supplement to ABBREV.CVT.

The program will first attempt to open "abbrev.new" in the current directory.
If this fails, then the program will attempt to open "abbrev.new" in the
director(ies) specified by the environment variable LOCUSDIR.

Secondary Input File - {LOCUSDIR}PUBL.IDX
-----------------------------------------

This file defines all known publisher names and their countries of origin. The
program uses it to check that all publisher names used in the file are valid in
context.

The program will first attempt to open "publ.idx" in the current directory. If
this fails, then the program will attempt to open "publ.idx" in the director(ies)
specified by the environment variable LOCUSDIR.

Diagnostic File - {related}VALIDATE.PRT
---------------------------------------

This output file contains a copy of any diagnostics output by the program caused
by problems with the format of the input file.

The file will be created in the same device/directory that contains the primary
input file and will be called "validate.prt".

Command Line Options
--------------------

The name (or abbreviation) of the primary input file may be specified on the
command line as in:

validate 959

Version History
---------------

V2.00 - April 1996

Outstanding Issues
------------------

1. Titles (A1, AS, AR)
2. Note text (D1, EB, ED)
3. Previous Edition Date (DE)
4. Alternate Edition Type (DH)
5. First Edition Date & Bits (DP)
6. Book Description (DP)
7. Volume Number (DS)
8. Series Title (DS, EA)
9. Series Type (DS)
10. E Record Page Number
11. Story Title (EA, ED/2, EI)
12. ED1 Publication Details
13. ED1 Additional Notes
14. ED2 Publication Details
15. Interview Authors (EI)
16. Extended Author Checks (VAL_AUTHORS)
17. Disallow type 'B' for any except 'nf'
18. Special 'D' records (DQB/DQD/DQF/DQN/DQQ/DQX)
19. "Must Read" flag on DQR record.
20. EC records
20. Special 'E' records (DQD/DQF/DQM)
21. DAW book number in ISBN