TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

Easytrieve Library Section

Library Section:

The library section of your program provides:

  1. A general description of the groups of data (files) on which your program is to operate (through the FILE statement).

  2. A specific description of the individual items of data (fields) within each record of the files or within working storage (through the DEFINE statement).

The library section of your program describes the information that your program processes. This description is in terms of files, records, and fields.


A file is a group of records whose attributes (such as the type of file, the type of device on which it resides, and the format of its records) are provided in the FILE statement parameters.


A record is a collection of fields, organized in a consistent format. For example, in a file that contains a payroll history for each employee in a company, a record is all the information about one employee.


A field is an elementary item of information. A field represents a single attribute of a single record. For example, in a record that contains all the information about one employee, a field is a single attribute (such as age or length of service) of that employee. The DEFINE statement parameters specify the characteristics of a field (such as location, length, and data format).

The library section of the Sample Program copied below.

      2 *
      3 FILE PERSNL FB(150 1800)
      4   NAME                     17 16 A
      5     LAST-NAME            NAME  8 A
      6   PAY-GROSS                94  4 P 2
      7   DEPT 98 3 N
      8   DATE-OF-HIRE 136 6 N
      9     HIRE-MM DATE-OF-HIRE 2 N
      10    HIRE-DD DATE-OF-HIRE +2 2 N
      11    HIRE-YY DATE-OF-HIRE +4 2 N
      12  SALARY W 4 P 2
      13  BONUS W 4 P 2
      14  RAISE W 4 P 2
      15  SERVICE W 2 N
      16  CURR-DATE S 6 N
      17    CURR-MM CURR-DATE 2 N
      18    CURR-DD CURR-DATE +2 2 N
      19    CURR-YY CURR-DATE +4 2 N
      20 *
      22 *

We will see different Easytrieve statement in the Library section in next chapter.

If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal