Link to home
Start Free TrialLog in
Avatar of TobinLewis
TobinLewis

asked on

QBasic 4.5 Question #3 for 500 points.

I have a basic script that in theory is supposed to break a large HTM file into individual HTM files.

The scripts asks for the input name which in this case is occfinal.htm

Then it asks what the prefix for the subfiles, in this case it will be OCC

Then it asks where the number starts, I enter 1

Then it asks for how many digits in the number, I answer 4

Then the script asks" How long is the old stuff to keep".  I have no idea what to enter in this field.  I try to enter a number here just to get to the next question.

The script should then ask where I would like to install the files, bit it errors out with an illegal function call on the step before with the cursor flashing on the following line of code,

If MID$(r$, np-1,1) = "#" Then num = VAL(MID$(r$, np,nl))


The script is supposed to created htm files based on an occupation number (Ex. OCC0001.HTM, OCC0002.HTM, OCC0003.HTM, ...etc up to OCC0404.HTM)

I'm also not sure what type of input the script is looking for in the "How long is the old stuff to keep"

I'll post all of the code in the next screen.

Once again, thanks for your help.

Tobin


Avatar of TobinLewis
TobinLewis

ASKER

' BUSTUPH.BAS - Program reads a combined file and bust out the individual
' scripts into sub-files. Only works with files where the header begins
' with # in position one.  Ex. the occupation scripts.
' SPECIAL TO BUST UP THE APPRENTICESHIP HTML INTO INDIVIDUAL .HTM
' check the position of the occ/mil/appr number and make needed changes below
'----------------------------------------------------------------------
   COLOR 15, 2: CLS
   INPUT "What is the file to bust into subfiles"; InFile$
   INPUT "What is the prefix for the subfiles   "; prefix$
   INPUT "Where does the number start           "; np$
   INPUT "How many digits in the number         "; nl$
   nl = VAL(nl$)

   prefix$ = LCASE$(prefix$)
   INPUT "How long is the old stuff to keep     "; os$
   os = VAL(os$)
   np = VAL(np$)
   'INPUT "What directory should we put them in  "; TempDir$
   'CHDIR TempDir$
   IF nl = 4 THEN
       first$ = "0001.htm"
   ELSE
       first$ = "001.htm"
   END IF
   FileOut$ = prefix$ + first$
   OPEN "I", #1, InFile$
   OPEN "O", #2, FileOut$
   FOR r = 1 TO 700000
   IF EOF(1) THEN 666
   LINE INPUT #1, r$
   IF MID$(r$, np - 1, 1) = "#" THEN num = VAL(MID$(r$, np, nl))
   IF MID$(r$, np - 1, 1) = "#" AND INSTR(r$, "<") = 0 THEN
       PRINT "We got a problem!": INPUT xyz$: END
   END IF
   IF (MID$(r$, np - 1, 1) = "#") AND num > 1 THEN
       PRINT #2, MID$(r$, 1, os) 'print the "remainder of the doc before"
       CLOSE #2
       ' FileOut$ = prefix$ + "." + MID$(r$, np, nl)
       FileOut$ = prefix$ + MID$(r$, np, nl) + ".HTM"
       MID$(r$, 1, os) = SPACE$(os)
       r$ = RTRIM$(LTRIM$(r$))
       OPEN "O", #2, FileOut$
       LOCATE 8, 1: PRINT SPACE$(160)
       LOCATE 8, 1: PRINT r$
       LOCATE 10, 1: PRINT SPACE$(80)
       LOCATE 10, 1: PRINT "Writing = "; FileOut$
   END IF
   'IF LEN(r$) < 2 OR r$ = SPACE$(LEN(r$)) THEN r$ = ""
   'IF r$ <> "" THEN BlankCnt = 0
   'IF LEN(r$) < 1 THEN BlankCnt = BlankCnt + 1
   'IF LEN(r$) < 1 AND BlankCnt > 2 THEN GOTO 70
   'IF LEN(r$) < 1 AND Fileout$ = "" THEN GOTO 70
   'IF MID$(r$, 1, 1) = "#" THEN r$ = MID$(r$, 6, LEN(r$) - 5)
65 PRINT #2, r$
   prevr$ = r$
70 NEXT r
666 CLOSE : END
Can you please post the sample HTML file?

Darko
Avatar of Tommy Kinard
Hi TobinLewis,
[QUOTE]
Then it asks where the number starts, I enter 1 <--- This should be a 2
[/QUOTE]

