CPG1... the proven programming language
CPG1 is the original program generator, which produces a CICS assembler program from a program written in RPG. This program was sold since the early 1980s in the US as "CPG the language" by Insac Inc, Atlanta, Georgia.
RPG example
FlashMVC B+2(3),A
 
CPG1 consists of three components: the generator, the central routine library with the CICS interface and the IOCS interface. The

Generator
is a program which produces from RPG source code (see example "MOVE") the assembler code necessary for the execution of the operation.

Not always, on RPG command can be described by only one assembler instruction as in this example. A READ operation to read a data record for example, requires more than hundred assembler instructions. The generator removes thus a large part of its work from the programmer and reduces thereby the programming work to a minimum.

CPG1 produces code, which is not dependent of manufacturers of machines, but assembler source code and is thereby independent of all technical modifications of the hardware.

The
                                                  Central Routine Library     
CPG1                  [Central Routine Library]   
is a collection of program routines (processings and access methods), which are loaded into the storage before the execution of the first program. It contains all routines for the CPG operations. So they are loaded only once into the main storage, not for every operation in every program. An example is the adjustment of the decimal places of arithmetic operations.
Since the computer counts only binary, the data fields must be shifted due to the defined decimal places depending upon requirement to the left or to the right. In order to avoid that the code for this adjustment is produced by each operation, an appropriate universal routine is placed into the central routine library and called by each operation. Further examples are: The analysis of the input fields of the display, the editing of display outputs etc. A subset of the central routine library is the


CICS Interface.
[Application Program]                 [Interface]
     
The INTERFACE contains all necessary CICS commands. Thus the generator can be reduced to pure assembler code and is thereby independent of changes of the CICS release. With installation of a new CICS version, only this INTERFACE must once again be converted. All application programs remain unaffected, because the program only branches out  to a neutral connection point for the command. The

IOCS interface
also makes the generator independent of the systems software. With a version change of the operating system, only this interface is converted once and the change is made. This also applies for a change for example of the operating system VSE to the operating system OS/390 or z/OS.
 
Here you can find more information about:

CPG5  the programming language for the web.
CPG4  the intelligent programming language.
CPG3  the modular programming language.
CPG2  the modern programming language.






Last updated: 10/04/2007