Rational Developer for System z, Version 7.5

Program

The purpose of the Program entity is to develop and implement all the procedures defined in the detailed analysis phase.

A batch program reads and writes files and creates Reports (formatted text files).

The generated read and write operations will be adapted to each type of file (sequential, indexed, SQL, etc).

The structure of each file and the controls to perform on the records are defined in a Data Structure.

Program structure

A Program is organized as a set of successive processing steps. These processing steps include:
  • Getting the data,
  • Checking,
  • Updating,
  • Printing,
  • Returning the output.
Each of these processing steps consists of a group of homogeneous sequences of instructions called 'functions'.
Two other principles structure a Program:
  • The linear sequence of functions in the logical order of their execution. Each function executes a functional or technological task in the Program. A function is identified by a code from 0A to 99.
  • The hierarchical structuring of the processing steps in each function. A function can be broken down into sub-functions which, in turn, can be further broken down into sub-functions, and so on.
Functions and sub-functions follow one another in the order of their codes, as determined by the EBCDIC collating sequence, with letters preceding numbers, regardless of the sorting sequence in effect on the material in use.

Generation principles

Programs are generated upon request in the type of COBOL code which corresponds to the operating system and compiler for which they are designed.
  • The COBOL IDENTIFICATION DIVISION is generated from the Program Definition and possible updates made in specific code.
  • The ENVIRONMENT DIVISION and the FILE SECTION are generated from the Data Structures' calls and from possible additional information or updates entered in specific code.
  • The other sections of the DATA DIVISION are generated from the Data Structures' calls, completed or updated in specific code.
    Each generated Program contains, in its WORKING-STORAGE SECTION, a CONSTANTES-PAC field where the following VALUES are declared:
    • the generation session number of the Program (NUGNA),
    • the code of the Library in which the Program is defined (APPLI),
    • the generation date of the Program (DATGN) (MM/DD/YY if user language = 'E', or DD/MM/YY otherwise),
    • the code of the Program (PROGR),
    • the code of the user who requested the generation (CODUTI),
    • the generation time of the Program (TIMGN),
    • the external name of the Program (PROGE),
    • the code of the Database (COBASE),
    • the generation date with century (DATGNC) (MM/DD/CCYY if the user language is English, or DD/MM/CCYY otherwise),
    These fields can be used in the execution report of the Program. They are preceded by the "WORKING" literal, which can be used as a tag in a 'dump' in case of an abnormal execution.
  • The PROCEDURE DIVISION is generated from the Data Structures' or Segments' calls, from the processing specified in specific code and in the '-CP Lines' tab.

For explanations on the generated Program, refer to the Batch Applications manual (chapter 'Example of a Generated Program') which you can find at the following URL:

http://www-1.ibm.com/support/docview.wss?rs=37&context=SSEP67&uid=swg27005478

Related tasks
Creating a Program
Related reference
New Program wizard

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)