According to the source you have posted "Only works with files where the header begins with # in position one"
and in the code it is actually checking for "#" so what it is looking for is # not an actual number.

HTH
dragontooth

Well if it's a HTML file there should still be html tags or something...

Darko
For Darko -

Do you want a sample of the html file that I am trying to break into pieces?
TobinLewis: Yes... ;)

Darko
I am still getting hung up on the question "How long is the old stuff to keep"

I don't know what to enter here.

Thanks!
Well we'll somehow figure it out soon after you post the html file :)

Darko
             <html><!---#001---><head><title>Accountant</title></head><body><a name="contents"></a><h2>Accountant</h2>
<h5><UL>
<LI><A HREF="#OCC_PROF">OCCUPATION PROFILE</A></LI>
<LI><A HREF="#OCCU_DES">OCCUPATION DESCRIPTION</A></LI>
<LI><A HREF="#OCCU_SPEC">OCCUPATION SPECIALTIES</A></LI>
<LI><A HREF="#DUTI_AND_RESP">DUTIES AND RESPONSIBILITIES</A></LI>
<LI><A HREF="#INTE_AND_ABIL">INTERESTS AND ABILITIES</A></LI>
<LI><A HREF="#PHYS_ABIL_MAY_INCL">PHYSICAL ABILITIES MAY INCLUDE</A></LI>
<LI><A HREF="#EMPL_OPPO">EMPLOYMENT OPPORTUNITIES</A></LI>
<LI><A HREF="#EARN_AND_ADVA">EARNINGS AND ADVANCEMENT</A></LI>
<LI><A HREF="#LICE_AND_SPEC_REQU">LICENSURE AND SPECIAL REQUIREMENTS</A></LI>
<LI><A HREF="#EMPL_AND_OUTL">EMPLOYMENT AND OUTLOOK</A></LI>
<LI><A HREF="#EDUC_AND_TRAI">EDUCATION AND TRAINING</A></LI>
<LI><A HREF="#SUGG_HIGH_SCHO_SUBJ">SUGGESTED HIGH SCHOOL SUBJECTS</A></LI>
<LI><A HREF="#RELATED_ITEMS">RELATED OCCUPATIONS/COLLEGE MAJORS</A></LI>
<LI><A HREF="#MORE_SOUR_OF_INFO">MORE SOURCES OF INFORMATION</A></LI>
</UL></h5>

<HR><h3 align=center><a name= "OCC_PROF">OCCUPATION PROFILE</A></H3>
<table width=95% border=1>
<tr><td width=40%>CAREER CLUSTER</td>
<td width=55%>
Business  </td></tr>
<tr><td width=40%>INTERESTS</td>
<td width=55%>
Data  </td></tr>
<tr><td width=40%>WORKING CONDITIONS</td>
<td width=55%>
Inside  </td></tr>
<tr><td width=40%>MINIMUM EDUCATION LEVEL</td>
<td width=55%>
Bachelor's Degree  </td></tr>
<tr><td width=40%>PHYSICAL STRENGTH</td>
<td width=55%>
Light Work  </td></tr>
<tr><td width=40%>PHYSICAL ABILITIES NOT REQUIRED</td>
<td width=55%>
Climb/Balance, Kneel/Stoop/Crouch, Talk/Hear  </td></tr>
<tr><td width=40%>EARNINGS (YEARLY AVERAGE)</td>
<td width=55%>
$42,000 to $50,999</td></tr>
<tr><td width=40%>OPPORTUNITIES FOR EXPERIENCE</td>
<td width=55%>
Internship, Military Service, Part Time Work  </td></tr>
<tr><td width=40%>LICENSURE AND CERTIFICATION</td>
<td width=55%>
Usually Recommended  </td></tr>
<tr><td width=40%>EMPLOYMENT AND OUTLOOK</td>
<td width=55%>
Average Growth  </td></tr>
<tr><td width=40%>HOLLAND INTEREST SCORE</td>
<td width=55%> CRS</td></tr>
</table>

<p><hr></p>
<center><a name="OCCU_DES"></A><h3>OCCUPATION DESCRIPTION</h3></center>

