HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

2-: 55
NOTE The Program Analyst allows you to extract a subunit even if there
are broken branches. Manual editing may be required before the new
program can run.
Factors Affecting Extraction. The following factors that can affect
extraction cannot be fully analyzed:
* DATA, READ, and RESTORE statements.
* Report Writer usage.
* SORT USING statements.
* THREAD statements.
* RETURN statements.
* ON ERROR, ON KEY, ON HALT, etc.
The Program Analyst may produce warnings if these features are used in
the subunit being divided. However, the Program Analyst continues to
create the subunit. If will be up to you to make any necessary manual
changes.
When the Program Analyst creates a new subunit, it handles the following
requirements automatically:
* Creation of parameter lists.
* Copying of necessary common block declarations.
* Copying of necessary single-line function definitions.
* Copying of necessary IMAGE and PACKFMT statements.
* Moving declarations of variables that are only using in the new
subunit into that subunit.
* Copying of OPTION statements.
The Program Analyst does not alter your program. It produces two ASCII
files that you can GET and MERGE to create an altered program. If you
are planning to extract more than one subunit, you must do the GET and
MERGE for the first subunits before analyzing subsequent subunits.
Extracting a Subunit. The following is a list of the steps required to
extract a subunit:
1. Renumber the program to allow space between lines so the Program
Analyst can insert any necessary lines.
2. Get and examine a listing. The Program Analyst normally assumes
lines are to be extracted from the MAIN subunit. Also, the
Program Analyst cannot create a multi-line function this way.
Look at the listing to find logical subunit material.
3. Enter the Program Analyst and go to the Extract Subunit screen.
Enter the line range that you want to analyze. Use existing line