Contents of the BOOKINV.DOC file
BOOK INVENTORY TEMPLATE FOR BUTTONWARE'S PC-FILE+
This template is designed to maintain an inventory of your books. This
system will allow you to keep track of each book's location and record
their value for insurance purposes.
Included with the system:
BOOKINV.DOC - Documentation for Book Inventory System
BOOKINV.HDR - Pre-defined database structure
BOOKINV.DTA - Database with sample records
BOOKINV.INX - Index to sample database
BOOKINV.KEY - Pre-defined smart keys
BOOKLOAN.REP - "Books on Loan" Report
BOOKLIST.EXE - Program to create listings of inventory database (v1.0)
BOOKPRT.PRO - Printer control codes for BOOKLIST
MENU.BAT - Batch job Menu to execute various system functions
ASK.COM - Program to allow interacting with a batch job
DATABASE STRUCTURE AND DESCRIPTIONS
The database BOOKINV contains 9 fields for a record length of 257
Field Name Length Data Entry Mask
---------- ------ ---------------
CATEGORY# 2 :09:
COVER 1 :DUPE*AHHPP:
COST# 6 (COST#*1).2
ON_LOAN 1 :YYNN: "N"*A
AUTHOR: The author(s) of the book. If the "~" option is used, the
program will flip the data the same as the PC-FILE+ report
TITLE: Title of the book.
CATEGORY: One of the valid categories listed on the data entry
COVER: H for hard bound or P for paper back.
COST: Value of the book.
LOCATION: Where the book is stored. Optionally, you can put the
person's name if the book is on loan.
ON_LOAN: Either Y or N.
COMMENTS_1: The comment fields can be used anyway you want. However,
the "on loan" report assumes COMMENTS_1 contains
information concerning the loaning of the book.
COMMENTS_2: See COMMENTS_1
REPORTS AND SMART KEYS
Three of the twelve smart keys have been pre-defined;
#1 - Sort Database by Category, Author and Title
#2 - Sort Database by Location, Category, Author and Title
#4 - Create the "Book Titles On Loan" report
There are two reports. The On Loan report, created by the PC-FILE+
report generator. This report simply prints the Location, Author, Title,
Cover, and Comments_1 if the On_loan field is equal to "Y". The other
report is external to PC-FILE+ and is generated by the program
BOOKLIST creates a listing of the book inventory database and includes
Category, Author, Title, Cover and Location. In addition, a totals page
is created, listing total number of books and cost for each individual
category as well as totals for all categories. The program page breaks
on category, and assumes the files BOOKINV.HDR, BOOKINV.DTA and
BOOKINV.INX are on the current directory path, and in category sequence.
These defaults can be overridden by entering a different drive/path
and/or the keyword "LOC" on the command line. "LOC" will cause the
program to page break on location, and will expect the database to be
sorted by location.
i.e. BOOKLIST A:\ LOC (files are on drive A:, sorted by Location)
When executed, BOOKLIST will display a menu of the available category
choices, and a description of each. Refer to figure 1 for a sample
display of the menu. The same category descriptions are printed at the
top of each page on the BOOKLIST report, unless the location option is
selected, then the location will print at the top of each page. The menu
allows selecting only specific categories, by separating each request
with a semicolon (1; 5; 10), printing every category by entering ALL, or
print only the totals page by entering the category 99. This allows
printing only the categories that have been updated instead of the entire
database. A revision date prints at the bottom of each page. The totals
page will always print and include ALL categories, regardless of how many
categories you select.
The program will display a warning message if the database is not sorted
in the sequence expected. An error report is generated if any of the
records have an invalid category. The error report will include the
relative record number to facilitate corrective action.
BOOKLIST obtains valid category numbers and descriptions from the file
BOOKINV.HDR. This may seem a bit unconventional, but it does serve
1. The current categories will always be displayed whenever you add
or modify records.
2. BOOKLIST will always have the current categories and descriptions
without having to maintained a separate database.
3. The categories can easily be maintained using the PC-FILE+
For BOOKLIST to be successful, certain rules must be followed for
BOOKINV.HDR. Figure 2 is the data entry screen from the pre-defined
database structure. Even though the maximum of 30 categories have been
identified, only 18 of them are "active" and recognized by BOOKLIST. The
others are provided for example only and can be removed if so desired.
To be an active category and recognized by the system, the entry must:
- begin with a number (1-30),
- followed by a dash,
- followed by the description (maximum 30 characters), and
- terminate with a semicolon.
A maximum of two categories per line is permitted.
The file BOOKPRT.PRO is used by BOOKLIST to send various control codes to
the printer, and is set up for the EPSON-FX series. If your printer uses
different codes, you will have to modify the printer profile file.
Figure 3 shows the contents for the pre-defined printer profile, and
contains comments on how to modify the file for a different printer.
You will also have to modify the control codes in BOOKLOAN.REP.
Figure 1: BOOKLIST Selection Menu
v1.0 BOOK INVENTORY REPORT SELECTION MENU
TO PRINT SELECTED BOOK CATEGORIES; ENTER THE NUMBER(S) SEPARATED BY ';'
(I.E. 1;5;13 for categories 1,5 & 13 or ALL for every category)
1 - COOKBOOKS 16 - HISTORY
2 - CHILDRENS 17 - DO IT YOURSELF/SKILLS
3 - CRAFT/HOBBY/DECORATING 18 - ART
4 - FARM/PETS/DO IT YOURSELF
5 - FICTION
6 - NONFICTION
7 - REFERENCE
8 - TEXT/TECHNICAL
9 - HUMOR/PUZZLES
10 - PHOTOGRAPHY
11 - POETRY
12 - GARDENING/NATURE
13 - TRAVEL
14 - SHORT STORIES/COLLECTIONS
15 - SCIENCE, MEDICAL & TECHNOLOGY
Figure 2: BOOKINV.HDR Data Entry Screen
Record number 1 A
AUTHOR [ ]
TITLE [ ]
CATEGORY [ ] COVER [ ] COST [ ] LOCATION [ ]ON_LOAN [ ]
COMMENTS_1 [ ]
COMMENTS_2 [ ]
* * * * * * * * * * * * * * * * * CATEGORIES * * * * * * * * * * * * * * *
01 - COOKBOOKS; | 16 - HISTORY;
02 - CHILDRENS; | 17 - DO IT YOURSELF/SKILLS;
03 - CRAFT/HOBBY/DECORATING; | 18 - ART;
04 - FARM/PETS/DO IT YOURSELF; | 19 -
05 - FICTION; | 20 -
06 - NONFICTION; | 21 -
07 - REFERENCE; | 22 -
08 - TEXT/TECHNICAL; | 23 -
09 - HUMOR/PUZZLES; | 24 -
10 - PHOTOGRAPHY; | 25 -
11 - POETRY; | 26 -
12 - GARDENING/NATURE; | 27 -
13 - TRAVEL; | 28 -
14 - SHORT STORIES/COLLECTIONS; | 29 -
15 - SCIENCE, MEDICAL & TECHNOLOGY; | 30 -
Please respond. Press (F10) when complete.
Figure 3: Printer Profile (BOOKPRT.PRO)
Printer control codes for the BOOK INVENTORY SYSTEM
Set up for the EPSON-FX printer series.
Each print code is prefix with an identification code that begins with a
slash and ends with a colon. The printer codes are separated by a comma,
and the last code must end with a colon. Any data after that colon is
considered a comment and is ignored by the program.
/N:65: NUMBER OF LINES PER PAGE
/P:12: FORM FEED
/R:27,64: RESET PRINTER
/E+:27,69: EMPHASIZED MODE ON
/C+:15: COMPRESSED MODE ON
/EX+:27,87,1: EXPANDED WIDTH MODE ON
/U+:27,45,1: UNDERLINE MODE ON
MODIFYING DATABASE STRUCTURE
Because of the external program BOOKLIST, the database structure cannot
be modified. You may, however, rename existing fields and change their
edit masks. This may also require changes to the sort smartkeys and the
PC-FILE+ report formats.
To modify the categories:
1. Select the CLONE option from the PC-FILE+ Utility Menu.
2. Modify the categories as required. Be sure to follow the format
exactly as described earlier (number, dash, desc, semicolon).
3. Press F10 to enter the new screen layout.
4. Enter 'N' for data entry sequence change.
5. Press F10 for each database field (nine times).
6. PC-FILE+ will then ask whether you want to CLONE a new database or
modify the screen. Enter "M" to modify screen only.
IMPORTANT: If this option does not appear, you have inadvertently
modified a field size. Press until you get back to the
utility menu and try again.
If you execute BOOKLIST and one or more of your categories does not
appear, the format in BOOKINV.HDR is incorrect. Just reenter PC-FILE+
and repeat the above steps.
MENU SELECTION BATCH JOB
The batch job MENU.BAT was included to provide a simple menu for
executing the various system options. The program ASK.COM is used to
capture keyboard input and set the DOS errorlevel code according to the
input. ASK.COM is a public domain program that I did not write.
Therefore, I can't do anything about its functionality. However, it does
work well for the menu job. To execute the menu, type MENU and press
enter. You will be presented with mulitple options. Key the letter for
the option you want, then press enter. The menu will redisplay when that
options function has completed.
The menu assumes the inventory files and programs are in the directory
C:\PCF\BOOK, which of course you can change. The menu will also display
a message concerning the sequence of the database, which can be:
1. The database is NOT in sequence. The menu assumes the database
was updated when update events option was selected.
2. The database is in CATEGORY sequence.
3. The database is in LOCATION sequence.
The message helps to determine what sort is required, if any, before a
given report is generated.
The menu job also assumes the pre-defined sort keys (discussed earlier)
have not been changed. If so, you will have to change the KEYIN options
When you are done playing with the sample records, delete the datasets
BOOKINV.DTA and BOOKINV.INX. DO NOT delete BOOKINV.HDR. When you go to
add your own data, PC-FILE will re-create the .DTA and .INX datasets.
If you have a variable length sequential book inventory file you've
created with an editor, MCOPY in the IBMSW forum will convert the file to
a fixed length random file for importing to PC-FILE. In addition, MCOPY
will initialize fields, copy only selected records, and/or replace data
string values. Very useful for purging or creating test files.
BOOKLIST and the BOOKINV template were written by Dean Ammons for the IBM
PC using DOS 2.0 to 3.2. NOT FOR SALE OR HIRE.
The template is for PC-FILE+ only, and cannot be used with previous
versions of PC-FILE.
BOOKLIST is supplied for personal, private use. Feel free to
distribute BOOKLIST given these restrictions:
* the program and the following files shall be supplied in their
original, unmodified forms:
BOOKINV.HDR BOOKINV.DOC BOOKPRT.PRO
BOOKINV.DTA BOOKINV.KEY MENU.BAT
BOOKINV.INX BOOKLOAN.REP ASK.BAT
* no fee is charged;
* for-profit use is prohibited;
* the program may not be included - or bundled - with other goods
or services. Exceptions may be granted upon written request only.
This applies to clubs and distributors, too.
Dean R. Ammons
1 Good Hope Road
Elkton, MD 21921