<p>Accountants design, install, maintain and use general accounting
systems to prepare, analyze and verify financial reports and related
economic information.  Accountants in all business, industrial and
governmental organizations furnish this financial information to managers,
who use this up-to-date material to make important decisions for the
organization.
<p>Accountants may work alone in small businesses or with other
accountants in larger businesses and accounting firms.  Accountants
generally work in offices that are comfortable, well-lighted and
well-ventilated.  Some accountants may work in the client's office where
they have direct access to company records.  Self-employed accountants may
be able to do much of their work at home.  Most accountants and auditors
work 40-hours per week, but many work 50 or more hours per week,
particularly if they are self-employed and free to take on the work of as
many clients as they choose.  Income tax season, especially for tax
specialists, includes long work hours and heavy pressure.  Accountants and
auditors employed by large firms and government agencies may be required
to travel frequently to perform audits at other branches of their firm,
government facilities or clients' places of business.
<br>
<p><hr></p>
<CENTER><a name="OCCU_SPEC"></a><h3>OCCUPATION SPECIALITIES</h3></center>

     <p>Tax Accountants (160.162-010) prepare federal, state and local
     tax returns of individuals, businesses or other organizations.</p>

     <p>Budget Accountants (160.162-022) apply principles of accounting
     to analyze past and present financial operations in order to prepare
     a budget.</p>

     <p>Cost Accountants (160.162-026) plan, set up and direct the
     operation of an accounting system to determine the cost of producing
     or selling an item or service.</p>

     <p>Property Accountants (160.167-022) identify and keep records of
     company owned or leased equipment, buildings and other property.</p>

     <p>Systems Accountants (160.167-026) devise and install special
     accounting systems and related procedures in establishments which
     cannot use a standardized system.</p>

     <p>Auditors (160.167-054) examine and analyze the accounting records
     of a business and prepare reports concerning its financial status
     and operating procedures.</p>

<p><hr></p>
<CENTER><a name="DUTI_AND_RESP"></a><h3>DUTIES AND RESPONSIBILITIES</h3></center>
<ul>
     <li>Designing or modifying accounting systems, including computer
     systems</li>
     <li>Maintaining accounts or records</li>
     <li>Auditing contracts, purchase orders and vouchers and preparing
     related reports</li>
     <li>Preparing periodic financial statements and other management
     reports</li>
     <li>Directing and coordinating activities of workers engaged in
     keeping accounts and records</li>
</ul>
<br>
<p><hr></p>
<CENTER><a name="INTE_AND_ABIL"></a><h3>INTERESTS AND ABILITIES</h3></center>
<ul>
     <li>Working with figures</li>
     <li>Working independently or as part of a team</li>
     <li>Performing activities which require thought and analysis</li>
     <li>Performing accurate, precise work</li>
     <li>Analyzing material and sorting out details</li>
     <li>Communicating effectively, both orally and in writing</li>
     <li>Using office machines</li>
</ul>
<br>
<p><hr></p>
<CENTER><a name="PHYS_ABIL_MAY_INCL"></a><h3>PHYSICAL ABILITIES MAY INCLUDE</h3></center>
<ul>
     <li>Be able to sit at a desk for long periods of time</li>
     <li>See well, either naturally or with correction</li>
     <li>Be able to reach for, handle, and feel objects</li>
</ul>
<br>
<p><hr></p>
<center><a name="EMPL_OPPO"></A><h3>EMPLOYMENT OPPORTUNITIES</h3></center>

<p>Employment as a bookkeeper or accounting clerk may provide experience
in this area.  Many colleges offer students opportunities to gain
experience through summer or part-time internship programs conducted by
public accounting or business firms.  All branches of the military service
also offer opportunities for experience.
<p>Methods of entering this occupation include direct application to
employers and taking civil service exams.  Professional recognition
through certification or licensure is also helpful.   Positions may also
be located by consulting newspaper want ads, local school placement
offices and state employment offices.
<br>
<p><hr></p>
<center><a name="EARN_AND_ADVA"></A><h3>EARNINGS AND ADVANCEMENT</h3></center>

