HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
2-: 54
item and generates a SKIP. If adjacent items can be skipped, the Program
Analyst creates only one SKIP clause to cover those items. The items
that can be skipped are highlighted.
If skippable items are found, pressing RETURN will cause the Program
Analyst to create an ASCII file containing the following statements:
* The original PACKFMT line with the actual statement commented out
with a !.
* The new PACKFMT statement with a line number one greater than the
original.
When this file is merged (using the MERGE command) back into the program,
the original line serves as documentation of the complete record layout.
If you are referencing a PACKFMT statement by a line number instead of a
label, you need to modify the appropriate PACK or UNPACK statement.
When determining the number of bytes in a string variable, the Program
Analyst uses the maximum declared length (or 18 if the string is
undeclared). The Program Analyst assumes that strings are always padded
out to their maximum length before packing them. This is recommended
practice because the maximum length is always used during an UNPACK.
The Optimize PACKFMTs screen can also be used to optimize IN DATASET
statements. You can modify a IN DATASET statement so that it looks like
a PACKFMT statement, optimize the modified statement, merge the state-
ment
into the program, and then modify it back to an IN DATASET statement.
The Extract Subunit Screen. The purpose of this screen is to assist in
dividing large subunits into smaller subunits.
Manually removing lines form one part of a program and using the lines to
create a new subunit can be tedious. There are many dependencies that
must be examined. The Program Analyst can be very useful for extracting
subunits. Using the information in the interpreter, the Program Analyst
can detect all of the following dependencies:
* Branches that will be broken if lines are removed.
* Variables that have been shared between the old and new subunits that
must become parameters or placed in common.
* Single-line functions definitions and OPTION, IMAGE, and PACKFMT
statements that will be needed in the new subunit.
On entry of a line range, the Program Analyst displays the effects of
removing this line range from its subunit. The Program Analyst examines
all GOTOs, GOSUBs, and structured statements to determine whether they
would be affected. It also determines whether variables (including
files) need to be passed as parameters to the proposed new subunit. Once
you have identified a line range that can be extracted without breaking
any branches or structures, the Program Analyst creates the new subunit
and the CALL to it.