THE IDENTIFICATION DIVISION - IBM Mainframe

In the Identification Division, you name the program and give other identifying information about it. The division header and the PROGRAM-ID paragraph are the only required elements. The PROGRAM-ID paragraph names your program. Other programs use the name assigned by the PROGRAM-ID paragraph to call this program. If you specify the LIST compiler option, the name you use in the PROGRAM-ID appears on your program listing after compilation. If you specify the NAME compiler option, the name you use in the PROGRAM-ID is placed on the NAME Linkage Editor control statement to identify the object module resulting from the compilation. You can specify the program attributes COMMON and INITIAL with the PROGRAM-ID clause.

The COMMON attribute specifies that the program can be called by the containing program or by any program within the containing program. However, the COMMON program cannot be called by any program contained within itself. Only contained programs can have the COMMON attribute. The INITIAL attribute specifies that whenever a program is called, it is placed in its initial state, and any of its contained programs are also placed in their initial state. Essentially, a program is in its initial state when data items having VALUE clauses are set to the specified value or altered GOTOs and PERFORM statements are set to their initial states, and internal files are closed.

The other Identification Division paragraphs are optional and treated as documentation. You can use them for descriptive information about your program. The DATE-COMPILED paragraph, for example, inserts the compilation date in place of any comments you enter.

Listing Header in the identification Division

The header on the first page of your source statement listing contains the identification of the compiler and the current release level, the current date, plus the date and time of compilation and the page number. You can change the header on succeeding pages of the listing with the compiler-directing TITLE statement. If you do not use the TITLE statement, the header remains the same throughout the listing. For example:

For the succeeding pages in the listing, you can change the first 65 characters of this header with the TITLE statement. For example:

TITLE 'PAYROLL CALCULATION PROGRAM'.

The TITLE statement forces a new page and produces the specified header on that new page and succeeding pages of the listing. Besides the title you specify to replace the first 65 characters of the default header, each new header line contains:

  • The name of the program being compiled as specified on the PROGRAM-ID statement. (The name space is blank for pages in the listing that proceed the processing of the PROGRAM-ID statement.)
  • The date and time of the compilation
  • The page number For example:
  • PAYROLL CALCULATION PROGRAM Date 03/04/97 Time 08:23:45 PACE 2

    You can specify one header for your entire listing or you can change the header several times throughout the listing. The title is left justified at the top of the page. It must be* a nonnumeric literal. The TITLE statement:

  • Can be specified in any division. (However, it is recommended that you code it as the last statement in the Identification Division.)
  • Cannot be continued on the next line.
  • Is not printed on the source listing.
  • Has no effect on compilation or program execution.

Checklist for the Identification Division

To avoid the mistakes most commonly made in the Identification Division, verify the following:

  • Is the division header spelled correctly and without hyphens?
  • Are all the necessary periods included?
  • Are the hyphens properly placed in PROGRAM-ID, DATE-WRITTEN, and DATE-COMPILED?
  • Is everything coded in the correct margin or area?

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics