FIPS PUB 21-4

NIST

PUBLICATIONS

u.s. DEPARTMENT OF COMMERCE

Technology Administration

National Institute of Standards and Technology

FIPS PUB 21-4

FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION

(Supersedes FIPS PUB 21-3—1990 January 12)

COBOL

Category: Software Standard Subcategory: Programming Language

1995 JANUARY 23

JK

468

. A8A3

m. 21-4
#
FIPS PUB 21-4

FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION

(Supersedes FIPS PUB 21-3—1990 January 12)

COBOL

Category: Software Standard Subcategory: Programming Language

Computer Systems Laboratory

National Institute of Standards and Technology

Gaithersburg, MD 20899-0001

Issued January 23, 1995

U.S. Department of Commerce

Ronald H. Brown, Secretary

Technology Administration

Mary L. Good, Under Secretary for Technology

National Institute of Standards

and Technology

Arati Prabhakar, Director
Foreword

The Federal Information Processing Standards Publication Series of the National

Institute of Standards and Technology (NIST) is the official publication relating to

standards and guidelines adopted and promulgated under the provisions of Section

111 (d) of the Federal Property and Administrative Services Act of 1949 as amended by

the Computer Security Act of 1987, Public Law 100-235. These mandates have given the

Secretary of Commerce and NIST important responsibilities for improving the utilization

and management of computer and related telecommunications systems in the Federal

Government. The NIST, through its Computer Systems Laboratory, provides leadership,

technical guidance, and coordination of Government efforts in the development of stan¬

dards and guidelines in these areas.

Comments concerning Federal Information Processing Standards Publications are

welcomed and should be addressed to the Director, Computer Systems Laboratory,

National Institute of Standards and Technology, Gaithersburg, MD 20899.

James H. Burrows, Director

Computer Systems Laboratory

Abstract

This publication announces the adoption of American National Standard COBOL, as

specified in ANSI X3.23-1985, X3.23a-1989 and ANSI X3.23t>-1993, as a Federal Infor¬

mation Processing Standard (FIPS). This revision supersedes FIPS PUB 21-3 and re¬

flects corrections and clarifications to the COBOL specifications. The American National

Standards define the elements of the COBOL programming language and the rules for

their use. The purpose of the standards is to promote portability of COBOL programs for

use on a variety of data processing systems. The standards are used by implementors

as the reference authority in developing processors and by users who need to know the

precise syntactic and semantic rules of the standard language.

Key words: COBOL; data processing; Federal Information Processing Standard; infor¬

mation interchange; information processing; Intrinsic Function; programming language;

software; standards conformance.

National Institute of Standards U.S. Government Printing Office

Washington: 1995

For sale by the National

Technical Information

Service

U.S. Department of Commerce

Springfield, VA 22161

and Technology

FIPS PUB 21-4

8 pages (Jan. 23, 1995)

CODEN: FIPPAT
FIPS PUB 21-4

Federal Information

Processing Standards Publication 21-4

1995 January 23

Announcing the Standard for

COBOL

Federal Information Processing Standards Publications (FIPS PUBS) are issued by the National Institute of Standards and Technology

(NIST) after approval by the Secretary of Commerce pursuant to Section 111 (d) of the Federal Property and Administrative Services

Act of 1949 as amended by the Computer Security Act of 1987, Public Law 100-235.

1. Name of Standard. COBOL (FIPS PUB 21-4).

2. Category of Standard. Software Standard, Programming Language.

3. Explanation. This publication announces the adoption of American National Standard COBOL, as

specified in ANSI X3.23-1985, X3.23a-1989 and ANSI X3.23b-1993, as a Federal Information Processing

Standard (FIPS). This revision supersedes FIPS PUB 21-3 and reflects corrections and clarifications to the

COBOL specifications. The American National Standards define the elements of the COBOL programming

language and the rules for their use. The purpose of the standards is to promote portability of COBOL

programs for use on a variety of data processing systems. The standards are used by implementors as the

reference authority in developing processors and by users who need to know the precise syntactic and

semantic rules of the standard language.

4. Approving Authority. Secretary of Commerce.

5. Maintenance Agency. Department of Commerce, National Institute of Standards and Technology

