• Keine Ergebnisse gefunden

Data Utilities

Im Dokument your that (Seite 39-43)

3. UNIVAC OS/3 System Software

3.6. SYSTEM SERVICE PROGRAMS

3.6.1. Data Utilities

The file processing utility allows the user to copy (with or without correction) an input card, magnetic tape, or disc file to any othe~ card, magnetic tape, disc, or printer device. The user can also compare two files for equality. The various options allowed are specified by a series of control statements.

A utility control statement specifies the various options which the user desires. The available options are:

• I nput and output device type specification

• Multiple output devices (one of which is either the printer or the punch) specification

• Copy or compare

31

• Print in LIST or DISPLAY format

• Fixed, variable, or undefined record format

• I nput and output record size and block size

• Column binary or Extended Binary Coded Decimal Interchange Code (EBCDIC) card data format

• Tape rewind specification

• Optional writing of leading tape mark

• Write disc check

• Printed output data format (hexadecimal or character or both)

• Output card stacker select

• Output printer spacing

• Page numbering on printed output

• Position of first logical input record

• Sequence checking of input data

• Printer mismatch specification

• American Standard Code for Information Interchange (ASCII) tape specification

• Cancel compare function after specified number of nonmatching records

• Halt after specified number of input records (or blocks)

• Label checking and writing specification

• Block number checking and writing specification

• Edit by field selection

3.6.2. Linkage Editor

All OS/3 language processors (COBOL, FORTRAN, RPG II, and BAL) produce object elements as the output of their compilation processes. These elements may subsequently be structured into a user-tailored executable program by the UNIVAC OS/3 Linkage Editor (linkage editor). Object elements from various language processor compilations can be structured by the linkage editor into a single loadable program embodying the segment and overlay characteristics described by linkage editor control statements. Additionally, the object elements thus collected may contain cross-references to each other for specific purposes of program execution and communication.

3.6.2.1. Loadable Program Structure

The loadable program that the linkage editor builds can consist of program segments fashioned into multiple regions.

Each of these regions is structured as a hierarchical tree with specific boundaries inherently defined as branches of a tree trunk, or root segment. This structure permits a user to produce a program that is larger than the main storage area assigned for its execution. The various segments of a multiphase load module are loaded and executed as required by the logic of the program. The responsibility for loading the various phases of a program can be assumed by the user programmer, which requires that the appropriate FETCH and LOAD macro instructions be incorporated in his object elements, or loading may be left for the linkage editor to resolve based on the cross-references contained in the various object module elements. If the latter option is chosen, the cross-references contained in the object elements included in the load module must be of the V-CON type.

The following diagram illustrates the division of a loadable program into segments.

SEGMENT designated as the root phase segment. The user's tools for establishing cross-references between processor object elements are:

1. Language processor external reference declarations (EXTRN) used to create indirect references in requesting object elements.

2. External definition declarations (ENTRY) used to create indirect definitions in satisfying object elements.

These declarations are used by the linkage editor to resolve cross-references between two or more object modules that are linked together at link-edit time. Executable program generation is, therefore, essentially a two-fold process:

1. The source program code must be compiled by the various language processors to produce one or more object modules.

2. The various object module elements that are to comprise an executable program must be combined into a single executable load module by the linkage editor.

At link-edit time, the linkage editor assigns, to the object module elements included in the load module, a new relative address based upon their new relative position within the load module. Any cross-references that exist between object module elements are satisfied by replacing them with the relative address of their respective definitions or references, as the case may be.

The output of the linkage editor is, therefore, a loadable executable program acceptable to the OS/3 loader.

33

The role of the linkage editor in program preparation is shown in Figure 3-4.

\~

SOURCE ELEMENTS

COMPILE

LANGUAGE PROCESSORS

OBJECT ELEMENTS

LINK

LIBRARIES

LINKAGE EDITOR

CONTROL STATEMENTS

Figure 3-4. Program Preparation

LOAD ELEMENTS

EXECUTE

LOADER

The ability of the linkage editor to construct a single executable load program from several object elements has the following major advantages:

• If a change is required in one of the object elements included, only the specific object element involved must be compiled or assembled again.

• The various source elements may be written in the appropriate language, such as COBOL, FORTRAN, RPG II, or BAL, and combined into a single executable program.

• Routines common to two or more object elements need be assembled or compiled only once and the resulting object code linked as needed; the result is reduction in the total time required to generate an executable program.

In addition to the basic linking function, the linkage editor performs the following:

• Searches an appropriate library and incorporates object elements other than those in its primary input, either on request or automatically.

• Performs program modification by deleting and rearranging control sections of an object element as directed.

Im Dokument your that (Seite 39-43)