The
benefits of an object-oriented and structured-procedural foundation
to 4th Generation application development
A central part of the ACCENT R 4GL and Open SQL is the unique application repository called the Data Base Library (DBL). The DBL serves both as an actively maintained data dictionary and a central storage area for the entire application. The DBL provides information about how each DBL object type is structured, processed, and related.
The DBL structures a modern approach to CASE-oriented design, development, implementation, and maintenance of applications. The DBL is the common interface between the 4th Generation Structured Programming Language (SPL), the 4th Generation Tools and the Open SQL database architecture.
The object orientation of the DBL insulates the programmer from the internal workings of individual modules and routines of the application. The developer does not have to know about the inner workings of the object and thus can concentrate on the more important concept of what to do with the results or actions of the object. Another benefit of the object orientation of the DBL is that the object can be changed without the programmer having to re-design and re-code the entire application. This separation and reusability of the DBL objects provides greater productivity than traditional 3GL and screen-driven-only 4GL’s. Consequently, the developer tells ACCENT R what the application should do, and not specifically how to do it.
DBL objects can be grouped into two categories: General Purpose and Ancillary Purpose. General Purpose DBL Objects are used in most applications employing Oracle. Ancillary Purpose DBL Objects offer special capabilities to facilitate problem solving not possible in other 3GL’s or 4GL’s.
General Purpose Objects
|
Ancillary Purpose Objects
|
The following is a brief summary of each of the DBL objects listed in Figure 1 along with their intended purpose. Figure 1 describes how objects subordinate within ACCENT R Open SQL applications opening Oracle databases. Application development typically starts by manipulating the DBL object and working down the subordination tree to other objects. The list of useful commands which follows the object description is not exhaustive, but will give an idea of how to get started.
Click here to view Figure 1 4GL Application Object Subordination under SQLgateway to Oracle
Data Base Library (DBL) – The DBL is the primary object of ACCENT R in that it contains the definitions for all other objects. The DBL serves as the central application repository for the application system. A DBL is a file which resides within the VAX/VMS directory structure with the default file extension of .DBL. Normally, all modules of an application including data files and indexes are controlled through a single DBL. A useful feature is that the editor which is specified in the system field @EDITOR is automatically invoked when DBL objects are defined or modified. Separate DBL’s are recommended for code libraries. Some useful ACCENT R commands:
Schema Definition (SD) – A Schema Definition (SD) object describes the columns (fields) and rows (records) in a table or Data Set. The SD must be defined before the table or Data Set which it describes is created. The SD specifies the back end database server which will be referenced for the Data Set. The SD is stored entirely within the DBL repository and may be associated with more than one table or Data Set. Some useful ACCENT R commands:
DEFINE SD sd_name
MODIFY SD sd_name
LIST SD sd_name
SDMOD
REMOVE SD sd_nameThe database server type for the table is specified through the FORM IS form_type statement within the SD. Possible form types include ORACLE, RMS INDEXED, RMS RELATIVE, BINARY and others. The SDMOD command will automatically restructure the data to match the changes made. The SD object may call 3GL routines as triggers. Consult Volumes I and II of the ACCENT R Professional Desk Reference Set for more information.
Data Set (DS) – The Data Set (DS) object is the representation of the relational table and consists of a DBL object and a data storage location. The data storage location may be a file on the client computer, VAX cluster, or a server located across the network. All indexing schemes, triggers and referential integrity checks are first applied on the appropriate data server and then on the client through the DBL. The internal DS object contains the name of the associated Schema Definition. Some useful ACCENT R commands:
CREATE DS ds_name
SD sd_name
REMOVE DS ds_name
USE DS ds_nameThe DS object can be created or mapped to an existing file or table. Data in the DS can be displayed, manipulated, processed or joined with other tables with the Interactive Command Language (ICL), On‑line Structured Query Language (OSQL), or the Structured Programming Language (SPL). Consult Volumes I and II of the ACCENT R Professional Desk Reference Set for more information.
Command Module (CM) – The Command Module (CM) is one of the three fundamental procedure-related DBL objects within ACCENT R. The CM may contain any command, verb, or grammar associated with the Interactive Command Language (ICL) and the On-line Structured Query Language (OSQL). Any of the runtime information fields (System Fields) or the runtime function library (System Functions) may be included as well. ICL contains a Data Definition Language, a data manipulation language, a transaction processing language, control-of-flow logic, and an object-oriented Screen Management system called SMF. ICL commands can be invoked dynamically. The CM and the data manipulation language are powerful prototyping tools. See Volume I of the ACCENT R Professional Desk Reference Set for more information about CM objects and ICL. The CM object may call 3GL routines. Generally, the CM is used to connect the objects of the application by invoking Process Modules. Some useful ACCENT R commands:
DEFINE CM cm_name
LIST CM cm_name
MODIFY CM cm_name
REMOVE CM cm_name
USE CM cm_nameProcess Module (PM) – The Process Module (PM) is the second and most important program-related DBL object within ACCENT R. The PM may contain any statement or control-of-flow grammar associated with the Structured Programming Language (SPL). SPL statements are stored within the PM object as compiled machine code. (The SPL language is a procedural 4GL which was designed to encompass the best-loved and most useful capabilities of BASIC, FORTRAN, COBOL, ALGOL, Modula, LISP, SNOBOL and C.) The PM can contain the object-oriented screen management language called SMF, embedded Open SQL statements, and any of the runtime information fields (System Fields) or the runtime function library (System Functions). The PM may invoke or be invoked by 3rd Generation Language programs.
The PM object is the foundation of all ACCENT R 4th Generation Tools (4GT). The DataPaint II screen developer, the Reporter report writer, the MenuMaker menu builder, and the Express executive information system were developed exclusively in ACCENT R PM objects without 3rd Generation Language code. All ACCENT R 4GT were written with ICL and SPL code and exist as CM and PM objects. When used in developer mode, each of the tools function as code generators and produce CM and PM objects as output. The PM object may call 3GL routines. See Volume II of the ACCENT R Professional Desk Reference Set for more information about PM objects and SPL. Some useful ACCENT R commands:
DEFINE PM pm_name
MODIFY PM pm_name
LIST PM pm_name
USE PM pm_name
REMOVE PM pm_nameCode Segment (CS) – The Code Segment (CS) is the third program-related DBL object within ACCENT R. The CS functions as a library of source code for any other DBL objects. Commonly used segments of code can be stored and re-used through the use of the CS object. The CS is stored completely within the DBL repository. Some useful ACCENT R commands:
DEFINE CS cs_name
MODIFY CS cs_name
LIST CS cs_name
REMOVE CS cs_nameEach CS can contain an unlimited number of segments prefaced with the SEGMENT segment_name statement. The segment defined within the CS may be referenced from any other DBL object with the INCLUDE segment_name FROM CS cs_name statement and, optionally, with parameters. Code Segments can be defined without the requirement to define data types of the variables manipulated. The CS object may also reside in another DBL.
Control File (CF) – The Control File (CF) regulates simultaneous access and update for Data Sets using DB-MACH2 RDBMS. The CF object also exists as a separate file at the VMS directory level. Some useful ACCENT R commands:
Data Index (DI) – A Data Index (DI) object provides up to 65,535 single or multi-key sorted order views of the data within a DS using the B-Tree algorithm for DB-MACH2 RDBMS. With DB-MACH2, the DI exists as a separate file on the host computer. The DI is also used for VAX RMS INDEXED or COBOL’s multi-keyed ISAM files. For VAX RMS files, the DS and DI objects actually refer to the same file in the VMS directory structure. Normal interaction with the DI object is accomplished with these ACCENT R commands:
Find Subset (FS) – The Find Subset is a separate index to a DB-MACH2 Data Set which can be built through the FIND command. Find Subsets can be stored, evaluated with UNION, INTERSECTION, and DIFFERENCES identified, and optionally catalogued in the DBL.
Global Storage (GS) – The Global Storage (GS) object provides an area for data storage for program communication between multiple CM and PM objects. The GS object may be mapped to a VAX/VMS Global Section to facilitate inter-process communication, concurrent processing, and real time data acquisition. Some useful ACCENT R commands:
DEFINE GS gs_name
LIST GS gs_name
MODIFY GS gs_name
USE GS gs_name
USE NO GS
REMOVE GS gs_nameIndex Definition (ID) – The Index Definition (ID) object defines a generalized index definition which is associated with a particular Schema Definition. The ID may be referenced by one or more Data Index objects.
System File (SF) – The System File (SF) object refers to any file at the VAX/VMS directory level. Each file may also exist as an SF object within the DBL. It is often very convenient to catalogue each System File associated with the application system as an SF object in the DBL for code management, configuration, and control purposes. SF objects can be used to catalog 3GL programs associated with an application. Some useful ACCENT R commands:
DEFINE SF sf_name
MODIFY SF sf_name
LIST SF sf_name
USE SF sf_nameAn SF which contains ACCENT R commands may be invoked with the USE SF sf_name command. An SF may be removed from the DBL and the VMS directory with the REMOVE SF sf_name command. Each command will function regardless of whether the SF object exists in the DBL. Most DBL objects can be copied to the SF object with the COPY object_type object_name TO SF sf_name command.
System Information (SI) – The System Information (SI) object is a collection of lines of text associated with the current application. The SI object is most often used as a text library for documentation associated with the current system. The SI object is also used to store the design definitions associated with the application system. For example, ACCENT R Reporter stores the report definitions used to generate CM and PM objects as an SI object. You may also use the SI to create your own DBL objects as you build tools within ACCENT R. As with all DBL objects, the text of the SI may be accessed from the SPL statements in PM objects.
Object Interaction and Subordination - An object-oriented approach to application development is that objects or modules of the application are selected and built in a goal-directed fashion. In that sense, ACCENT R is a Total Applications Development Environment. As shown in Figure 2, each object has a specific purpose. For example, in order to control the application, you must first select an object to which all other objects subordinate. The CM (Command Module) and SF (System File) are examples of this interaction. Each DBL object represents one particular type of application building block. Objects can be associated with one another in a modular fashion. It is not necessary for the developer to know about all the internal moldings of an object in order to use it to build an application. An understanding of how DBL objects subordinate to each other is an essential element in applying ACCENT R to application development in a goal-directed fashion.
Each of the DBL objects interacts with, affects, or subordinates to other objects according to Figure 2. The subordination of objects in 4th generation applications development is much like the concept of inheritance and how it applies to object oriented database design. Each square contains the method by which the action takes place, e.g. ICL, SPL. Please note that the General Purpose Objects are presented in their order of importance to top-down application development. For example, the CM (Command Module) and SF (System File) objects can control a PM (Process Module). A PM can access data through an SD (Schema Definition), DS (Data Set), DI (Data Index), ID (Index Definition), or GS (Global Storage).
OBJECT ID |
OBJECT NAME |
OBJECT PURPOSE |
DB-MACH2 RDBMS Simultaneous Update |
||
Interactive Command Language (ICL) Statements |
||
Modular Code Storage |
||
The Central Application Repository |
||
DB-MACH2 RDBMS/RMS Index Definition |
||
Table Definitions containing columns for Database Servers |
||
Row Subsets for Data Sets |
||
Common Block for Variables/Global Sections |
||
General Index Definition |
||
Structured Programming Language (SPL) Statements |
||
Describes Rows in Data Sets |
||
Files in VMS directories catalogued for ACCENT R |
||
Free Format Text Library |
Click here to view Figure 3 Parent To Child Object Subordination
This summary of the function and power of the various DBL objects is intended to serve as a foundation to your mastery of ACCENT R. This section is highly recommended reading for developers new to ACCENT R. Welcome to the complete 4th Generation Environment of ACCENT R.