Three (and Multi) Tier Architecture is a popular way for organizing
residual applications using current technologies. This architecture
separates applications into these layers: the physical data; a data
description (schema) and access layer; and the "scripts"
or programs that operate on the data. Most often, the schema layer
is associated with a database management system middleware.
The data may
reside today in flat files, and tomorrow in a commercial Database
such as DB2, Oracle, MySQL, et cetera. For the purpose of the tiered
architecture, where and how it is stored and organized is separated
from its schema-guided structured access, and its program script
use.
One advantage
of this organization is the ability to separate the development
of new applications from the storage and organization of the data.
This allows you to move data from flat files to an RDBMS or an OODB,
and then re-configure the database or Middleware access, with the
change being noticed by the application programs and users. This
also lets you port applications to faster cheaper computers by merely
simulating the data access services of the Middleware.
Other advantages
usually come from various packages that come with, or can easily
be integrated with the middleware. Examples include packages such
as Crystal Reports and Oracle Financials. Finally, the encapsulation
of data is a step towards Object Orientation, with its promises
of flexibility and reuse.
To make use
of middleware packages, you may need J & C Migrations to decipher
the data definitions hidden in RPGII applications, and format them
into record descriptions that can be loaded directly to middleware
data dictionaries and schema repositories.
Click here for the Schema Capture expert!
Today's COBOL
extensions relate to Database, GUI, and Internet interfaces, but
the principles of creating code that is at the same time Feature
Rich, Standard Compliant, and Highly Portable, remain the same.
The generation and teaching of COBOL that is both Standard Compliant,
Current, and Portable are the art and science of J & C Migrations.
COBOL for RPGII programmers
1. A brief history of COBOL
Inspired by Rear Admiral Grace Hopper, and with significant
backing by the US Navy, COBOL was developed in the early 1960s as an Industry
(rather than proprietary) COmmon Business Oriented Language. To this day COBOL
is the most common 3GL in the world. Commercial quality COBOL facilities are
available for Mainframes, Minicomputers, UNIX servers and workstations, and
PC systems.
COBOL has had
De Jure standards, including the 1968, 1974, and 1985 ANSI standards
adapted by ISO and IEC. The 1985 standard had two amendments, the
Intrinsic Functions amendment in 1989, and corrections and clarifications
in 1992. The next standard, currently being developed jointly by
ANSI and ISO, is expected to be approved in 2002.
COBOL also has
certain De Facto extensions. For example, while the De Jure standards
identify the double quote (") as the quote literal, practically
all commercial compilers on the market allow the use of the apostrophe
(') as a quoting literal.
The organizations
that have participated in the COBOL development and standardization,
have included CODASYL, ANSI, and ISO/IEC. COBOL has also benefited
from the activities of consortia, such as the X/Open organization.
2. COBOL language concepts
COBOL is a structured
language. Programs, divisions, sections, and paragraphs, specify
(in this order), identification, the operating environment, data
descriptions, interfaces, and operational procedures.
Programs allow
encapsulation, or interface based programming. Modularity allows
component substitution with minimal disruption, and is considered
just as desirable for Software, as it is for hardware.
Divisions, sections,
and paragraphs, organize the program into logical elements of interface
and internal definitions, data descriptions and procedural code.
COBOL is mostly
a Free Form language, with very minimal column sensitivity. COBOL
allows long and descriptive names. This allows COBOL source to be
written in a self documenting fashion, which was an intended design
goal. However, its verbosity has led to multiple abbreviations a
person needs to master in order to become fluent.
3. COBOL source structures
Each COBOL program
is composed of divisions. The identification division identifies
the program (like columns 75-80 of the H-spec). The environment
division has a configuration section which provides for the other
facilities of the H-spec. The input-output section of the environment
division defines the program files. The data division starts with
the File section, which completes the definition of files and their
records or I-O buffers, and proceeds with a Working-storage section
for the definition of program variables, arrays, and data structures.
A linkage section concludes the data division with the description
of received parameters. These definitional sections are followed
by a Procedure Division, whose sections are not predefined.
Your comments are key to improved service!
--------------------------------------------------------------------------------------------------------------------
RPGII for COBOL programmers
1. A brief history of RPGII
RPGII is a 3rd
Generation Language (3GL) that evolved out of a popular Report Program
Generator (RPG) Mainframe utility. The language has inherited its
column-sensitive form and many strengths from the utility.
IBM used RPGII
as the primary language on its minicomputers, extending it along
with its System 3, System 32, System 34, and System 36 series. In
competition and complementation to IBM, many other vendors have
provided dialects of RPGII that were adapted to their environments.
Beginning with
the System 38, and continuing with the AS/400, IBM have extended
the RPG language with 4GL features that support these platforms'
Database environment.
2. RPGII Language Concepts
Unlike most
other 3GL, RPGII is programmed in fixed templates, and is neither
Free Format, nor structured into Definitional and Procedural sections.
Data items and complex procedures are defined together, often on
the same source line.
Most columns
of an RPGII source template are interpreted in a way similar to
the Indicator Area in a COBOL program, which may contain a space
( ), the letter D, an asterisk (*), a dash (-), or a forward slash
(/), with each having very well defined implications for the interpretation
of the source line.
As a result
of the above, RPGII tends to be extremely concise and cryptic. Cryptic
code does not lend itself to long term maintenance by people other
than its authors. While it is possible to write an RPGII program
which sorts and reads a consecutive transaction file, and updates
an indexed master file with its transactions, in 10 source lines,
deciphering such a program and repairing it can be a challenge.
Each RPGII specification
can be seen as having three elements: A precondition, a primary
purpose, and a postcondition. The conditions have been associated
with Condition Indicators, or simply Indicators. The indicators
have two character symbols, and predefined locations on each specification
type.
Unlike other
3GL, RPGII program control flow is predefined. This predefined program
execution order is called the RPGII Cycle. File input is either
controlled from the calculations, or directly by the Cycle. For
Cycle controlled files, Input Extraction and Output Formatting from
and to the I-O buffers are executed as subroutines of the Cycle.
Calculations are also executed as subroutines of the Cycle.
The source code
defines the files, input-output areas, and data structures that
the program uses as well as Data Item Contents Triggers ("Level
breaks" and "Matching fields") associated with Input
fields.
RPGII is largely
a Batch language, although IBM and the seven dwarves have extended
it with a different Interactive facility for each platform.
The J &
C Migrations translation of RPGII to COBOL has a unique solution
for the management of Cycle files without pointers. This solution
allows the COBOL code to execute as a single unit, without need
for a separate Runtime.
3. RPGII Specifications (column 6 when column 7 isn't * or /)
H - Identification
Division, Special-Names paragraph, and more.
F - Input-Output and File sections' information, and more.
E - Arrays, Tables, and Extended file processing options.
L - Linage information.
I - Record and Field Input, Change & Match fields, and more.
C - Calculations, and other Procedure Division subroutines.
O - Record and Field Output formatting, WRITE, REWRITE, and DELETE.
These are augmented
with initialization data for tables and arrays, which have a separate
and different identification scheme.
In addition
to these, specifications have been added for a variety of Interactive
and auxiliary facilities, and templates range from A to Z, and have
different uses on different platforms. Examples include the U (autoreport)
and S (sort and selection) specifications on the IBM Mainframe,
S & D screen definitions on IBM S/36, Wang's A (alternate index
path), and W (workstation screen) specifications, and others.
We'll be glad to receive your comments!
--------------------------------------------------------------------------------------------------------------------