home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
DBASE
/
STRPDAT.ZIP
/
STRIPIT.DOC
< prev
next >
Wrap
Text File
|
1992-01-11
|
5KB
|
117 lines
*:::::::::::::::::::::::::::[ DISCLAIMER ]:::::::::::::::::::::::::::::::::*
STRIPIT.EXE by Bill Shields is released to public domain.
STRIPIT.EXE is provided AS IS without any warranty, expressed or implied.
This includes without limitation the fitfulness to a particular
purpose or application and any warranties of merchantability. While I tried
to be as thorough as possible while debugging STRIPIT.EXE, I shall not be
liable for any damages, whether direct, indirect, special, or consequential
arising from a failure of STRIPIT.EXE to operate in a manner desired by the
user. I shall not be liable for any damage to data or property which may
by caused directly or indirectly by use of STRIPIT.EXE.
In no event will I be liable to you for any damages, including any lost
profits, lost savings or other incidental or consequential damages arising
out of your use or inability to use the program, or for any claim by any
other party.
*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
STRIPIT will take a text file and convert it into a comma delimited file.
The text file is assumed to have multiple records, i.e.,
RECORD 1
RECORD 2
RECORD 3
RECORD 1
RECORD 2
RECORD 3
would be converted to
"RECORD 1","RECORD 2","RECORD 3"
"RECORD 1","RECORD 2","RECORD 3"
Support is provided for *2* different size records (based on STRIPIT command
line).
============================================================================
A CLIPPER Demo program "DATA.EXE" is provided for adding, editing, deleting,
viewing, and printing data imported from the "DATA" file. Examine the DATA
file and run this program to see what STRIPIT.EXE does.
1) Edit EDITOR.BAT to reflect your favorite editor (if you want to view/edit
the STRIPIT output files).
2) EXECUTE "DATA.EXE" (Clipper program)
3) Try the various options saving option 1. for last (to see there is nothing
there until STRIPIT creates it).
============================================================================
The following command line generates two comma-delimited data files from
the "DATA" file.
STRIPIT /I:C:^Q: /S:A: /L:41 /C:20^22^N
The above reads in a file called "DATA" and generates "DATA.PRI"
and "DATA.ALT" (primary and alternate) files. The primary file
contains SYSOPS and the alt contains non-SYSOPS. I decided not to
go with a configuration file or filenames on the command line to
reduce overhead. The above will look less intimidating after the
following explanation.
DELIMITER = ^
If you specify more then one parameter for a switch you must
delimit them with the caret. I picked this character because it
will be the least likely used in text files. Any other character
ran the risk of "tricking" the program into thinking it was a
delimiter.
SWITCHS
/C:P1^P2^P3 Check line. This must be supplied the following 3
parameters:
P1 ... Offset, from line 1 of each record in the
text file, that holds conditional check.
For our above example, line 20 is the
response to "Are you a sysop".
P2 ... If the condition is true then this is the
*NEW* number of lines for this record only.
P3 ... String to compare to text at line offset
P1. In our example this will compare line
20 to "N". If line 20 is "naaa", "no",
"Nope","Never", etc, it will cause the
program to default to the new record size
of 22. After this record is processed (in
the alternate file) the program returns to
the primary file using the default record
length supplied with the switch /L:
Note: Length is not limited to one
character.
/I:[string][...] Ignore line. This will cause the program to
ignore any line that starts with the specified
string. In the above example all lines that start
with 'C:' and 'Q:' will be ignored (won't be comma
delimited).
/L:[len] Length of record (in lines). This is the only
*MANDATORY* switch. This tell the program how
many lines each record will be. In our example
(your data file) the record is 41 lines.
/S:[string][...] Skip these characters. This will cause the
program to skip past characters that *start* the
line with 'string'. In the above example all
lines that start with "A:" will have the "A:"
striped off (or skipped). This will result in
only the responses being used.
NOTE: All blank characters are stripped from the left hand side of
strings prior to comma-delimiting them, i.e. " string" would be
converted to "string".