<p>Earnings depend upon the accountant's experience, level of education
and certification as a public accountant.  While larger firms usually pay
higher starting salaries than small or medium-sized firms, the small and
medium-sized firms usually offer the well-qualified employee an
opportunity for more rapid advancement.  Generally, certified public
accountants (CPAs) and those with graduate degrees earn a higher beginning
salary.
<p>According to a salary survey conducted by the National Association of
Colleges and Employers, bachelor's degree candidates in accounting
received starting offers averaging $41,866 a year in 2004; master's degree
candidates in accounting were offered $43,508.
<p>According to a salary survey conducted by Robert Half International, a
staffing services firm specializing in accounting and finance, accountants
with up to one year of experience earned between $30,385 and $41,715.
Those with one to three years of experience earned between $35,020 and
$50,985.  Median annual earnings of accountants were $49,820 in 2004.  The
middle fifty percent earned between $39,443 and $65,328.  The lowest ten
percent earned less than $32,139, and the highest ten percent earned more
than $87,694.
<p>In the Federal Government, the starting annual salary for junior
accountants was $24,145 in 2004.  Candidates with a superior academic
record could start at $29,908.  Accountants employed by the Federal
Government in nonsupervisory, supervisory and managerial positions
averaged $71,451 in 2004.
<p> Accountants may receive paid vacations, holidays, and sick days; life
and health insurance; and retirement benefits.  These are usually paid by
the employer.
<CENTER><P><A HREF="RST 0001">STATE EMPLOYMENT INFORMATION</A></P></CENTER>
<br>
<p><hr></p>
<center><a name="LICE_AND_SPEC_REQU"></A><h3>LICENSURE AND SPECIAL REQUIREMENTS</h3></center>

<p>Professional recognition through certification and licensure is
extremely valuable in the job market.  As of 2003, 42 states and the
Distict of Columbia require CPA candidates to complete 150 semester hours
of college coursework - an additional 30 hours beyond the usual 4-year
bachelor's degree.  Another five states have adopted similar legislation
that will become effective between 2004 and 2009.  Only four states do not
require the additional 150 semester hours.  Prospective accounting majors
should research the requirements of any states in which they hope to
become licensed.
<p>To become a CPA, it is also necessary to take a four-part two-day
examination that is the same for all states.  Candidates are not required
to pass all four parts at once.  Most states also require applicants for a
CPA certificate to have some public accounting experience.  Accountants
may join professional associations, although membership is not required.
<br>
<p><hr></p>
<center><a name="EMPL_AND_OUTL"></A><h3>EMPLOYMENT AND OUTLOOK</h3></center>

<p>Accountants and auditors held about 1.1 million jobs in 2002.
Employment is expected to grow about as fast as the average for all
occupations through the year 2012, which means employment is projected to
increase 10 to 20 percent.  An increase in the number of businesses,
changing financial laws and regulations, and increased scrutiny of company
finances will drive job growth.  In addition, the need to replace
accountants and auditors who retire or transfer to other occupations will
produce thousands of additional job openings annually, reflecting the
large size of this occupation.  The changing role of accountants and
auditors will also spur job growth.  In response to market demand,
accountants and auditors will offer more financial management and
consulting services.  By focusing on analyzing operations, rather than
simply providing financial data, accountants will help to boost demand for
their services.
<p>Opportunities are expected to be favorable for college graduates
seeking accounting and auditing jobs who have worked part-time in a
business or accounting firm while in school.  In fact, experience has
become so important that some employers in business and industry seek
persons with one or two years experience for beginning positions.
<br>
<p><hr></p>
<CENTER><a name="EDUC_AND_TRAI"></a><h3>EDUCATION AND TRAINING</h3></center>
<p>The following education and training options are suggested
and/or required to enter this occupation. </p><br>
<ul>
     <li>Bachelor's Degree</li>
     <li>Master's Degree</li>
</ul>
<br>
<p><hr></p>
<CENTER><a name="SUGG_HIGH_SCHO_SUBJ"></a><h3>SUGGESTED HIGH SCHOOL SUBJECTS</h3></center>
<p>The following courses/programs can be taken during high school
to help build the foundation needed to prepare for this occupation.
Additional education and training may be needed and is recommended.</p><br>
<ul>
     <li>Accounting</li>
     <li>Algebra</li>
     <li>Business</li>
     <li>Business & Computer Technology</li>
     <li>Business Data Processing</li>
     <li>Business Law</li>
     <li>College Preparatory</li>
     <li>Computer Science</li>
     <li>Economics</li>
     <li>English</li>
     <li>Mathematics</li>
     <li>Social Studies</li>
