[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP COBOL
Reference Manual


Previous Contents Index

SAME AREA Clause

  1. The SAME AREA clause is for documentation only.

SAME RECORD AREA Clause

  1. The SAME RECORD AREA clause causes two or more files named by same-area-file to share the same memory area for the current logical records.
  2. If you specify the SAME RECORD AREA clause, more than one same-area-file (or all of them) can be open at the same time.
  3. Any record in the shared area becomes the current logical record of:
    • Each same-area-file of the SAME RECORD AREA clause open in OUTPUT mode
    • The most recently read same-area-file of the SAME RECORD AREA clause open in INPUT mode

    The logical records start with the same leftmost character position. Thus, the SAME RECORD AREA clause is equivalent to an implicit redefinition of the shared area.

SAME SORT (SORT-MERGE) AREA Clause

  1. The SAME SORT (SORT-MERGE) AREA clause is for documentation only.

RERUN Clause

  1. The RERUN clause is for documentation only. It has no effect on program execution.

MULTIPLE FILE TAPE Clause

  1. The MULTIPLE FILE TAPE clause specifies the location of a file or files on a reel/unit device. The location of the file or files can be specified as a relative location by providing a multiple-file series. The specific file location can be specified by the POSITION phrase.
  2. The MULTIPLE FILE TAPE clause specifies the location of a file or files when more than one file shares the same physical reel of tape. If the files in the multiple-file sequence are listed in consecutive order, the POSITION phrase is not required. If the files in the multiple-file sequence are not listed in consecutive order, the position of the file or files (relative to the beginning of the tape) must be specified in the POSITION phrase.
  3. Only those multiple-files referenced by the program need to be specified in a MULTIPLE FILE TAPE clause.
  4. If a file is specified with a POSITION phrase of a MULTIPLE FILE TAPE clause, subsequent files listed in that MULTIPLE FILE TAPE clause which are not specified with a POSITION phrase are assumed to be in the next higher position.
  5. Only one file listed in a MULTIPLE FILE TAPE clause sequence can be open at any one time.
  6. If, at run-time, the run-time system determines that the files referenced are not located on a reel device, the MULTIPLE FILE TAPE clause is ignored.

Technical Notes

  • On Tru64 UNIX systems, many elements of the I-O-CONTROL paragraph are for documentation only. They are accepted and ignored by the compiler. These elements are as follows:
    DEFERRED-WRITE
    EXTENSION
    FILL-SIZE
    CONTIGUOUS
    CONTIGUOUS-BEST-TRY
    PREALLOCATION
    PRINT-CONTROL
    WINDOW <>
  • On OpenVMS, the following notes describe the effects of APPLY clause phrases on parameters in the RMS file access block (FAB) and RMS record access block (RAB) associated with file-name on OpenVMS Alpha and I64 systems. The FAB and RAB fields are described in the OpenVMS Record Management Services Reference Manual.
    • The DEFERRED-WRITE phrase sets the DFW bit in the FOP field of the FAB.
    • The EXTENSION phrase stores extend-amt in the DEQ field of the FAB.
    • The FILL-SIZE phrase sets the LOA bit in the ROP field of the RAB.
    • The LOCK-HOLDING phrase sets the ULK bit in the ROP field of the RAB.
    • The PREALLOCATION phrase stores preall-amt in the ALQ field of the FAB.
    • The CONTIGUOUS phrase sets the CTG bit in the FOP field of the FAB.
    • The CONTIGUOUS-BEST-TRY phrase sets the CBT bit in the FOP field of the FAB.
    • The PRINT-CONTROL phrase sets bits in two FAB fields:
      • The PRN bit in the RAT field
      • The VFC bit in the RFM field
    • The WINDOW phrase stores window-ptrs in the RTV field of the FAB. <>

    Additional References

    Additionally, refer to the HP COBOL User Manual for more information.


    Chapter 5
    Data Division

    This chapter describes the logical and physical concepts that apply to the Data Division. In addition, this chapter presents the general formats for all Data Division entries and clauses, describes their basic elements, and lists rules of use.

    The Data Division defines the data processed by your COBOL program in both physical and logical terms. It also specifies whether the data is contained in files, a database, Oracle CDD/Repository, or is developed only for local use in your program.

    The File and Report Sections of your program define data contained in files. A file description, sort-merge file description, or report file description entry creates a logical structure, or file connector, that refers to the physical file. It also can contain clauses that define physical file characteristics. A file description or sort-merge file description entry must be associated with at least one record description entry. A record description entry is a set of one or more data description entries, organized in a hierarchical structure which logically defines a set of related data within the file. The data description entries specify all the data used in your program. You logically define the record hierarchy by the level numbers you use for the data description entries (or entry) within the record description entry. Your logical link to a record or to a field in a record is the data-name you assign in a corresponding data description entry. The clauses in a data description entry also specify physical data attributes, such as storage format and initial values.

    A report description entry must be associated with a report group description, which specifies both the logical hierarchy of data in the report and the data's physical attributes.

    A screen description entry describes a video form or a portion of a video form.

    The Working-Storage and Linkage Sections also contain data description entries, which describe characteristics of data developed for use in your program.

    The following sections explain in more detail how a COBOL program specifies physical and logical characteristics. Additionally, the following sections describe how record descriptions impose logical structures on data, and how the physical attributes of data affect the way data is stored and manipulated.

    5.1 Logical Concepts of Data Storage

    Because a record description is a logical, rather than a physical structure, a program can define more than one record description for the same data. However, this redefinition does not mean that the physical data changes in any way. Multiple record descriptions for the same data all apply to one physical data unit on the file medium.

    When you refer to a data-name in a Procedure Division statement, you are referring to a logical unit, either a logical record or a logical subset of that record. When your COBOL source statements execute, the logical units to which they refer are mapped to physical units on media. The logical units are then manipulated according to their physical attributes.

    The correspondence between a logical record and a physical record is not necessarily a one-to-one correspondence. The term physical record applies to a data unit that is media dependent and defined by the I/O system. On OpenVMS systems, the I/O system is called OpenVMS Record Management Services (RMS). A logical record may correspond to one physical record, either alone or grouped with other logical records. Or, on disk, a logical record may need more than one physical record to contain it.

    Several COBOL clauses (in the Environment and Data Divisions) describe the relationships between logical records and physical records. Programs can then access data as logical entities with little regard to the physical data definitions that the I/O system requires.

    During program execution, data transfer between the program and a physical record can involve translation if the SELECT clause contains a CODE-SET clause.


    Previous Next Contents Index