(NIST).

6. Cross Index.

a. American National Standard for Information Systems—Programming Language—COBOL, ANSI

X3.23-1985, ISO 1989-1985.

b. American National Standard for Information Systems—Programming Language—Intrinsic Function

Module for COBOL, ANSI X3.23a-1989.

c. American National Standard for Information Systems—Programming Language—Correction and

Clarification Amendment for COBOL, ANSI X3.23b-1993.

7. Related Documents.*

a. Federal Information Resources Management Regulation (FIRMR) Subpart 201.20.303, Standards,

and Subpart 201.39.1002, Federal Standards.

b. Federal Information Processing Standards Publication 29, Interpretation Procedures for Federal

Information Processing Standards for Software.

c. NBS Special Publication 500-117, Selection and Use of General-Purpose Programming Languages.

* Refers to most recent revision of FIPS PUBS.

1
FIPS PUB 21-4

8. Objectives. Federal standards for high level programming languages permit Federal departments and

agencies to exercise more effective control over the production, management, and use of the Government’s

information resources. The primary objectives of Federal programming language standards are:

- to encourage more effective utilization and management of programmers by insuring that program¬

ming skills acquired on one job are transportable to other jobs, thereby reducing the cost of

programmer re-training;

- to reduce the cost of program development by achieving the increased programmer productivity that

is inherent in the use of high level programming languages;

- to reduce the overall software costs by making it easier and less expensive to maintain programs and

to transfer programs among different computer systems, including replacement systems; and

- to protect the existing software assets of the Federal Government by insuring to the maximal feasible

extent that Federal programming language standards are technically sound and that subsequent

revisions are compatible with the installed base.

9. Applicability.

a. Federal standards for high level programming languages should be used for computer applications

and programs that are either developed or acquired for government use. FIPS COBOL is one of the high level

programming language standards provided for use by all Federal departments and agencies. FIPS COBOL

is especially suited for applications that emphasize the manipulation of characters, records, files, and

input/output (in contrast to those primarily concerned with scientific and numeric computations).

b. The use of FIPS high level programming languages is strongly recommended when one or more of

the following situations exist:

- It is anticipated that the life of the program will be longer than the life of the presently utilized

equipment.

- The application or program is under constant review for updating of the specifications, and changes

may result frequently.

- The application is being designed and programmed centrally for a decentralized system that employs

computers of different makes, models and configurations.

- The program will or might be run on equipment other than for which the program is initially written.

- The program is to be understood and maintained by programmers other than the original ones.

- The advantages of improved program design, debugging, documentation and intelligibility can be

obtained through the use of this high level language regardless of interchange potential.

- The program is or is likely to be used by organizations outside the Federal Government (i.e., State

and local governments, and others).

c. Nonstandard language features should be used only when the needed operation or function cannot

reasonably be implemented with the standard features alone. Although nonstandard language features can

be very useful, it should be recognized that their use may make the interchange of programs and future

conversion to a revised standard or replacement processor more difficult and costly.

d. It is recognized that programmatic requirements may be more economically and efficiently satisfied

through the use of report generation, database management, or text processing languages. The use of any

facility should be considered in the context of system life, system cost, data integrity, and the potential for data

sharing.

2
FIPS PUB 21-4

e. Programmatic requirements may be also more economically and efficiently satisfied by the use of

automatic program generators. However, if the final output of a program generator is a COBOL source

program, then the resulting program should conform to the conditions and specifications of FIPS COBOL.

f. When it is determined that a programming language that has been adopted as a FIPS is to be used

for an application or program, a processor conforming to the FIPS programming language shall be used, if

available. It is not intended that existing programs be rewritten solely for the purpose of conforming to a FIPS

programming language. If a program is to be part of an existing application written in a programming

language not conforming to a FIPS, the language processor used for the existing application may be used

for the new program.

10. Specifications. FIPS COBOL specifications are the same as American National Standard COBOL as

specified in ANSI X3.23-1985, ANSI X3.23a-1989 and ANSI X3.23b-1993.

ANSI X3.23-1985, ANSI X3.23a-1989 and ANSI X3.23a-1993 specify the form of a program written in