</ul>
<br>
<p><hr></p>
<CENTER><a name="RELATED_ITEMS"></a><h3>RELATED OCCUPATIONS</h3></center>
<ul>
<li><a href="ROC 0351">Auditor</a></li>
<li><a href="ROC 0035">Bookkeeper and Accounting Clerk</a></li>
<li><a href="ROC 0038">Budget Analyst</a></li>
<li><a href="ROC 0079">Credit Manager</a></li>
<li><a href="ROC 0117">Financial Manager</a></li>
<li><a href="ROC 0251">Public Administrator</a></li>
</ul>
<p><hr></p>
<CENTER><a name= 0 ></a><h3>RELATED CAREER PATHWAYS/MAJORS</H3></CENTER>
<p> Each occupation is included in one or more career slusters. Each career cluster
is then divided into two or more career pathways/majors to illustrate the areas of
specialization that are available for each occupation. This occupation is found in the
career pathways/majors: <p>
<UL>
<li>Business, Management & Administration Cluster - Business Financial Management & Accounting Pathway</li>
<li>Finance Cluster - Banking & Related Services Pathway</li>
<li>Finance Cluster - Business Financial Management Pathway</li>
<li>Government & Public Administration Cluster - Revenue & Taxation Pathway</li>
</ul>
<br>
<p><hr></p>
<CENTER><h3>RELATED MILITARY OCCUPATIONS</h3></center>
<ul>
<li><a href="RML 0048">Finance & Accounting Manager</a></li>
</ul>
<p><hr></p>
<CENTER><h3>RELATED COLLEGE MAJORS</h3></center>
<ul>
<li><a href="RMJ 0048">Accounting</a></li>
</ul>
<p><hr></p>
<a name="MORE_SOUR_OF_INFO"></a>
<center><h3>MORE SOURCES OF INFORMATION</H3></center>
<br>
Accreditation Council for Accountancy and Taxation<br>
1010 North Fairfax Street<br>
Alexandria, VA  22314-1574<br>
Phone: (888) 289-7763<br>
Fax:   (703) 549-2984<br>
E-mail: info@acatcredentials.org<br>
WebSite: www.acatcredentials.org<br>
<br>
American Accounting Association<br>
5717 Bessie Drive<br>
Sarasota, FL  34233-2399<br>
Phone: (941) 921-7747<br>
Fax:   (941) 923-4093<br>
E-mail: office@aaahq.org<br>
WebSite: aaahq.org/index.cfm<br>
<br>
American Institute of Certified Public Accountants<br>
Academic & Career Development Team<br>
1211 Avenue of the Americas<br>
New York, NY  10036-8775<br>
Phone: (212) 596-6200<br>
Fax:   (212) 596-6213<br>
WebSite: www.aicpa.org<br>
<br>
Institute of Management Accountants<br>
10 Paragon Drive<br>
Montvale, NJ  07645-1718<br>
Phone: (800) 638-4427<br>
Fax:   (201) 474-1600<br>
E-mail: ima@imanet.org<br>
WebSite: www.imanet.org<br>
<br>
<p><hr></p>
<center><h3>OCCUPATION CODES</h3></center>
<ul>
<li>DOT - Dictionary of Occupation Titles: 160.162-018</li>
<li>OES - Occupational Employment Statistics: 21114</li>
<li>SOC - Standard Occupational Classification: 13-2011</li>
<li>ONET - Occupational Information Network: 13-2011</li>
</ul>
<br>
</body></html><html><!---#002---><head><title>Activities Therapist</title></head><body><a name="contents"></a><h2>Activities Therapist</h2>
<h5><UL>
<LI><A HREF="#OCC_PROF">OCCUPATION PROFILE</A></LI>
<LI><A HREF="#OCCU_DES">OCCUPATION DESCRIPTION</A></LI>
<LI><A HREF="#OCCU_SPEC">OCCUPATION SPECIALTIES</A></LI>
<LI><A HREF="#DUTI_AND_RESP">DUTIES AND RESPONSIBILITIES</A></LI>
<LI><A HREF="#INTE_AND_ABIL">INTERESTS AND ABILITIES</A></LI>
<LI><A HREF="#PHYS_ABIL_MAY_INCL">PHYSICAL ABILITIES MAY INCLUDE</A></LI>
<LI><A HREF="#EMPL_OPPO">EMPLOYMENT OPPORTUNITIES</A></LI>
<LI><A HREF="#EARN_AND_ADVA">EARNINGS AND ADVANCEMENT</A></LI>
<LI><A HREF="#LICE_AND_SPEC_REQU">LICENSURE AND SPECIAL REQUIREMENTS</A></LI>
<LI><A HREF="#EMPL_AND_OUTL">EMPLOYMENT AND OUTLOOK</A></LI>
<LI><A HREF="#EDUC_AND_TRAI">EDUCATION AND TRAINING</A></LI>
<LI><A HREF="#SUGG_HIGH_SCHO_SUBJ">SUGGESTED HIGH SCHOOL SUBJECTS</A></LI>
<LI><A HREF="#RELATED_ITEMS">RELATED OCCUPATIONS/COLLEGE MAJORS</A></LI>
<LI><A HREF="#MORE_SOUR_OF_INFO">MORE SOURCES OF INFORMATION</A></LI>
</UL></h5>

