CPG3... the modular programming language  
is a combination of program generators and supporting tools. The program generator creates modules which do not contain the whole program code but smaller functions. This functions are called at execution time and are connected to the entire application.This extension of CPG is called HL1 (Hierarchical Language One).

Today there are a lot of tools available to help you in programming applications. Some of this tools are developed for end users. The query is a package where you can extract specific records from VSAM files and list them either online or batch. CPG3 has the connection to many DB systems. By default IBM's IMS, (DL1), DB2 and SQL/DS are the standard DB systems provided. 

HL1
is the program generator for functional modules. By using HL1 the program structure is separated into several smaller units of work. The following example demonstrates the display of booking entries. The root program contains only two operations:

CPG3

the function "Custom" and "Booking". Changing of only some operations like filename or number of rows to be displayed the application may be changed without manipulation of the root phase.
 
HL1: Online = Batch
Controlled by an entry in the options statement, an application becomes a batch or online phase. The same module can be executed by an online or by a batch program (written in CPG, RPG or COBOL).
 
Interface
The DB systems DB2, DL1 and EDN are directly supported by CPG. For other DB systems as ADABAS there are existing modules or programs to provide the access.

CPG3 implements the technique to use programs as (logical) files. That means: a normal READ or UPDATE operation to this program is translated to a CPG internal standard call, and the file - program can perform the function to READ a VSAM file or SQL tables. For the application programmer the READ function gives return code normal or EOF. 

The following example will demonstrate how this works:

Application program 

READ CUSTOM 

Read executes the program: 
CUSTOM

Interface "CUSTOM" 

CALL CUSTOM 

Read on physical file/table

DB  "CUSTOM" 

Table "CUSTOM"

By using this interface technique the data base can be changed without any changes to the application program. Thereby the application becomes more flexible. When changing the database the only point to change the application is the interface module for each logical file.

Tools

Online Ditto
Ditto is a tool for testing purposes. The application programmer may inspect any file defined in the CICS file control table. The display is in hex and character format. Protected by a password, data can be updated, deleted and added.

CPG3

Query
enables you to write reports to all VSAM files which have been specified in the CPG data dictionary. The field selection allows to select only specific fields, the end user may specify decision tables to list only specific lines. The result may be sorted, and the execution of the query can run as a CICS transaction or as a batch job.

Signon
is a tool for resource checking and gives security to applications. The user has to sign on with a password and is allowed only to perform programs he is authorized for by the security administrator.

... Here you can find more information about : 

CPG4, the intelligent programming language 

CPG5, the programming language for the web
CPG1, the proven programming language
CPG2, the modern programming language







Last updated: 10/04/2007