COBOL, formats for data, and rules for program and data interpretation.

The standards do not specify limits on the size of programs, minimum system requirements, the means

of supervisory control of programs, or the means of transforming programs internally for processing.

In addition, the following requirements apply:

a. For purposes of FIPS COBOL, the modules defined in ANSI X3.23-1985 and ANSI X3.23a-1989

are combined into three subsets and four optional modules. The three subsets are identified as Minimum,

Intermediate, and High. The four optional modules are Report Writer, Communication, Debug, and Segmen¬

tation. These four optional modules may be associated with any of the subsets.

The high subset is composed of all language elements of the highest level of all required modules. The

intermediate subset is composed of all language elements of level 1 of all required modules except the

Intrinsic Function module. The minimum subset is composed of all language elements of level 1 of the

Nucleus, Sequential l-O, and Inter-Program Communication modules.

The following table reflects the composition of the required subsets and the relationship of the subsets

and the optional modules. The numbers in the table refer to the level within a module as designated in ANSI

X3.23-1985 and ANSI X3.23A-1989, and a dash denotes the corresponding module is omitted or may be

omitted.

COBOL Subsets

Modules

Required

Minimum Intermediate High

Nucleus 1 1 2

Sequential 1-0 1 1 2

Relative 1-0 - 1 2

Indexed 1-0

Inter-Program

— 1 2

Communication 1 1 2

Sort-Merge - 1 1

Source Text

Manipulation

— 1 2

Intrinsic Function

Optional

1

Report Writer, -, or 1 -, or 1 -, or 1

Communication 1. or 2 -, 1, or 2 -, 1, or 2

Debug 1, or 2 -, 1, or 2 -, 1, or 2

Segmentation -, 1, or 2 - 1, or 2 -, 1, or 2

3
FIPS PUB 21-4

b. A facility must be available in the processor for the user to optionally specify monitoring of the source

program at compile time. The monitoring may be specified for a FIPS COBOL subset, for any of the optional

modules, for all of the obsolete language elements included in the processor, or for a combination of a FIPS

COBOL subset, optional modules, and all obsolete elements. The monitoring may be specified for any FIPS

COBOL subset at or below the highest subset for which the processor is implemented and for a level of an

optional module at or below the level of the optional module for which the processor is implemented. The

monitoring is an analysis of the syntax used in the source program against the syntax included in the user

selected FIPS COBOL subset and optional modules. Any syntax used in the source program that does not

conform to that included in the user selected FIPS COBOL subset and optional modules will be diagnosed

and identified to the user through a message on the source program listing. Any syntax for an obsolete

language element included in the processor and used in the source program will also be diagnosed and

identified through a message on the source program listing. The determination of the need to flag any given

source program syntax in accordance with these requirements cannot be logically resolved until the syntactic

correctness of the source program has been established. The message provided will identify:

- The level indicator, clause, statement or header that directly contains the nonconforming or obsolete

syntax. (For the purpose of this requirement the definitions of level indicator, clause, statement and

header contained in American National Standard COBOL, ANSI X3.23-1985, Section ill, Glossary,

and the definition of syntax contained in American National Dictionary for Information Processing

Systems, (ANDIS), ANSI X3.172-1990, apply.)

- The source program line and an indication of the beginning location within the line of the level

indicator, clause, statement or header which contains the nonconforming or obsolete syntax.

- The syntax as “nonconforming standard” if the nonconforming syntax is included in the processor

but is not within the user selected FIPS COBOL subset or optional modules unless monitoring is

selected for the obsolete category; in that case obsolete language elements are only flagged as

“obsolete”.

- The syntax as “nonconforming nonstandard” if the nonconforming syntax is a nonstandard exten¬

sion included in the processor.

- The syntax as “obsolete” if the syntax identified is in the obsolete category within a FIPS COBOL

subset or optional module included in the processor.

11. implementation. The implementation of FIPS COBOL involves three areas of consideration: acquisi¬

tion of COBOL processors, interpretation of FIPS COBOL, and validation of COBOL processors.

11.1 Acquisition of COBOL Processors. This publication is effective July 17, 1995. COBOL pro¬

