Here is a script my friend, Stan Mathews, provided. It works pretty well but, when I examined, in detail, there seems to be some missing entries.
Here's the script:
========================================================
'Date Created: 08-Aug-2017 08:12:53 AM
'Last Updated: 10-Aug-2017 08:20:16 AM
'Created By :
'Updated By :
fil = file.open("c:\wvrchq\datain2.txt",FILE_RW_EXCLUSIVE)
out_fil = file.create("c:\wvrchq\dataout2.txt",FILE_RW_EXCLUSIVE)
while .not. fil.eof()
ln = fil.read_line()
new_val = strtran(word(ln,4,".")," ",crlf())
if new_val > ""
out_fil.write(new_val)
end if
end while
out_fil.flush()
out_fil.close()
fil.close()
========================================================
Here is an sample of DATAIN2.TXT
========================================================
24.1. Permit Required. The following provisions apply to permit requirements:
24.1.a. Racing participants and personnel; racing officials (excluding those employed by the Racing Commission); and, persons employed by the association or employed by a person or concern contracting with or approved by the association or Commission to provide a service or commodity on association grounds, shall have a valid occupational permit issued by the Racing Commission, unless otherwise specifically exempted from this requirement.
24.1.b. Applicants for occupational permits shall file a completed application on a form prescribed by the Racing Commission with the license clerk stationed at the racetrack. Applications shall be reviewed by the stewards who may issue or deny the permit; hold the application for further investigation; or, refer it to the Racing Commission for a determination.
24.1.c. The Racing Commission may designate categories of permit applications that require a determination of issuance or denial by the Commission and not the stewards. The Racing Commission may require, however, that the stewards provide a recommendation as to the issuance or denial of any such permit application.
And, here is the output file, DATAOUT2.TXT
========================================================
The
following
provisions
apply
to
permit
requirements:
Racing
participants
and
personnel;
racing
officials
(excluding
those
employed
by
the
Racing
Commission);
and,
persons
employed
by
the
association
or
employed
by
a
person
or
concern
contracting
with
or
approved
by
the
association
or
Commission
to
provide
a
service
or
commodity
on
association
grounds,
shall
have
a
valid
occupational
permit
issued
by
the
Racing
Commission,
unless
otherwise
specifically
exempted
from
this
requirement
Applicants
for
occupational
permits
shall
file
a
completed
application
on
a
form
prescribed
by
the
Racing
Commission
with
the
license
clerk
stationed
at
the ------------------ FROM HERE
racetrack |
| is missing "Applications shall be reviewed by the ... "
The |
Racing ------------------ TO HERE
Commission
may
designate
categories
of
permit
applications
that
require
a
determination
of
issuance
or
denial
by
the
Commission
and
not
the
stewards
Applicants
for
occupational
permits
may
be
required
to
provide
fingerprints
for
examination
by
the
West
Virginia
State
Police
Criminal
Investigation
Bureau
and
the
Federal
Bureau
of
Investigation
The
Commission
may
issue
permits
to
persons
holding
valid
permanent
========================================================
I saved the data from Word in flat text format thinking there are some control codes there but that was not the answer. So, I would appreciate any input from the Alpha Community. There may be other missing text in this example but, I don't understand why the code would not work.
Thanks !!!
Lar
Here's the script:
========================================================
'Date Created: 08-Aug-2017 08:12:53 AM
'Last Updated: 10-Aug-2017 08:20:16 AM
'Created By :
'Updated By :
fil = file.open("c:\wvrchq\datain2.txt",FILE_RW_EXCLUSIVE)
out_fil = file.create("c:\wvrchq\dataout2.txt",FILE_RW_EXCLUSIVE)
while .not. fil.eof()
ln = fil.read_line()
new_val = strtran(word(ln,4,".")," ",crlf())
if new_val > ""
out_fil.write(new_val)
end if
end while
out_fil.flush()
out_fil.close()
fil.close()
========================================================
Here is an sample of DATAIN2.TXT
========================================================
24.1. Permit Required. The following provisions apply to permit requirements:
24.1.a. Racing participants and personnel; racing officials (excluding those employed by the Racing Commission); and, persons employed by the association or employed by a person or concern contracting with or approved by the association or Commission to provide a service or commodity on association grounds, shall have a valid occupational permit issued by the Racing Commission, unless otherwise specifically exempted from this requirement.
24.1.b. Applicants for occupational permits shall file a completed application on a form prescribed by the Racing Commission with the license clerk stationed at the racetrack. Applications shall be reviewed by the stewards who may issue or deny the permit; hold the application for further investigation; or, refer it to the Racing Commission for a determination.
24.1.c. The Racing Commission may designate categories of permit applications that require a determination of issuance or denial by the Commission and not the stewards. The Racing Commission may require, however, that the stewards provide a recommendation as to the issuance or denial of any such permit application.
And, here is the output file, DATAOUT2.TXT
========================================================
The
following
provisions
apply
to
permit
requirements:
Racing
participants
and
personnel;
racing
officials
(excluding
those
employed
by
the
Racing
Commission);
and,
persons
employed
by
the
association
or
employed
by
a
person
or
concern
contracting
with
or
approved
by
the
association
or
Commission
to
provide
a
service
or
commodity
on
association
grounds,
shall
have
a
valid
occupational
permit
issued
by
the
Racing
Commission,
unless
otherwise
specifically
exempted
from
this
requirement
Applicants
for
occupational
permits
shall
file
a
completed
application
on
a
form
prescribed
by
the
Racing
Commission
with
the
license
clerk
stationed
at
the ------------------ FROM HERE
racetrack |
| is missing "Applications shall be reviewed by the ... "
The |
Racing ------------------ TO HERE
Commission
may
designate
categories
of
permit
applications
that
require
a
determination
of
issuance
or
denial
by
the
Commission
and
not
the
stewards
Applicants
for
occupational
permits
may
be
required
to
provide
fingerprints
for
examination
by
the
West
Virginia
State
Police
Criminal
Investigation
Bureau
and
the
Federal
Bureau
of
Investigation
The
Commission
may
issue
permits
to
persons
holding
valid
permanent
========================================================
I saved the data from Word in flat text format thinking there are some control codes there but that was not the answer. So, I would appreciate any input from the Alpha Community. There may be other missing text in this example but, I don't understand why the code would not work.
Thanks !!!
Lar
Comment