SOFTWARE PRODUCTS [ COMMUNICATOR 3000 XL, XL Release 1.1 (Core Software Release A.10.00) ] MPE/iX Communicators
COMMUNICATOR 3000 XL, XL Release 1.1 (Core Software Release A.10.00)
Chapter 3 SOFTWARE PRODUCTS
Introducing the Virtuoso Code Generator
For MPE XL Systems
by Gary Steele, Commercial Systems Division
The Virtuoso Code Generator is a powerful programmer productivity tool
for use in application development and maintenance. Virtuoso has been
available on MPE V/E systems and is now available on MPE XL.
PRODUCT OVERVIEW
The Virtuoso Code Generator is a tool that constructs application code
from reusable components. As an application programmer, you create these
components based on the requirements of your development environment and
the code standards of your site. Once developed, the components can be
shared by everyone in the development environment, thus enforcing
standardization.
By reusing software, the number of lines of code that must be written for
each new application is dramatically reduced. When modifications are
made to an application where software was reused, changes occur in a
single location, thus greatly simplifying application maintenance.
The Virtuoso Code Generator is a flexible tool which can be used to
generate application logic and program documentation. The Generator is
not specific to any particular programming language, but rather provides
a general facility for the generation of text.
The output produced by Virtuoso is determined by the text defined in the
reusable components you have created. For example, components containing
COBOL statements will produce COBOL code. A simple "meta-language"
governs the generation process. The constructs of the meta-language are
interpreted by Virtuoso to produce the desired output.
REUSABLE COMPONENTS
The reusable components that are input to the Virtuoso Code Generator are
called macros and models. Macros are commonly-used segments of code or
text. A macro could be used to open a TurboIMAGE database or display a
FORMSPEC form on a terminal. A model is a generic structure. It
represents a common program structure, such as a program that retrieves a
record from a TurboIMAGE dataset and then displays the data on a FORMSPEC
form. A model can also be used to produce documentation in the format
that is standard for your organization. Both models and macros provide
you with the opportunity to share commonly used code. By sharing code,
productivity is gained, since applications can be built from proven,
tested segments of code.
Virtuoso Macros
The Virtuoso Code Generator Macros are similar to macros that are used by
text processors and programming languages. A macro is essentially a name
and a corresponding set of parameters that represent one or more lines of
text to be generated. The use of macros in the creation of application
logic is analogous to programming in a high level language. The
difference is that you as a programmer have the flexibility to define
that language.
Through the use of macros you will have the programming productivity of a
fourth generation language (4GL). As with a 4GL, a single statement will
perform significantly more processing than a third generation language
such as COBOL. The key differences between Virtuoso and fourth generation
languages are:
* Virtuoso allows you to define the processing that is to occur for
each high level statement. The way in which this processing occurs
will be based on your local standards.
* Virtuoso can be used to generate COBOL, therefore maximizing the
performance of your generated application.
Virtuoso Models
Virtuoso models allow you to reuse entire program structures. By making
these structures "generic" , they can be used to create many different
programs. Models are considered generic because they do not reference
specific data resources. For example, a model that displays a FORMSPEC
form allowing you to enter data that is to be added to a TurboIMAGE
dataset would not reference the name of the screen or the name of the
dataset to which data is to be added. Since the model is generic, you
could use the model to create any type of program, for example, inventory
management, employee information, etc.
HP SYSTEM DICTIONARY INTEGRATION
The HP System Dictionary is used with the Virtuoso Code Generator to
store application information and documentation. System Dictionary is a
central repository for descriptions of data resources. It can also be
used to describe and document your data processing applications. The
Virtuoso Code Generator constructs use these descriptions of your
applications by retrieving entities, relationships, and attributes from
the dictionary then incorporate this information into the generated code.
Models and macros are generic. The specific information about the
application to be created from the model and macros can be stored in
System Dictionary. For example, if a model displays a FORMSPEC form then
allows the user to enter data that will be added to a TurboIMAGE dataset,
the name of the form and the dataset would be stored in the System
Dictionary rather than in the model itself. Since you create the macros
and models used for application development, the requirements for the
types of data that must be stored in the System Dictionary are entirely
up to you.
THE VIRTUOSO SAMPLE LIBRARY
A library of COBOL macros and models is available (as a separate
purchasable product) to serve as a starting point for the development of
your own site specific library. The library illustrates one way that
models and macros can be developed to solve a range of problems. You
will want to examine this library and determine the types of models and
macros that will make your development environment the most productive.
The library contains macros that interface to the common HP 3000
application subsystems:
* Image Macros - Macros that generate COBOL code to call the commonly
used TurboIMAGE intrinsics.
* Hi-Li Macros - Macros that generate COBOL code to call the Hi-Li
intrinsics for forms handling.
* File Macros - Macros that generate COBOL code to perform standard
operations on MPE files.
* BRW Macros - Macros that generate COBOL code to call the BRW
intrinsics.
* Utility Macros - Macros that generate code for common COBOL code
sequences. For example, one utility macro can be used to generate
code for the IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, and DATA
DIVISION of a COBOL program.
* Documentation Macros - These macros generate text that can be used
for producing application documentation.
The models that are included in the library provide a starting point from
which your own site specific models can be developed. Examples of some
of the models contained in the library are:
* A model that generates COBOL code to add, change, or delete
information from a TurboIMAGE detail dataset interactively using a
FORMSPEC form.
* A model that generates COBOL code to add entries to a TurboIMAGE
dataset from one or more FORMSPEC forms.
* A model that generates application documentation based on the
information stored in System Dictionary.
MIGRATION
The Virtuoso Code Generator on MPE XL systems is identical to that on MPE
V/E. All features of the product are the same on MPE V/E and MPE XL. Thus
for any given Virtuoso source file and macro file, the code produced by
Virtuoso on MPE XL will be identical to that produced on by Virtuoso on
MPE V/E.
To migrate the Virtuoso programming environment from MPE V/E to MPE XL
you simply store the Virtuoso source files and the System Dictionary to
tape, then restore these files on MPE XL.
The COBOL applications that you have generated using Virtuoso are
migrated to MPE XL following the COBOL migration guidelines. Any
modifications that are required for the migration of the COBOL code,
should be performed on the Virtuoso source files or the macro files, not
to the generated COBOL code. This will ensure that the incompatibilities
will be removed and any future modifications can be made without
overriding the migration changes.
Since the Virtuoso programming environment is identical, you may use
either MPE V/E or MPE XL as a development platform for applications that
will run on either MPE V/E or MPE XL. For example, MPE XL could be used
exclusively for development and the applications that are generated could
run on either MPE V/E or MPE XL.
MPE/iX Communicators