<HR><h3 align=center><a name= "OCC_PROF">OCCUPATION PROFILE</A></H3>
<table width=95% border=1>
<tr><td width=40%>CAREER CLUSTER</td>
<td width=55%>
Health  </td></tr>
<tr><td width=40%>INTERESTS</td>
<td width=55%>
Data, People, Things  </td></tr>
<tr><td width=40%>WORKING CONDITIONS</td>
<td width=55%>
Inside  </td></tr>
<tr><td width=40%>MINIMUM EDUCATION LEVEL</td>
<td width=55%>
Bachelor's Degree, Master's Degree  </td></tr>
<tr><td width=40%>PHYSICAL STRENGTH</td>
<td width=55%>
Light Work  </td></tr>
<tr><td width=40%>PHYSICAL ABILITIES NOT REQUIRED</td>
<td width=55%>
Climb/Balance  </td></tr>
<tr><td width=40%>EARNINGS (YEARLY AVERAGE)</td>
<td width=55%>
$24,000 to $32,999</td></tr>
<tr><td width=40%>OPPORTUNITIES FOR EXPERIENCE</td>
<td width=55%>
Internship, Volunteer Work, Part Time Work  </td></tr>
<tr><td width=40%>LICENSURE AND CERTIFICATION</td>
<td width=55%>
Usually Recommended  </td></tr>
<tr><td width=40%>EMPLOYMENT AND OUTLOOK</td>
<td width=55%>
Slower than Average Growth  </td></tr>
<tr><td width=40%>HOLLAND INTEREST SCORE</td>
<td width=55%> SEI</td></tr>
</table>

<p><hr></p>
<center><a name="OCCU_DES"></A><h3>OCCUPATION DESCRIPTION</h3></center>

<p>Activities therapists plan and direct specialized treatment programs to
help individuals with physical, mental or social handicaps become as
self-reliant and independent as possible.  Activities therapists usually
work as part of a treatment team along with physicians, nurses, physical
therapists and other specialists.  In some large facilities, activities
therapists in specialty areas may work under the part-time supervision of
an activities coordinator.
<p>Activities therapists work in a wide variety of settings.  However,
most work indoors in clean, comfortable, well-ventilated and well-lighted
environments.  Activities therapists generally work a 40-hour, five day
week, although the hours may vary with the employment setting.  They may
work weekends and/or evenings in some locations.
<br>
<p><hr></p>
<CENTER><a name="OCCU_SPEC"></a><h3>OCCUPATION SPECIALITIES</h3></center>

     <p>Horticultural Therapists (076-124-018) plan, coordinate and
     conduct therapeutic gardening programs to facilitate the
     rehabilitation of physically and mentally handicapped patients.
     They conduct gardening sessions and revise the programs to conform
     and grow with the progress of the patients.</p>

     <p>Art Therapists (076.127-010) plan and direct activities that help
     mentally ill and physically disabled patients use art for nonverbal
     expression and communication.</p>

     <p>Music Therapists (076.167-010) plan, organize and direct
     instrumental and vocal music activities and experiences to help
     patients with communication, social, daily living or problem solving
     skills.</p>

     <p>Dance Therapists (076.127-018) plan, organize and lead dance and
     body movement activities to improve patients' mental outlook and
     physical well-being.</p>

     <p>Manual-Arts Therapists (076.124-010) plan and organize
     woodworking, photography, metalworking, agriculture, electricity and
     graphic arts activities in collaboration with a rehabilitation team
     and prepare reports that show development of patient work tolerance,
     emotional and social development and ability to meet physical and
     mental demands of employment.</p>

<p><hr></p>
<CENTER><a name="DUTI_AND_RESP"></a><h3>DUTIES AND RESPONSIBILITIES</h3></center>
<ul>
     <li>Conferring with a patient's physician and rehabilitation
     team</li>
     <li>Planning the rehabilitation program and instructing the patient
     in the performance of specific activities</li>
     <li>Preparing reports describing patient's reactions and
     symptoms</li>
     <li>Revising activity programs based on an evaluation of patient's
     progress</li>
