home *** CD-ROM | disk | FTP | other *** search
- The Quick and Dirty Report/Summary Utility for PC-FILE+ Databases
- (QDRSUM, Version 3.0)
-
- QDRSUM performs two functions: 1) detail reporting and 2) summary report-
- ing. Either or both functions may be requested. If a detail report is cho-
- sen, summary statistics are only compiled for up to two fields, the primary and
- secondary keys. Otherwise, statistics are generated for all specified fields.
-
- The detail report mode is chosen by specifying the /D (details) option.
- QDRSUM can create up to a two-tiered report for a PC-FILE+ database, using the
- first two fields named as the primary and secondary keys, and other fields for
- the report's detail lines. Whether to have keys (and tiering) is selected by
- the /1[s] and /2[s] options. Adding the "s" after the /1 or /2 causes summary
- subtotals to be included in the report.
-
- The output has a new page for each change in the primary key, unless the
- /R option is specified, and a new heading for each change in the secondary
- key. All other fields have their values printed as detail lines beneath any
- heading lines for each selected record in the data base. Blank lines from the
- detail fields are not printed. Options can be used to control indentation, and
- to print new lines as needed within the detail area.
-
- A title is specified by the /T option, and is printed with any primary key
- details or on a separate line if the /N option is used. Field headings may be
- printed at the top of each page, by use of the /H option. If headings are not
- used, detail information from fields can have trailing blanks removed, by use
- of the /B option.
-
- The file SELECT.DOC tells how to select the records for the report, and
- CATEGORY.DOC explains the special treatment of a field named CATEGORY#. The
- option /C turns off CATEGORY# translation. Fields with tilde (~) will usually
- be printed with that part following the tilde first, unless the /~ option is
- given.
-
- Call QDRSUM with no arguments to get a usage display screen. Call it with
- a question mark (?) to get full help screens. If no fields are given on the
- call line, QDRSUM shows the database structure, detailing field names, their
- sizes, the primary sort key for the index, if sorting has been done, and the
- approximate number of records in the database.
-
- QDRSUM examines the device characteristics of the standard output device
- and determines whether it is the console (screen) or some other device. If it
- is the console, the user is prompted at each "page" break. The /P overrides
- this, eliminating prompts and adding a formfeed. Use of the /F option avoids
- the formfeed. For all other devices, the page length is changed to 63 charac-
- ters, no prompts are used, and formfeeds are printed at each page break. If
- the page length is set to 0, page breaks will not be noted, and title breaks
- occur only when a primary or secondary key changes. (If this is confusing to
- you, imagine how it is to the program!)
-
- The next page shows the command line usage details. The letter n is used
- to indicate a decimal number is expected. Note that all options must be sepa-
- rated from other arguments, including other options, by at least one space.
- Wherever a quoted string is shown, spaces may appear between the quotation
- marks. The square brackets indicate optional parameters.
-
- QDRSUM Page 2
-
- QDRSUM COMMAND LINE PARAMETERS
-
- QDRSUM DATABASE [OPTS] [FN[/"Label"] [OPT] ...]] [!FL] [@REL [@RF [@OPT] ...]
- [>OUTPUT]
- where: " ... " indicates possible additional parameters similar to those pre-
- ceding the periods, and
-
- DATABASE is the name of the PC-FILE+ database, excluding extension.
-
- OPTS are from the following possible options:
-
- /- Database record structure display starts with byte 0, not 1
-
- /~ Do not perform tilde inversions on the contents of fields
-
- /# Place a page number at the top of each report page. Unless the
- galley option (/G) is used, it is always right-aligned.
-
- /1[S] Use first field named as a primary key. If S included, shows sum-
- mary statistics for the primary key. S is assumed if /D not used
-
- /2[S] Use second field as a secondary key, turns on /1 option. If S is
- included, shows secondary summary statistics, and turns on /1S.
- Detail lines are indented two spaces when /2 is on and /H is not
- specified. S is assumed if /D option not used
-
- /B Remove trailing blanks in field values. /H overrides this option
-
- /C Do not perform CATEGORY# translation (see CATEGORY.DOC)
-
- /G Perform galley proof function: even numbered pages will not have a
- left margin applied, and any page number is at the left on top.
-
- /L# Number of lines per screen/page (default = 24)
-
- /M# Number of spaces to precede each print line (left margin)
-
- /P Change defaults to those for a printer file, i.e. assume /L63, if /L
- not given, do not pause at each page break, and use form feeds,
- unless /F follows--not needed for redirected output.
-
- /F Do not use form feeds, even when /P is given
-
- /R Run various primary key header and detail lines together on the same
- page--do not force a new page at such database "breaks"
-
- /T"Title string" [/N] The title for top of each page (quotes required).
- Title is centered. If /N specified, title is printed separately,
- Otherwise, any primary key is printed next to the title.
-
- /U Perform case-sensitive comparisons with selection criteria
-
- /W# Screen or page width (default = 79). Controls centering of titles,
- make smaller with shorter detail lines for better appearance
- QDRSUM Page 3
-
- QDRSUM COMMAND LINE PARAMETERS, continued
-
- /D Include detail lines in the report. Makes options below valid:
-
- /A# Number of records to print across a page. Default is 1
-
- /H Print header line of field labels. Labels are, by default, the
- field names, overridden by any label string following a field name
-
- FN The name of a field in the database, selects the first field whose
- leading characters match those given on the command line
-
- "Label" A label to use in place of the field name within the report
-
- OPT is one of the following options:
-
- /I# Number of spaces to indent prior field (default is one space)
-
- /Ec 'c' is a character to print after prior field (overwrites /N)
-
- /N Place a new line after prior field (overwrites /E).
-
- FL File from which to read additional command line arguments. The only
- arguments not permitted in the file are the database name, another
- !FL specification, or redirection (which is handled by DOS). More
- than one line of arguments is allowed in the file FL.
-
- REL The name of a related database with a field identical to the first
- field (primary key) given for the database DATABASE. See page 10
-
- RF The name of a field in REL database, selects the first field whose
- leading characters match those given on the command line.
-
- OPT is as shown above, applied to the related database fields' displays
-
- >OUTPUT Sends report's output to a file named OUTPUT. If no redirection
- is specified, report goes to the screen. QDRSUM will take note
- if the output is redirected, and assume printer output format,
- using form feeds, length of 63 lines, if /L is not given, and
- will not pause at the end of each page.
-
-
- To set the stage for further explanations, let's use the output of a call
- on QDRSUM with only a data base name. The following, captured by redirection,
- shows the EMPLOYEE database layout:
-
-
- Field # 1 = Name is 20 bytes long, starting at byte # 1
- Field # 2 = Position is 26 bytes long, starting at byte # 21
- Field # 3 = sex is 1 bytes long, starting at byte # 47
- Field # 4 = dept is 16 bytes long, starting at byte # 48
- Field # 5 = empnum is 4 bytes long, starting at byte # 64
- Total record length = 68
-
- Database is unsorted
- Database has 1 records (some may be deleted)
- QDRSUM Page 4
-
- As you can see, it is a small company. Actually, we just took the snap-
- shot after only one entry was put in. It is also unsorted--PC-FILE+ has not
- marked the index with a sort key.
-
- The above layout only shows the structure, not how the database is used.
- Below is the intended use for each field:
-
- NAME: Last name, followed by ~, followed by First name
- POSITION: Job title
- SEX: F(emale) or M(ale)
- DEPT: Name or number of department
- EMPNUM: Employee Identification Number
-
- As mentioned above, QDRSUM has two main functions, summary and detail
- report creation. Let's first examine the summary functions, using the above
- database, plus two others.
-
-
- SUMMARY REPORT FUNCTION
-
- Subtotals are maintained for all fields named, if detail reporting is not
- requested. At most two subtotals are maintained for detail reporting. A sub-
- total is produced for a field whenever its value or that of an earlier named
- field changes. The point in the database where such a change takes place is
- called a break. Subtotals are printed for the rightmost field on the command
- line and back to the leftmost field for which the break applies.
-
- Using the EMPLOYEE database, let's fill in a few entries and see how the
- subtotals go. The listing below shows the database:
-
- Report for database EMPLOYEE
-
- Dept Position S Name EmpN
- ================ ========================== = ==================== ====
- Bear Family Bottle Washer M Father Bear 0001
- Bear Family Chief Cook F Mother Bear 0002
- Bear Family Food Eater & Bed Messer F Sister Bear 0005
- Bear Family Food Eater & Bed Messer M Baby Bear 0003
- Human Family Food Eater & Bed Messer F Goldilocks 0004
- =======================================================
-
- There are a total of 5 matching records in the database
-
- The database was sorted by Dept, Position, Sex, and then Name, so it was
- easiest to display it in the same order. It's a silly example, but bear with
- me (sorry about that) and maybe things will become clearer.
-
- To get meaningful summary statistics, fields should appear on the call
- line in the same order they were specified to the PC-FILE+ SORT procedure. The
- summary report shows totals, subtotals, etc., for each of the fields named on
- the call line, including every record chosen by the selection criteria.
- QDRSUM Page 5
-
- With the database sorted by DEPARTMENT, POSITION, and SEX, the call:
-
- QDRSUM EMPLOYEE /B D P S >C:DEPTSUM
-
- shows how many female employees hold a particular position in a department, how
- many males hold the same position, and a subtotal of how many employees hold
- that position in a department. The next level subtotal tells how many
- employees are in the department, then similar summaries are given for other
- departments, and the grand total gives the total employees in the database.
-
- Below is the result from our sample database:
- Report for database EMPLOYEE
-
- 1 record has Sex=M & Position=Bottle Washer & Dept=Bear Family
- ----------------------------------------------------------
- 1 record has Position=Bottle Washer & Dept=Bear Family
-
- 1 record has Sex=F & Position=Chief Cook & Dept=Bear Family
- -------------------------------------------------------
- 1 record has Position=Chief Cook & Dept=Bear Family
-
- 1 record has Sex=F & Position=Food Eater & Bed Messer & Dept=Bear Family
- 1 record has Sex=M & Position=Food Eater & Bed Messer & Dept=Bear Family
- --------------------------------------------------------------------
- 2 records have Position=Food Eater & Bed Messer & Dept=Bear Family
-
- -----------------------------------
- 4 records have Dept=Bear Family
-
- 1 record has Sex=F & Position=Food Eater & Bed Messer & Dept=Human Family
- ---------------------------------------------------------------------
- 1 record has Position=Food Eater & Bed Messer & Dept=Human Family
-
- ------------------------------------
- 1 record has Dept=Human Family
-
- =======================================================
-
- There are a total of 5 matching records in the database
-
-
- To produce a report summarizing employees by sex and by position within a
- department: sort the database by SEX, POSITION, and DEPARTMENT. The call:
-
- QDRSUM EMPLOYEE /B SEX POS DEP >C:EMPSEX.SUM
-
- produces a summary showing how many female employees hold each position within
- each department, and subtotals of how many female employees hold each position
- within the company, and a final subtotal of how many female employees there are
- in the database. Then the same information would be given for the male
- employees. Finally, a grand total of how many employees are in the employee
- database is printed.
-
- The listing on the next page shows the output for our sample database:
- QDRSUM Page 6
-
- Report for database EMPLOYEE
-
- 1 record has Dept=Bear Family & Position=Chief Cook & Sex=F
- --------------------------------------------
- 1 record has Position=Chief Cook & Sex=F
-
- 1 record has Dept=Bear Family & Position=Food Eater & Bed Messer & Sex=F
- 1 record has Dept=Human Family & Position=Food Eater & Bed Messer & Sex=F
- ---------------------------------------------------------
- 2 records have Position=Food Eater & Bed Messer & Sex=F
-
- ------------------------
- 3 records have Sex=F
-
- 1 record has Dept=Bear Family & Position=Bottle Washer & Sex=M
- -----------------------------------------------
- 1 record has Position=Bottle Washer & Sex=M
-
- 1 record has Dept=Bear Family & Position=Food Eater & Bed Messer & Sex=M
- ---------------------------------------------------------
- 1 record has Position=Food Eater & Bed Messer & Sex=M
-
- ------------------------
- 2 records have Sex=M
-
- =======================================================
-
- There are a total of 5 matching records in the database
-
-
- For a second example, consider a database, CATALOG, taken from my CATDISK
- template, whose records have the following fields:
-
- FILENAME: file name, including extension
- VOL_NAME: volume label of diskette containing the file
- SIZE: size of the file
- DATE: date of creation or last update for the file)
- CATEGORY: type of file--Communications, Database, etc.
- CAT_GRP: used to group many files of one category together
- DESCRIPTION: Describes the specific function of the file
-
- The database layout shown by QDRSUM CATALOG is:
-
- Field # 1 = File_Name is 12 bytes long, starting at byte # 1
- Field # 2 = Date is 8 bytes long, starting at byte # 13
- Field # 3 = Size is 6 bytes long, starting at byte # 21
- Field # 4 = Vol_Name is 11 bytes long, starting at byte # 27
- Field # 5 = Category is 10 bytes long, starting at byte # 38
- Field # 6 = Cat_Grp is 2 bytes long, starting at byte # 48
- Field # 7 = Description is 37 bytes long, starting at byte # 50
- Total record length = 87
-
- Database is sorted by File_Name
- Database has 4181 records (some may be deleted)
- QDRSUM Page 7
-
- The following produces a summary of the number of files per category, plus
- a count of all files in the catalog:
-
- QDRSUM B:CATALOG CATEGORY
-
- The printout below is the tail end of the output from the call above:
-
- 6 records have Category=PROJ.MGMT.
- 11 records have Category=RAM DISK
- 15 records have Category=SORT UTIL.
- 35 records have Category=SORTED DIR
- 19 records have Category=SOUND EFF.
- 12 records have Category=SPOOLER
- 121 records have Category=SPREADSHT.
- 29 records have Category=STATISTICS
- 5 records have Category=SUPT.DECIS
- 111 records have Category=TEXT EDIT.
- 59 records have Category=UNKNOWN
- 211 records have Category=VARIOUS
- ==========================================================
-
- There are a total of 4181 matching records in the database
-
-
- Full field names are not required, just enough characters to distinguish
- field names from each other. The call above could have been:
-
- QDRSUM B:CATALOG C
-
- The following call produces a summary of the number of files per volume
- per category, plus associated subtotals, for categories beginning with the
- letter "A" to categories beginning with the letter "P":
-
- QDRSUM B:CATALOG CATEGORY VOL_NAME/"Volume Name"
- CATEGORY>="A" & CATEGORY<="P"
-
- The printout below shows the first few lines of output from the above call:
-
- Report for database B:CATALOG
-
- 1 record has Volume Name=023WPC701 & Category=AID: ASSMY
- 1 record has Volume Name=024WPC702 & Category=AID: ASSMY
- 2 records have Volume Name=028WPC902 & Category=AID: ASSMY
- 1 record has Volume Name=037LANG01 & Category=AID: ASSMY
- 1 record has Volume Name=052MISCEL03 & Category=AID: ASSMY
- 9 records have Volume Name=070BCGI10 & Category=AID: ASSMY
- 9 records have Volume Name=085BCGI25 & Category=AID: ASSMY
- 7 records have Volume Name=119NY83JUL & Category=AID: ASSMY
- 3 records have Volume Name=121NY84JAN & Category=AID: ASSMY
- 1 record has Volume Name=141NY86AUG & Category=AID: ASSMY
- ---------------------------------------
- 35 records have Category=AID: ASSMY
-
- 3 records have Volume Name=004WPC303 & Category=AID: BASIC
- 1 record has Volume Name=005WPC304 & Category=AID: BASIC
- 6 records have Volume Name=023WPC701 & Category=AID: BASIC
- QDRSUM Page 8
-
- In both of the above cases, the database CATALOG should be sorted with
- CATEGORY as the primary sort key. In the second case, VOL_NAME should be a
- secondary sort key.
-
- By using a primary key, you can get a less repetitious printout:
-
- QDRSUM CATALOG CAT VOL/"Volume Name" /1S /P /L0 /F /T"CATALOG" /W44
-
- The above call eliminates form feeds and page breaks. As the line is
- shown, no redirection takes place, so output comes to the screen. Use Ctrl-S
- to stop the output as you wish, and Ctrl-C to terminate the program. I often
- use this technique to check out formats of output before final printing. The
- following shows the first few lines of the output from the above command:
-
- CATALOG, Category = AID: ASSMY
-
- 1 record has Volume Name=023WPC701
- 1 record has Volume Name=024WPC702
- 2 records have Volume Name=028WPC902
- 1 record has Volume Name=037LANG01
- 1 record has Volume Name=052MISCEL03
- 9 records have Volume Name=070BCGI10
- 9 records have Volume Name=085BCGI25
- 7 records have Volume Name=119NY83JUL
- 3 records have Volume Name=121NY84JAN
- 1 record has Volume Name=141NY86AUG
- -------------------------------------
- 35 records have Category=AID: ASSMY
-
- CATALOG, Category = AID: BASIC
-
- 3 records have Volume Name=004WPC303
- 1 record has Volume Name=005WPC304
- 6 records have Volume Name=023WPC701
-
- QDRSUM Page 9
-
- DETAIL REPORTING FUNCTION
-
- Let's now turn to the subject of detail reports. When /D is used on a
- call to QDRSUM, subtotals are not kept unless either /1S or /2S is used as
- well. The listing of the EMPLOYEE database on page 4 was created by:
-
- QDRSUM EMPLOYEE /D /H DEPT POSITION SEX NAME EMPNUM
-
-
- At the start of each new page, a title, either that given by the /T op-
- tion, or the phrase "Report of database" followed by the name of the database
- will be printed, centered within the limits given by the page width option,
- whose default value is 79 characters to prevent "bouncing" at end of line.
-
- Subtotals are maintained the same way as described above, and are shown
- after printing any requested detail fields for each selected record. Whenever
- a key field changes, any requested subtotals are printed. The subtotal is
- separated from the lines above by a line of dashes, and followed by a blank
- line. The key field for which the subtotal applies is shown, with the asso-
- ciated value.
-
- If only the secondary key changes and there is room on the page, a new
- subtitle line is printed with any associated detail lines from the current
- record. A subtitle line is not printed without the selected detail fields if
- there is not room before the bottom of the page. If subtotal lines do not all
- fit at the bottom of a page, a new subtitle will be printed on the next page
- with the subtotal. In the case of only the total for a primary key being
- pushed to the next page, only a title, and no subtitle line, precedes the total
- lines.
-
- The call below produces a listing of all employees, arranged by position
- within departments. A form feed is emitted for each new department, and sum-
- mary information follows each position and department listing:
-
- QDRSUM EMPLOYEE /D /B /2S DEPT POS NAME >DEPTPOS.LST
- QDRSUM Page 10
-
- Report for database EMPLOYEE, Dept = Bear Family
-
- Position = Bottle Washer
- Father Bear
- -------------------------------------
- 1 record has Position=Bottle Washer
-
- Position = Chief Cook
- Mother Bear
- ----------------------------------
- 1 record has Position=Chief Cook
-
- Position = Food Eater & Bed Messer
- Sister Bear
- Baby Bear
- -------------------------------------------------
- 2 records have Position=Food Eater & Bed Messer
-
- -------------------------------
- 4 records have Dept=Bear Family
-
- (A Form Feed was here)
- Report for database EMPLOYEE, Dept = Human Family
-
- Position = Food Eater & Bed Messer
- Goldilocks
- -----------------------------------------------
- 1 record has Position=Food Eater & Bed Messer
-
- ------------------------------
- 1 record has Dept=Human Family
-
- =======================================================
-
- There are a total of 5 matching records in the database
-
-
- To get a listing of each department's job positions and names of employ-
- ees holding each position followed by a comma after each name and the sex of
- the employee, sort the database by department, position, and employee name,
- then use the following:
-
- QDRSUM EMPLOYEE /D /2 DEPT POSITION NAME /E, SEX >DEPTPOS.LST
-
- The output is written to the file DEPTPOS.LST with form feeds at pages. The
- following is the result of running against our meager database:
- QDRSUM Page 11
-
- Report for database EMPLOYEE, Dept = Bear Family
-
- Position = Bottle Washer
- Father Bear, M
- Position = Chief Cook
- Mother Bear, F
- Position = Food Eater & Bed Messer
- Baby Bear, M
- Sister Bear, F
-
- (A Form Feed was here)
- Report for database EMPLOYEE, Dept = Human Family
-
- Position = Food Eater & Bed Messer
- Goldilocks, F
- =======================================================
-
- There are a total of 5 matching records in the database
-
-
- For another example, let's use a database named BOOKS, laid out like the
- the BOOKINV example from CATEGORY.DOC. Following is the database record struc-
- ture for BOOKS:
-
- Field # 1 = AUTHOR is 40 bytes long, starting at byte # 1
- Field # 2 = CATEGORY# is 2 bytes long, starting at byte # 41
- Field # 3 = TITLE is 60 bytes long, starting at byte # 43
- Field # 4 = COVER is 1 bytes long, starting at byte # 103
- Field # 5 = COST is 6 bytes long, starting at byte # 104
- Field # 6 = LOCATION is 17 bytes long, starting at byte # 110
- Field # 7 = ON_LOAN is 1 bytes long, starting at byte # 127
- Field # 8 = CR_DATE is 4 bytes long, starting at byte # 128
- Field # 9 = COMMENTS_1 is 65 bytes long, starting at byte # 132
- Field # 10 = COMMENTS_2 is 65 bytes long, starting at byte # 197
- Total record length = 262
-
- Database is sorted by CATEGORY#
- Database has 388 records (some may be deleted)
- Category # 1 = COOKBOOKS
- Category # 2 = CHILDRENS
- Category # 3 = CRAFT/HOBBY/DECORATING
- Category # 4 = FARM/PETS/DO IT YOURSELF
- Category #16 = HISTORY
- Category #17 = DO IT YOURSELF/SKILLS
- Category #18 = ART
- Category #19 = SCIENCE FANTASY
-
- The Category# translation list can be bypassed by calling QDRSUM with
- BOOKS /C
- QDRSUM Page 12
-
- The following call:
-
- QDRSUM BOOKS /D CAT AUTH TITLE /T"MY BOOKS"
-
- prints MY BOOKS , centered, at the top of each screen, CATEGORY = description
- or CATEGORY# = nn centered, authors from that category followed by the titles
- written by each author, pausing at the end of each full screen.
-
- For the next example, assume a file named ARTSEL contains the following:
-
- CAT="03"
- CAT="18"
-
- The following selects those books in the CRAFT/etc. and ART categories:
-
- QDRSUM BOOKS /D /T"ARTS & CRAFT BOOKS" /2 CAT AUTH TITLE <ARTSEL >PRN
-
- The output is sent to the printer (PRN), with form feeds issued at the end of
- each page. Each page has the title ARTS & CRAFT BOOKS.
-
-
- In our next example, detail lines from fields COMMENTS_1 and COMMENTS_2
- are printed below the books title, indented two additional spaces. If either
- field is blank, its line is not printed in the report. Since the COMMENTS
- fields are the longest, the page width is changed to account for this, so
- titles will be better centered on the report. An inch margin is made on the
- left for hole-punching. Output goes to a file named RPT:
-
- QDRSUM BOOKS /M10 /D /H"MY LIBRARY" /W69 C A T /N COM /I4 /N COMMENTS_2 /I4
- >RPT
-
-
- Returning to the CATALOG database, the following call, applied to the
- database after it was sorted by CATEGORY, CAT_GRP, and then FILENAME:
-
- QDRSUM CATALOG /F /D /H /1S CAT F/"FILE NAME" D S V/"VOLUME NAME" DE /W80
-
- produces a report looking like the following excerpt, with no form feeds:
-
- Report for database CATALOG, Category = AID: X-REF
-
- File Name Date Size Volume Name Description
- ============ ======== ====== =========== =====================================
- XC .ARC 87-06-21 28288 162TURBOC C Cross-reference Utility
- XREF .BAS 83-05-05 6016 023WPC701 Cross references variables in BASIC p
- XREF .DOC 80-01-01 888 023WPC701 Documentation & instructions for XREF
- XREF .EXE 82-08-31 28800 023WPC701 Faster cross referencing of BASIC var
- -------------------------------------
- 4 records have Category=AID: X-REF
- QDRSUM Page 13
-
- The following shows multiple records per line, with header lines:
-
- QDRSUM CATALOG /D /H F/"FILE NAME" V/"VOLUME NAME" C /A2 /W76
- F>="COMPUSRV" & F<="COMSPEC"
-
-
- produces a report looking like the following:
-
- Report for database CATALOG
-
- FILE NAME VOLUME NAME Category FILE NAME VOLUME NAME Category
- ============ =========== ========== ============ =========== ==========
- COMPUSRV.ARC 147COMMUN02 COMM.PROGM COMPUSRV.CMD 047PROCOMM COMM.PROGM
- COMPUSRV.TXT 013WPC401 INFORMATN. COMSPEC .ASM 121NY84JAN DOS UTIL.
- COMSPEC .DOC 121NY84JAN DOS UTIL.
- ==========================================================
-
- There are a total of 5 matching records in the database
-
- To show a use for the /G option, let me describe how I use it for making a
- listing of my PC Club's library, using a laser printer. We currently have
- about 4200 files in the library, spread across 170 diskettes. I can cause my
- laser printer to print 174 columns by 109 lines on an 8-1/2 by 11 inch paper,
- and still have it readable without a magnifying glass. I can put the entire
- library catalog, sorted by category on 24 pages by the following command:
-
- QDRSUM catalog c /1s f/"File Name" d s v/"Volume Name" des /D /H /# /G >PRN
- /T"PC Club Library" /M9 /A2 /W165 /L109 /R
-
- The above call comes close to the limit of 128 characters per input line,
- but it makes it. Using the more arguments file parameter (!filename) would
- allow for a cleaner and clearer invocation, as follows. Create a file called
- CATG.ARG with the following contents:
-
- /D /H /# /G /T"PC Club Library" /M9 /A2 /W165 /L109 /R
- CATEGORY /1S FILE/"File Name" DATE SIZE VOLUME/"Volume Name" DESCRIP
-
- Call the program with the following:
-
- QDRSUM CATALOG !CATG.ARG >PRN
-
- It produces a printout with a left margin wide enough for hole punching,
- and puts it in a galley proof format, so I can do two-sided photo-copying, and
- have the even number pages set up properly. Even numbered pages do not get
- indented, and the page number is put on the left side, preceding the centered
- title consisting of the phrase "PC Club Library, Category = " followed by the
- particular category starting at the top of the current page. The /R assures
- that a short category is not put on a page all alone. Categories will be run
- together, separated by two blank lines and headed by a new title and header
- lines. When the printed output is copied, odd numbered pages on the front and
- even numbered pages on the back, it produces a compact catalog on only twelve
- sheets of paper.
- QDRSUM Page 14
-
- I also use the following to create a listing of the database sorted by
- filename and volume name, which results in 11 pages, only 6 sheets of paper:
-
- QDRSUM catalog f/"File Name" v/"Volume Name" c /D /H /# /G /M15 /A4 /W156
- /L109 /T"PC Club Library Files" >PRN
-
- The above will show four columns of file name, volume name and category,
- of all files in the database. Notice that the placement of >PRN is different
- than on the prior call. At least for my versions of MSDOS 3.1 and 3.2, this
- works fine--you might want to check whether it matters for what you have.
- Notice that /R is not given--it has no meaning when there is no primary key.
-
- Note that the !moreargs provides for a clearer call line. Create a file
- named FILE.ARG, with the following lines:
-
- /D /H /# /G /M15 /A4 /W156 /L109 /T"PC Club Library Files"
- FILE/"File Name" VOLUME/"Volume Name" CATEGORY
-
- Call QDRSUM as follows to get the same effect:
-
- QDRSUM CATALOG !FILE.ARG >PRN
-
-
- RELATED DATABASE LOOKUP
-
- Arguments preceded with the '@' sign are for related database lookups.
- The first argument must give the name of a related database. The database
- named must have a field which has exactly the same name (except for capitaliza-
- tion) as that of the primary key specified for the primary database. The field
- must also be identical in size to the primary key.
-
- A relational lookup is performed by finding the first record in the relat-
- ed database which has the same value in the primary key field as that of the
- current record in the primary database. The contents of any of the fields in
- the selected record can be displayed whenever the primary key value changes, or
- at the start of a new page.
-
- The @/ options specify how to display the values, just as the correspond-
- ing / options do for the primary database's records. The following example is
- drawn from the CATDISK database.
-
- To make a Table of Contents file for one or more diskettes, create a file
- named TOC.ARG containing the following lines:
-
- /D /T"Table of Contents" /N /H
- V/"VOLUME" /1 F/"FILE NAME" /I0 S/SIZE /I1 D/DATE /I1 C/CATEGORY /I1
- DE/DESCRIPTION /I1
- @DISK @/E- @FREE @/N @DESC
-
- Calling with the following will make a Table of Contents for the diskette in my
- club's library labeled 001CATALOG:
-
- QDRSUM CATALOG @VOLCAT !TOC.ARG >001.TOC
- V="001"
-
- The output is shown at the top of the next page
- QDRSUM Page 15
-
- Table of Contents
-
- VOLUME = 001CATALOG
-
- Double-Sided 9-sect - 133K free
- Library Catalog Listing: Category < Games
-
- FILE NAME SIZE DATE CATEGORY DESCRIPTION
- ============ ====== ======== ========== =======================================
- CATGORY1.LST 213555 87-09-19 DSK.CATLOG Catalog Listing: Categories < Games
- ELITE .COM 256 85-03-27 PRINTER UT Sends code to Printer for Elite print
- FF . 1 87-09-19 PRINTER UT Form Feed Character
- LIST .COM 8191 87-07-05 FILE UTIL. Lets you browse through a file on scrn
- PRINT .BAT 25 86-03-24 PRINTER UT Prints catalog listing in elite font
- SEE .BAT 11 86-03-24 FILE UTIL. Lets you browse thru Catalog listing
- ==========================================================
-
- There are a total of 6 matching records in the database
-
-
- The "Double-Sided 9-sect " is the value of the field named DISK_TYPE in
- the database VOLCAT, for the record whose VOLUME_LABEL field has the value
- "001" in the first three characters. "133K free" came from the field named
- FREE_SPACE, and the line following was produced from a field named DESCRIPTION.
-
- You might notice that I did not put quotes (") around all of the labels.
- You really only need to use quotation marks if the label has spaces inside it,
- like "FILE NAME".
-
-
- I hope the above examples give you some idea of how you can use QDRSUM to
- get more out of your PC-FILE+ databases. If you have any comments or sugges-
- tions, please send them to me via COMPUSERV's EASYPLEX electronic mail.
-
- Archie Strong, COMPUSERV USERID: [73167,1205]
-