cessors acquired for Federal use after this date should implement at least one of the required subsets of FIPS

COBOL. If the functionality of one or more of the optional modules meets programmatic requirements, then

those optional modules also should be acquired. Each optional module that is needed to meet programmatic

requirements should be explicitly cited as a requirement in the order for the processor. Conformance to FIPS

COBOL should be considered whether COBOL processors are developed internally, acquired as part of an

ADP system procurement, acquired by separate procurement, used under an ADP leasing arrangement, or

specified for use in contracts for programming services.

A transition period provides time for industry to produce COBOL processors conforming to the standard.

The transition period begins on the effective date and continues for one (1) year thereafter. The following

apply during the transition period:

a. The provisions of FIPS PUB 21-3 apply to processors ordered before the effective date but delivered

subsequent to the effective date.

b. The provisions of this publication apply to orders placed after the effective date; however, a proces¬

sor conforming to FIPS PUB 21-4, if available, may be acquired for use prior to the effective date. If a

conforming processor is not available, a processor conforming to FIPS PUB 21-3 may be acquired for interim

use during the transition period.

4
FIPS PUB 21-4

11.2 Interpretation of FIPS COBOL. NIST provides for the resolution of questions regarding FIPS

COBOL specifications and requirements, and issues official interpretations as needed. All questions about

the interpretation of FIPS COBOL should be addressed to:

National Institute of Standards and Technology

ATTN: COBOL Interpretation

Technology Building, Room B-154

Gaithersburg, MD 20899

11.3 Validation of COBOL Processors. NIST provides a service for the purpose of validating the

conformance to this standard of processors offered for Federal procurement. The validation system reports

the nature of any deviations that are detected. This service is offered on a reimbursable basis. Further

information about the validation service can be obtained from the Software Standards Validation Group,

COBOL Validation, National Institute of Standards and Technology, Gaithersburg, MD 20899 (301) 975-3247.

12. Waivers. Linder certain exceptional circumstances, the heads of Federal departments and agencies

may approve waivers to Federal Information Processing Standards (FIPS). The head of such agency may

redelegate such authority only to a senior official designated pursuant to section 3506(b) of Title 44, United

States Code. Waivers shall be granted only when:

a. Compliance with a standard would adversely affect the accomplishment of the mission of an oper¬

ator of a Federal computer system, or

b. Cause a major adverse financial impact on the operator which is not offset by Government-wide

savings.

Agency heads may act upon a written waiver request containing the information detailed above. Agency

heads may also act without a written waiver request when they determine that conditions for meeting the

standard cannot be met. Agency heads may approve waivers only by a written decision which explains the

basis on which the agency head made the required finding(s). A copy of each such decision, with procure¬

ment-sensitive or classified portions clearly identified, shall be sent to: National Institute of Standards and

Technology: ATTN: FIPS Waiver Decisions, Technology Building, Room B-154; Gaithersburg, MD 20899.

In addition notice of each waiver granted and each delegation of authority to approve waivers shall be

sent promptly to the Committee on Government Operations of the House of Representatives and the

Committee on Governmental Affairs of the Senate and shall be published promptly in the Federal Register.

When the determination on a waiver applies to the procurement of equipment and/or services, a notice

of the waiver determination must be published in the Commerce Business Daily as a part of the notice of

solicitation for offers of an acquisition or, if the waiver determination is made after that notice is published,

by amendment to such notice.

A copy of the waiver, any supporting documents, the document approving the waiver and any supporting

and accompanying documents, with such deletions as the agency is authorized and decides to make under

5 U.S.C. Sec. 552(b), shall be part of the procurement documentation and retained by the agency.

13. Where to Obtain Copies. Copies of this publication are for sale by the National Technical Information

Service, U.S. Department of Commerce, Springfield, VA 22161. (Sale of the included specifications docu¬

ment is by arrangement with the American National Standards Institute.) When ordering, refer to Federal

Information Processing Standards Publication 21-4 (FIPSPUB21-4), and title. Payment may be made by

check, money order, or deposit account.

5


U.S. Department of Commerce

National Technical Information Service

5285 Port Royal Road

Springfield, VA 22161

Official Business

Penalty for Private Use $300