</ul>
<br>
<p><hr></p>
<CENTER><a name="INTE_AND_ABIL"></a><h3>INTERESTS AND ABILITIES</h3></center>
<ul>
     <li>Helping people</li>
     <li>Performing abstract and creative work</li>
     <li>Planning, directing or controlling the activities of others</li>
     <li>Performing duties which change frequently</li>
     <li>Working well with others</li>
     <li>Being patient, yet also persuasive</li>
     <li>Making decisions based on personal judgment or measurable
     standards</li>
     <li>Using logical reasoning</li>
     <li>Communicating effectively, both orally and in writing</li>
     <li>Working with people in a tactful and considerate manner</li>
</ul>
<br>
<p><hr></p>
<CENTER><a name="PHYS_ABIL_MAY_INCL"></a><h3>PHYSICAL ABILITIES MAY INCLUDE</h3></center>
<ul>
     <li>Be able to reach for, handle, and feel objects, for some
     positions</li>
     <li>Speak clearly and understandably</li>
     <li>See and hear well, either naturally or with correction</li>
     <li>Be able to stoop, kneel, and crouch, for some positions</li>
</ul>
<br>
<p><hr></p>
<center><a name="EMPL_OPPO"></A><h3>EMPLOYMENT OPPORTUNITIES</h3></center>

<p>Experience may be gained through summer, part-time or full-time work as
a therapy clinic aide in hospitals and other places where activities
therapists are employed.  Post-secondary internships may also be
available.
<p>The most common method of entry to this occupation is through direct
application to employers.  Assistance in locating job openings may be
obtained from college placement offices and professional associations.
Openings may also be listed in newspaper want ads and professional
journals.
<br>
<p><hr></p>
<center><a name="EARN_AND_ADVA"></A><h3>EARNINGS AND ADVANCEMENT</h3></center>

<p>Salaries of activities therapists vary according to the type and size
of employer, educational background, work experience, professional
registration and region of the country.  Median annual earnings of
activities therapists were $32,372 in 2004.  The middle fifty percent
earned between $24,571 and $41,744 a year.  The lowest ten percent earned
less than $19,218, and the highest ten percent earned more than $50,011.
Median annual earnings in 2004 for activities therapists in nursing care
facilities were $26,511.
<p>Activities therapists may receive paid vacations, holidays and sick
days;  life and health insurance; and retirement benefits.  These are
usually paid by the employer.
<CENTER><P><A HREF="RST 0002">STATE EMPLOYMENT INFORMATION</A></P></CENTER>
<br>
<p><hr></p>
<center><a name="LICE_AND_SPEC_REQU"></A><h3>LICENSURE AND SPECIAL REQUIREMENTS</h3></center>

<p>Some states regulate activities therapists by requiring specified
education and experience for certification to practice.  Those who meet
the requirements can qualify for certification by the professional
association representing their area of specialization.  Requirements
usually entail either a bachelor's or a master's degree in the area of
specialization, a written examination and an internship of at least 480
hours. Attendance and participation in professional conferences and
workshops is common in order to enhance efficiency and knowledge in the
field.
<br>
<p><hr></p>
<center><a name="EMPL_AND_OUTL"></A><h3>EMPLOYMENT AND OUTLOOK</h3></center>

<p>There were about 27,000 recreational therapists, of which activities
therapists are a part, employed nationally in 2002.  About one-third
worked in nursing care facilities and almost another one-third worked in
hospitals.  The remainder worked in residential facilities, community
mental health centers, adult day care programs, correctional facilities,
community programs for people with disabilities, and substance abuse centers
<p>Employment of activities therapists is expected to grow more slowly
than the average for all occupations through the year 2012, which means
employment is projected to increase 3 to 9 percent.  This is due to
hospitals performing more procedures on an outpatient setting and
emphasizing cost containment.
<br>
<p><hr></p>
<CENTER><a name="EDUC_AND_TRAI"></a><h3>EDUCATION AND TRAINING</h3></center>
<p>The following education and training options are suggested
and/or required to enter this occupation. </p><br>
<ul>
     <li>Bachelor's Degree</li>
     <li>Master's Degree</li>
