Category : Word Processors
Archive   : PAR.ZIP
Filename : INT.INF
Û°°°°°°°°°°°°°°°°°°°°°°°°° °°°°°°°°°°°°°°°°°°°°°°°°°°°Û
Û°°°°°°°°°°°°°°°°°°°°°°°°° PARSE-O-MATIC °°°°°°°°°°°°°°°°°°°°°°°°°°°Û
Û°°°°°°°°°°°°°°°°°°°°°°°°° °°°°°°°°°°°°°°°°°°°°°°°°°°°Û
ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
Copyright (C) 1992
by
Timothy Campbell
1250 Laird Apt. 1A
Mont Royal, Quebec
Canada H3P 2T2
(514) 345-9578
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
INTRODUCTION
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
WHAT IT IS
ÄÄÄÄÄÄÄÄÄÄ
There are plenty of programs out there that have valuable data locked away
inside them. How do you get that data OUT of one program and into another one?
Some programs provide a feature which "exports" a file into some kind of
generic format. Perhaps the most popular of these formats is the
"comma-delimited file", which is a text file in which each data field is
separated by a comma. Literal strings -- which might contain commas! -- are
represented in double quotes. So a few lines from a comma-delimited file might
look something like this (an export from a hypothetical database of people who
owe your company money):
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ "JONES","FRED","1234 GREEN AVENUE", "KANSAS CITY", "MO",293.64 ³
³ "SMITH","JOHN","2343 OAK STREET","NEW YORK","NY",22.50 ³
³ "WILLIAMS","JOSEPH","23 GARDEN CRESCENT","TORONTO","ON",16.99 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Unfortunately, not all programs export data in this format, and not all
programs READ data in that format. What's most annoying of all is when one
program exports data in a format that is ALMOST what you need!
If that's the case, you might find that it's worth your while to spend a few
hours in a text editor, modifying the export file so that the other program
can understand it. Or you might write a program to do the editing for you.
Both solutions are time-consuming.
An even more challenging problem arises when a program which has no export
capability DOES have the ability to "print" reports to a file. You can write a
program to read these files and convert them to something you can use, but this
can be a LOT of work!
Parse-O-Matic is a utility that interprets text files and converts them to
other formats. It can help you "boil down" reports into their essential data.
You can also use it to convert NEARLY compatible file formats.
As a demonstration, I have provided you with an example parsing job which reads
a report from an inventory system and produces a comma-delimited file.
WHAT IT RESEMBLES
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Parse-O-Matic resembles (in basic function) a $295 program named Monarch (which
I wasn't aware of until I saw an ad for it this morning). Since I'm only
asking for $25 for Parse-O-Matic, it looks like I'm offering a pretty good
deal. (By the way, Monarch is (TM) Personics Inc.)
Monarch's ad says that their program saved a client $95,000. If Parse-O-Matic
can save you that much -- for only $25 -- that's pretty darn good.
Parse-O-Matic seems to be a bit harder to use than Monarch, because the user
interface isn't as clever. I should also mention that since I haven't used
Monarch, I don't know how Parse-O-Matic's performance compares.
HOW IT WORKS
ÄÄÄÄÄÄÄÄÄÄÄÄ
You need three things:
1) The Parse-O-Matic program
2) A Parse-O-Matic "POM" file (to tell Parse-O-Matic what to do)
3) The input file
The input file is usually a report from another program. The example I've
provided (POMSAMPL.TXT) comes from the AccPac accounting software. AccPac is a
great program, but its export capabilities leave something to be desired.
After writing dozens of custom programs for a friend, to parse his AccPac
reports, I decided to create Parse-O-Matic for him. Now you can use it.
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
HOW TO PROGRAM THE POM FILE
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
THE PARSE-O-MATIC COMMAND
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
The format of the Parse-O-Matic command line is:
POM pom-file input-file output-file
Here's an example, as you would type it at the DOS command line:
POM POMFILE.POM REPORT.TXT OUTPUT.TXT
For a more formal description of the command line, start up POM by typing this
command at the DOS prompt:
POM /?
THE POM FILE
ÄÄÄÄÄÄÄÄÄÄÄÄ
The POM file is a text file with a .POM extension. The following conventions
are used:
þ Null lines and lines starting with a semi-colon are ignored.
þ A POM file may contain up to 500 lines of specifications.
Comment lines do not count in this total.
A POM file contains no "loops" (to use the programming term). Each line of the
input file interprets the entire POM file. If you'd like it expressed in terms
of programming languages, here's what POM does:
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ START: If there's nothing left in the input file, go to QUIT. ³
³ Read a line from the input file ³
³ Do everything in the POM file ³
³ Go to START ³
³ QUIT: Tell the user you're finished! ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
COMMAND WORDS
ÄÄÄÄÄÄÄÄÄÄÄÄÄ
This documentation assumes that you are an experienced computer user. If you
have trouble, you might ask a programmer to help you. If you're really stuck,
give me a call and I'll help you out.
MINLEN number
Specifies the minimum length a line must be to be considered for parsing.
(Note that null lines in the input file are always ignored)
IGNORE value1 value2
When value1 contains value2, the line is ignored and all further processing
on the line stops. The usual format of this command is something like:
IGNORE $FLINE[3 9] "Date"
This would skip any input line that contains the word "Date" between
columns 3 and 9 ($FLINE references the line just read).
IF value1 value2 var1 value3 [value4]
If value1 matches value2, var1 is set to value3. Otherwise, it is
set to value4. If value4 is missing, nothing is done (i.e. var1
is not changed).
OUT[END] value1 value2 |output-picture
This is two command words: OUT and OUTEND. OUT writes to the output
file without an end-of-line. OUTEND writes an end-of-line to the file.
When value1 matches value2, a line is output to the output file,
according to the output picture. Within the output picture, all
text is taken literally (i.e. " is taken to mean literally that --
a quotation mark character). The only exception to this is that
variable names are identified by the { and } characters. For
example, the line: OUTEND "X" "X" |{$FLUPC} would simply
output (in uppercase) every non-IGNOREd line in the input file.
NOTE: OUT does not actually write to the output file; it accumulates the
output. You must do an OUTEND to actually write the data. The maximum
line length allowed is 255 characters.
TRIM var1 spec1 character
Removes characters from var1. This is usually used to remove blanks.
spec1 can be: A=All B=Both ends L=Left side only R = Right side only
CHANGE var1 value1 value2
Replaces ALL occurances of value1 with value2
TRACE var1
Reports the value of var1 in the trace file (POM.TRC) if tracing has been
enabled (with the DOS command SET POM=T).
VALUES
ÄÄÄÄÄÄ
A value can be specified in the following ways:
"text" A literal text string
VARNAME The name of a variable
VARNAME[start end] A substring of a variable
VARNAME[start] A single character
VARNAME+ Increments variable (see explanation below)
Variable names can be up to 8 characters long. You can create up to 100
variables and literals (this number includes the predefined variables).
Parse-O-Matic predefines several variables. They are:
$FLINE = The line just read from the file
$FLUPC = The line just read from the file, in uppercase
$BRL = The { character (used in OUT)
$BRR = The } character (used in OUT)
IMPORTANT NOTE ABOUT DELIMITERS
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
If you have to specify a quotation mark, use "". For example:
IGNORE "He said ""Hello"" to me."
This would ignore lines containing: He said "Hello" to me.
ILLEGAL CHARACTERS
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
No command can contain these ASCII characters:
þ $00 (Null)
þ $0A (LF)
þ $0D (CR)
Of course, LF and CR do appear at the very end of each line.
INCREMENTING
ÄÄÄÄÄÄÄÄÄÄÄÄ
Only numeric incrementing is supported at this time. Attempting to increment
another type of variable will result in an error.
þ Incrementing "1" gives you "2"
þ Incrementing "9" gives you "10"
TRACING
ÄÄÄÄÄÄÄ
By setting the DOS variable POM to T, you can generate a trace file (POM.TRC).
This is helpful if you have trouble understanding why your file isn't being
parsed properly. But be sure to test it with a SMALL input file. The trace is
quite detailed, and it can easily generate a HUGE output file.
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
SPECIFICATIONS OF THE SAMPLE PARSING JOB
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
POM FILE: POMSAMPL.POM
INPUT FILE: POMSAMPL.TXT
OUTPUT FILE: TEST.TXT
COMMAND LINE: POM POMSAMPL.POM POMSAMPL.TXT TEST.TXT
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
LEGAL NOTICES
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
"Monarch" is (TM) Personics Inc. Nothing said in this document is in any way
intended to imply that it is anything but a fine product worth every penny.
The programs SEE and GO-MENU were created by Pinnacle Software and are used by
permission. For more information about Pinnacle Software, see the text file
AMAZE.TXT.
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
CONCLUSION
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
Thanks for taking the time to check out Parse-O-Matic. I hope it saves you a
lot of time and money. I know that my friend (the guy I originally wrote it
for) uses it every day.
If you can, please register this program. I'm asking for $25. If you can't
afford that, or if you think it's not worth $25, then please send whatever you
think is right.
And in case you're wondering ... yes, the guy I wrote it for DID give me some
money. Actually, he thought it was worth $75. But I'm only asking for $25.
Upgrades? New releases? There's a lot that can be done with a concept like
Parse-O-Matic. I figure that if TEN people register it in the next six
months, I'll be making a new version. It's up to you (and 9 other people).
To register, send cheque or money order (U.S. or Canadian funds) to:
Timothy Campbell, 1250 Laird #1A, Mont Royal, Quebec, Canada H3P 3C6
Thanks again for trying Parse-O-Matic!
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/