</ul>
<br>
<p><hr></p>
<CENTER><a name="SUGG_HIGH_SCHO_SUBJ"></a><h3>SUGGESTED HIGH SCHOOL SUBJECTS</h3></center>
<p>The following courses/programs can be taken during high school
to help build the foundation needed to prepare for this occupation.
Additional education and training may be needed and is recommended.</p><br>
<ul>
     <li>Arts</li>
     <li>Child Growth & Development</li>
     <li>College Preparatory</li>
     <li>Crafts</li>
     <li>English</li>
     <li>Health Science Technology</li>
     <li>Instrumental & Vocal Music</li>
     <li>Metals Technology</li>
     <li>Ornamental Horticulture</li>
     <li>Photography</li>
     <li>Physical Education</li>
     <li>Physiology</li>
     <li>Pottery</li>
     <li>Psychology</li>
     <li>Social Studies</li>
     <li>Sociology</li>
     <li>Theatre & Drama</li>
     <li>Woodshop</li>
</ul>
<br>
<p><hr></p>
<CENTER><a name="RELATED_ITEMS"></a><h3>RELATED OCCUPATIONS</h3></center>
<ul>
<li><a href="ROC 0057">Clinical Laboratory Technologist</a></li>
<li><a href="ROC 0205">Occupational Therapist</a></li>
<li><a href="ROC 0206">Occupational Therapy Assistant</a></li>
<li><a href="ROC 0228">Physical Therapist</a></li>
<li><a href="ROC 0229">Physical Therapy Assistant</a></li>
<li><a href="ROC 0400">Recreational Therapist</a></li>
</ul>
<p><hr></p>
<CENTER><a name= 0 ></a><h3>RELATED CAREER PATHWAYS/MAJORS</H3></CENTER>
<p> Each occupation is included in one or more career slusters. Each career cluster
is then divided into two or more career pathways/majors to illustrate the areas of
specialization that are available for each occupation. This occupation is found in the
career pathways/majors: <p>
<UL>
<li>Health Science Cluster - Therapeutic Services Pathway</li>
</ul>
<br>
<p><hr></p>
<CENTER><h3>RELATED COLLEGE MAJORS</h3></center>
<ul>
<li><a href="RMJ 0217">Art Therapy</a></li>
<li><a href="RMJ 0224">Dance Therapy</a></li>
<li><a href="RMJ 0246">Music Therapy</a></li>
<li><a href="RMJ 0252">Occupational Therapy</a></li>
</ul>
<p><hr></p>
<a name="MORE_SOUR_OF_INFO"></a>
<center><h3>MORE SOURCES OF INFORMATION</H3></center>
<br>
American Art Therapy Association<br>
1202 Allanson Road<br>
Mundelein, IL  60060-3808<br>
Phone: (888) 290-0878<br>
Fax:   (847) 566-4580<br>
E-mail: info@arttherapy.org<br>
WebSite: www.arttherapy.org<br>
<br>
American Music Therapy Association<br>
8455 Colesville Road, Suite 1000<br>
Silver Spring, MD  20910<br>
Phone: (301) 589-3300<br>
Fax:   (301) 589-5175<br>
E-mail: info@musictherapy.org<br>
WebSite: www.musictherapy.org<br>
<br>
National Council for Therapeutic Recreation Certification<br>
7 Elmwood Drive<br>
New City, NY  10956<br>
Phone: (845) 639-1439<br>
Fax:   (845) 639-1471<br>
E-mail: nctrc@nctrc.org<br>
WebSite: www.nctrc.org<br>
<br>
National Therapeutic Recreation Society<br>
22377 Belmont Ridge Road<br>
Ashburn, VA  20148<br>
Phone: (703) 858-0784<br>
Fax:   (703) 858-0794<br>
E-mail: ntrsnrpa@nrpa.org<br>
WebSite: www.nrpa.org/index.cfm?publicationID=21<br>
<br>
<p><hr></p>
<center><h3>OCCUPATION CODES</h3></center>
<ul>
<li>DOT - Dictionary of Occupation Titles: 076.124-014</li>
<li>OES - Occupational Employment Statistics: 32311, 32317</li>
<li>SOC - Standard Occupational Classification: 29-1125</li>
<li>ONET - Occupational Information Network: 29-1125</li>
</ul>
<br>
This was the html code for 2 of the 404.
SOLUTION
Avatar of Tommy Kinard
Tommy Kinard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oops I ment "How long is the old stuff to keep" means fo 30 characters when 30 is entered

dragontooth

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry it took so long to get back to you, I was on vacation for a few days.

Both Dragontooth and DarkoLord provided information for this script to work.

The final values needed were:

Where does the number start: 27           This was how many characters before the number of the profile
How many digits in the number: 3
How long is the old stuff to keep: 14       This would keep the closing html tags with the previous profile.

Thanks for all of your help guys.

Tobin