home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv4.zip
/
VACPP
/
IBMCPP
/
HELP
/
EVFEB4LS.HLP
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1995-05-11
|
291KB
|
12,684 lines
ΓòÉΓòÉΓòÉ 1. COBOL/400 Language Help ΓòÉΓòÉΓòÉ
COBOL/400 Language Help includes the following topics. To view the help,
select an entry in this list.
COBOL Source Program (Overall Format)
Identification Division
Environment Division
Data Division
Procedure Division
Procedure Division Statements
Compiler-Directing Statements
ΓòÉΓòÉΓòÉ 1.1. COBOL Source Program ΓòÉΓòÉΓòÉ
Description
A COBOL source program is a syntactically correct set of COBOL statements.
With the exception of the COPY statement, the statements, entries,
paragraphs, and sections of a COBOL source program are grouped into four
divisions: the Identification, Environment, Data, and Procedure Divisions.
The end of a COBOL source program is indicated by the absence of additional
source program lines.
Here is the format for a separately compiled COBOL source program:
ΓöÇΓöÇΓö¼ΓöÇΓöÇIDENTIFICATION DIVISION. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇID DIVISION. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇPROGRAM-ID. program-name.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇidentification-division-contentΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇΓöÇENVIRONMENT DIVISION. environment-division-contentΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇDATA DIVISION. data-division-contentΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇPROCEDURE DIVISION. procedure-division-contentΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.2. Identification Division ΓòÉΓòÉΓòÉ
Description
The Identification Division must be the first division in every COBOL source
program. It names the program and may include the date the program was
written, the date of compilation, and other such documentary information
about the program.
The Identification Division must begin with the words IDENTIFICATION DIVISION
or ID DIVISION followed by a separator period.
The first paragraph of the Identification Division must be the PROGRAM-ID
paragraph. The other paragraphs are optional, but when written, must appear
in the order shown in the format.
ΓöÇΓöÇΓö¼ΓöÇΓöÇIDENTIFICATION DIVISION. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇID DIVISION. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇPROGRAM-ID. program-name.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇAUTHOR. ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇcomment-entryΓöÇΓö┤Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINSTALLATION. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇcomment-entryΓöÇΓö┤Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇDATE-WRITTEN. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇcomment-entryΓöÇΓö┤Γöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇDATE-COMPILED. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇΓöÇcomment-entryΓöÇΓö┤Γöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇSECURITY. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇΓöÇcomment-entryΓöÇΓö┤Γöÿ
ΓòÉΓòÉΓòÉ 1.3. Environment Division ΓòÉΓòÉΓòÉ
Description
The Environment Division is optional in a COBOL source program. It has two
sections:
Configuration Section
Input-Output Section
Here is the Environment Division format :
ΓöÇENVIRONMENT DIVISION. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓööΓöÇCONFIGURATION SECTION. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
1 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
2 ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4
ΓööΓöÇSOURCE-COMPUTER. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇsource-computer-entryΓöÇΓöÿ
3 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 5
4 ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 6
ΓööΓöÇOBJECT-COMPUTER. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇobject-computer-entryΓöÇΓöÿ
5 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
6 ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇSPECIAL-NAMES. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇspecial-names-entryΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 7
Γöé
ΓööΓöÇINPUT-OUTPUT SECTION. FILE-CONTROL.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 8
7 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 9
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
8 ΓöÇΓöÇΓöÇΓöÇΓöÇfile-control-paragraphΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ10
9 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
10 ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööΓöÇI-O-CONTROL.ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇinput-output-control-paragraphΓö┤ΓöÇ.ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.4. Configuration Section ΓòÉΓòÉΓòÉ
The Configuration Section is optional. It contains three paragraphs:
SOURCE-COMPUTER Paragraph
OBJECT-COMPUTER Paragraph
SPECIAL-NAMES Paragraph
When specified, the Configuration Section can describe the computer on which
the source program is compiled and the computer on which the object program is
executed. In addition, the Configuration Section can:
Relate IBM-defined environment-names to user-defined mnemonic names
Specify the collating sequence
Specify a substitution for the currency sign
Exchange the functions of the comma and the period in PICTURE clauses and
numeric literals
Relate alphabet-names to character sets or collating sequences
Relate class names to sets of characters
Each paragraph must contain one, and only one, separator period immediately
after the last entry in the paragraph.
1 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
2 ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ 4
ΓööΓöÇSOURCE-COMPUTER. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇsource-computer-entryΓöÇΓöÿ
3 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 5
4 ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ 6
ΓööΓöÇOBJECT-COMPUTER. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇobject-computer-entryΓöÇΓöÿ
5 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
6 ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇSPECIAL-NAMES. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇspecial-names-entryΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.5. SOURCE-COMPUTER Paragraph ΓòÉΓòÉΓòÉ
Description
The SOURCE-COMPUTER paragraph describes the computer on which the source
program is to be compiled.
Except for the WITH DEBUGGING MODE clause, the SOURCE-COMPUTER paragraph is
syntax-checked only and has no effect on the execution of the program.
ΓöÇΓöÇΓöÇSOURCE-COMPUTER.ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓööΓöÇcomputer-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
1 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
2 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ.ΓöÇΓöÇΓöÇΓöÿ
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇDEBUGGING MODEΓöÇΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> WITH DEBUGGING MODE ΓòÉΓòÉΓòÉ
The WITH DEBUGGING MODE clause activates a compile-time switch for debugging
lines written in the source program.
A debugging line is a statement compiled only when the compile-time switch is
activated.
To specify a debugging line in your program, code a 'D' in column 7 (the
indicator area). You can include successive debugging lines, but each must
have a 'D' in column 7. Do not break character strings across lines.
You must write all your debugging lines so that the program is syntactically
correct, whether the debugging lines are compiled or treated as comments.
The presence or absence of the WITH DEBUGGING MODE clause is logically
determined after all COPY statements have been processed.
You can code debugging lines in the Environment (after the OBJECT-COMPUTER
paragraph), Data, or Procedure Divisions.
If a debugging line contains only spaces in Area A and Area B, it is treated
the same as a blank line.
ΓòÉΓòÉΓòÉ 1.6. OBJECT-COMPUTER Paragraph ΓòÉΓòÉΓòÉ
Description
The OBJECT-COMPUTER paragraph specifies the system for which the object
program is designated.
Except for the PROGRAM COLLATING SEQUENCE clause, the OBJECT-COMPUTER clause
is syntax-checked only and has no effect on the execution of the program.
ΓöÇΓöÇΓöÇOBJECT-COMPUTER. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓööΓöÇcomputer-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
1 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
2 ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4
ΓööΓöÇMEMORYΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼integerΓöÇΓö¼ΓöÇWORDSΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööSIZEΓöÿ Γö£ΓöÇCHARACTERSΓöÇΓöñ
ΓööΓöÇMODULESΓöÇΓöÇΓöÇΓöÇΓöÿ
3 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 5
4 ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ 6
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇSEQUENCEΓö¼ΓöÇΓöÇΓö¼ΓöÇalphabet-nameΓöÇΓöÿ
ΓööPROGRAMΓöÿΓööCOLLATINGΓöÿ ΓööISΓöÿ
5 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
6 ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ. ΓöÇΓöÇΓöÿ
ΓööΓöÇΓöÇSEGMENT-LIMITΓö¼ΓöÇΓöÇΓö¼ΓöÇsegment-numberΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööISΓöÿ
ΓòÉΓòÉΓòÉ <hidden> PROGRAM COLLATING SEQUENCE IS ΓòÉΓòÉΓòÉ
The PROGRAM COLLATING SEQUENCE clause determines the collating sequence to be
used in a COBOL program. The alphabet-name specifies the collating sequence.
PROGRAM COLLATING SEQUENCE determines the truth value of the following
nonnumeric comparisons:
- Those explicitly specified in relation conditions.
- Those explicitly specified in condition-name conditions.
The PROGRAM COLLATING SEQUENCE clause also applies to any nonnumeric merge or
sort keys (unless you specify the COLLATING SEQUENCE phrase in the MERGE or
SORT statement).
If you omit the PROGRAM COLLATING SEQUENCE clause, the EBCDIC collating
sequence is used.
ΓòÉΓòÉΓòÉ <hidden> SEGMENT-LIMIT IS ΓòÉΓòÉΓòÉ
Determines which segments will be considered permanent segments of the object
program.
When you specify SEGMENT-LIMIT:
- Permanent segments are those with segment-numbers less than the
segment-number designated as the segment-limit.
- Overlayable fixed segments have segment-numbers from the segment-limit
through 49.
For example, if you specify SEGMENT-LIMIT IS 25:
- Sections with segment-numbers 0 through 24 are permanent segments.
- Sections with segment-numbers 25 through 49 are overlayable fixed
segments.
If you omit the SEGMENT-LIMIT clause, all segments with segment-numbers 0
through 49 are permanent segments of the object program.
ΓòÉΓòÉΓòÉ 1.7. SPECIAL-NAMES Paragraph ΓòÉΓòÉΓòÉ
Definition
The SPECIAL-NAMES paragraph:
Relates IBM-specified environment-names to user-defined mnemonic-names.
Relates alphabetic-names to character sets or collating sequences.
Relates class names to sets of characters.
Specifies a substitute character for the currency sign.
Specifies that the functions of the comma and decimal point are to be
interchanged in PICTURE clauses and numeric literals.
Specifies that ACCEPT or DISPLAY statements are treated as extended ACCEPT
or DISPLAY statements.
Specifies additional functions associated with ACCEPT statements.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
ΓöÇΓöÇΓöÇSPECIAL-NAMES. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
Γö£ΓöÇenvironment-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ3
Γöé
ΓööΓöÇenvironment-name-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ4
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝
3ΓöÇΓö¼ΓöÇΓöÇΓö¼mnemonic-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööISΓöÿ Γöé
4Γö¼Γö¼ΓöÇΓöÇΓö¼mnemonic-name-2Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓöéΓööISΓöÿ Γöé Γöé
Γöé Γö£ONΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼cond-1Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼Γöñ
Γöé Γöé ΓööSTATUSΓöÿΓööISΓöÿ Γöé ΓöéΓöéΓöé
Γöé Γöé ΓööOFFΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼cond-2ΓöÿΓöéΓöé
Γöé Γöé ΓööSTATUSΓöÿΓööISΓöÿ ΓöéΓöé
Γöé ΓööOFFΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼cond-2Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÿΓöé
Γöé ΓööSTATUSΓöÿΓööISΓöÿ Γöé Γöé Γöé
Γöé ΓööONΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼cond-1Γöÿ Γöé
Γöé ΓööSTATUSΓöÿΓööISΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇONΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼cond-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Γöé ΓööSTATUSΓöÿΓööISΓöÿ Γöé ΓöéΓöé
Γöé ΓööOFFΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼cond-2ΓöÿΓöé
Γöé ΓööSTATUSΓöÿΓööISΓöÿ Γöé
ΓööΓöÇOFFΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼cond-2Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööSTATUSΓöÿΓööISΓöÿ Γöé Γöé
ΓööONΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼cond-1ΓöÇΓöÿ
ΓööSTATUSΓöÿΓööISΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇALPHABET alphabet-name-1Γö¼ΓöÇΓöÇΓö¼Γö¼STANDARD-1Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö┤Γöÿ
ΓööISΓöÿΓö£STANDARD-2Γöñ Γöé
Γö£NATIVEΓöÇΓöÇΓöÇΓöÇΓöñ Γöé
Γö£EBCDICΓöÇΓöÇΓöÇΓöÇΓöñ Γöé
Γö£NLSSORTΓöÇΓöÇΓöÇΓöÿ Γöé
ΓöéΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇliteral-1Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö┤Γöÿ
Γö£Γö¼THROUGHΓö¼literal-2Γöñ
ΓöéΓööTHRUΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇΓöÇALSO literal-3Γö┤ΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇCLASS class-name-1ΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇliteral-4Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÿ
ΓööISΓöÿ ΓööΓöÇΓö¼ΓöÇTHROUGHΓöÇΓö¼ΓöÇliteral-5ΓöÇΓöÿ
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööCURRENCYΓöîΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼literal-6ΓöÇΓöÿ ΓööΓöÇDECIMAL-POINTΓö¼ΓöÇΓöÇΓö¼COMMAΓöÇΓöÿ
ΓööSIGNΓöÿΓööISΓöÿ ΓööISΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇCONSOLEΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇCRTΓöÇΓöÿ ΓööΓöÇCURSORΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇdata-name-1ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇISΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇCRT STATUSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇdata-name-2ΓöÇΓöÿ ΓööΓöÇ.ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Environment-name-1 ΓòÉΓòÉΓòÉ
Environment-name-1 represents the system devices or standard system actions
taken by the compiler.
Valid specifications for environment-name-1 are as follows:
Environment-name-1 Meaning Allowed In
CSP Suppress spacing when WRITE
printing a line
C01 Skip to the next page. WRITE
ATTRIBUTE-DATA Retrieve attribute data ACCEPT
about a program device
acquired by a transaction
file
I-O-FEEDBACK Give information about the ACCEPT
last I-O operation on a file
OPEN-FEEDBACK Give information about a file ACCEPT
CONSOLE, Communicate with the system ACCEPT, DISPLAY
SYSTEM-CONSOLE operator's message queue
(QSYSOPR)
LOCAL-DATA Retrieve data from, or move ACCEPT, DISPLAY
data to the local data area
PIP-DATA Retrieve data from the ACCEPT
Program Initialization
Parameters (PIP) data area
for programs running as part
of a prestart job
REQUESTOR Communicate with the user ACCEPT, DISPLAY
work station (interactive
jobs) or the batch stream
or job log (batch jobs)
SYSIN The equivalent of REQUESTOR ACCEPT
(for the ACCEPT statement
only)
SYSOUT The equivalent of REQUESTOR DISPLAY
(for the DISPLAY statement
only)
ΓòÉΓòÉΓòÉ <hidden> Cond-1, Cond-2 ΓòÉΓòÉΓòÉ
Condition-names follow the rules for user-defined names. At least one
character must be alphabetic. The value associated with the condition-name
is considered alphanumeric. A condition-name may be associated with the on
status and/or off status of each UPSI switch specified.
In the Procedure Division, the UPSI switch status is tested by a "switch
status condition" using the associated condition-name. The result of the test
is true if the UPSI switch is set to the value (0 or 1) corresponding to the
specified condition-name. Each condition-name is the equivalent of a level-88
item; if you specify the associated mnemonic-name, it is considered the
conditional variable and can be used for qualification.
ΓòÉΓòÉΓòÉ <hidden> ALPHABET Clause ΓòÉΓòÉΓòÉ
The ALPHABET alphabet-name-1 IS clause provides a means of relating an
alphabet-name to a specified character code set or collating sequence.
It specifies a collating sequence when used in either:
- The PROGRAM COLLATING SEQUENCE clause of the OBJECT-COMPUTER paragraph
- The COLLATING SEQUENCE phrase of the SORT or MERGE statement.
It specifies a character code set when specified in the FD entry CODE-SET
clause.
ΓòÉΓòÉΓòÉ <hidden> Literal-1, Literal-2, Literal-3 ΓòÉΓòÉΓòÉ
When you specify literal-1, literal-2, or literal-3, the alphabet-name must
not be referred to in a CODE-SET clause.
Literal-1, literal-2, and literal-3 specify that the collating sequence is to
be determined by the program, according to the following rules:
- The order in which literals appear specifies the ordinal number, in
ascending sequence, of the character or characters in this collating
sequence.
- Each numeric literal you specify must be an unsigned integer and must have
a value from 1 through 256. The value of each literal specifies the
ordinal number, beginning with 1, of a character within the EBCDIC
character set.
- Each character in a nonnumeric literal represents that actual character in
the EBCDIC character set.
- Any EBCDIC characters that you do not explicitly specify assume positions
in this collating sequence higher than any of the explicitly specified
characters.
- Within one alphabet-name clause, do not specify a given character more
than once.
- Each nonnumeric literal associated with a THROUGH or ALSO phrase must be 1
character in length.
- When you specify the THROUGH phrase, the contiguous EBCDIC characters
beginning with the character specified by literal-1 and ending with the
character specified by literal-2 are assigned successively ascending
positions in this collating sequence. This sequence may be either
ascending or descending within the original EBCDIC sequence.
- When you specify the ALSO phrase, EBCDIC characters specified as
literal-1, literal-3, etc., are assigned to the same position in this
collating sequence.
- If you specify the figurative constants HIGH-VALUE and LOW-VALUE as
literals in the SPECIAL-NAMES paragraph, they are associated with hex FF
and hex 00 respectively.
- The character having the highest ordinal position in this collating
sequence is associated with the figurative constant HIGH-VALUE.
- The character having the lowest ordinal position in this collating
sequence is associated with the figurative constant LOW-VALUE.
ΓòÉΓòÉΓòÉ <hidden> Literal-4, Literal-5 ΓòÉΓòÉΓòÉ
If numeric, literal-4 and literal-5 must be unsigned integers and must have a
value from 1 through 256 (the maximum number of characters in the EBCDIC
character set). The value of each literal corresponds to the ordinal position
of each character in the EBCDIC collating series.
If nonnumeric, the literal is the actual EBCDIC character. If the value of
the nonnumeric literal contains multiple characters, each character in the
literal is included in the set of characters identified by class-name-1.
If the nonnumeric literal is associated with a THROUGH phrase, the literal
must be 1 character in length.
If you specify the THROUGH phrase, class-name-1 includes those characters
beginning with the value of literal-4 and ending with the value of literal-5.
The characters specified by a THROUGH phrase may specify characters in either
ascending or descending order.
ΓòÉΓòÉΓòÉ <hidden> literal-6 ΓòÉΓòÉΓòÉ
Literal-6 must be a one-character, nonnumeric literal, and must not be any of
the following:
Digits zero (0) through nine (9)
Uppercase alphabetic characters A B C D P R S V X Z
Lowercase alphabetic characters a through z
The space
Special characters * + - / , . ; ( ) =
A figurative constant.
ΓòÉΓòÉΓòÉ <hidden> data-name-1 ΓòÉΓòÉΓòÉ
Data-name-1 must be a 4- or 6-byte alphanumeric field or a 4- or 6-byte
unsigned zoned integer field. If data-name-1 is 4 characters in length,
interpret the first two characters as line number, and the second two as column
number. If data-name-1 is 6 characters in length, interpret the first three
characters as line number, and the second three as column number.
The clause has no effect if data-name-1 contains an invalid position value,
such as: zeros, a nonnumeric value, or a value that is beyond the range of the
screen.
Data-name-1 must be declared in the WORKING-STORAGE SECTION of the program.
ΓòÉΓòÉΓòÉ 1.8. Input-Output Section ΓòÉΓòÉΓòÉ
Description
The Input-Output section of the Environment Division contains two paragraphs:
FILE-CONTROL paragraph
I-O-CONTROL paragraph
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓöÇΓöÇINPUT-OUTPUT SECTION. FILE-CONTROL. file-control-paragraphΓöÇΓö┤ΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇI-O-CONTROL. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇinput-output-control-paragraphΓöÇΓö┤ΓöÇ.ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.9. FILE-CONTROL Paragraph ΓòÉΓòÉΓòÉ
The FILE-CONTROL paragraph associates each file in a COBOL program with an
external medium, and specifies the file organization, access mode, and other
information.
The FILE-CONTROL paragraph begins with the word "FILE-CONTROL" in Area A,
followed by a separator period. The keyword FILE-CONTROL may appear only
once, at the beginning of the FILE-CONTROL paragraph.
The FILE-CONTROL paragraph must contain one and only one entry for each file
described in an FD or SD entry in the Data Division. Within each entry, the
SELECT clause must appear first. The other clauses may appear in any order.
The FILE-CONTROL paragraph has five formats:
- Sequential File Entries
- Indexed File Entries
- Relative File Entries
- Sort or Merge File Entries
- Transaction File Entries
ΓòÉΓòÉΓòÉ <hidden> Sequential File Entries ΓòÉΓòÉΓòÉ
Description
The FILE-CONTROL paragraph associates each file in the COBOL program with an
external medium, and specifies file organization, access mode, and other
information.
Format 1 (Sequential File Entries)
ΓöÇΓöÇΓöÇSELECTΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇfile-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇOPTIONALΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇASSIGNΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇassignment-name-1ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööTOΓöÿ ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇRESERVE integerΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
Γö£ΓöÇAREAΓöÇΓöÇΓöñ
ΓööΓöÇAREASΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇSEQUENTIALΓöÇΓöÿ
ΓööΓöÇORGANIZATIONΓö¼ΓöÇΓöÇΓö¼Γöÿ
ΓööISΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇACCESSΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼SEQUENTIALΓöÇΓöÿ
ΓööMODEΓöÿΓööISΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼STATUSΓö¼ΓöÇΓöÇΓö¼data-name-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööFILEΓöÿ ΓööISΓöÿ ΓööΓöÇdata-name-5ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Indexed File Entries ΓòÉΓòÉΓòÉ
Description
The FILE-CONTROL paragraph associates each file in the COBOL program with an
external medium, and specifies file organization, access mode, and other
information.
Format 2 (Indexed File Entries)
ΓöÇΓöÇΓöÇSELECTΓöÇΓöÇfile-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇASSIGNΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇassignment-name-1ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööTOΓöÿ ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇRESERVE integerΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
Γö£ΓöÇAREAΓöÇΓöÇΓöñ
ΓööΓöÇAREASΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇINDEXEDΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇORGANIZATIONΓö¼ΓöÇΓöÇΓö¼Γöÿ
ΓööISΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇACCESSΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼Γö¼ΓöÇSEQUENTIALΓöÇΓö¼ΓöÇΓöÿ
ΓööMODEΓöÿΓööISΓöÿΓö£ΓöÇRANDOMΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇDYNAMICΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇRECORDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇEXTERNALLY-DESCRIBED-KEYΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööKEYΓöÿ ΓööISΓöÿ ΓööΓöÇΓöÇdata-name-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇDUPLICATESΓöÇΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ. ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼STATUSΓö¼ΓöÇΓöÇΓö¼ΓöÇdata-name-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööFILEΓöÿ ΓööISΓöÿ ΓööΓöÇdata-name-5ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Relative File Entries ΓòÉΓòÉΓòÉ
Description
The FILE-CONTROL paragraph associates each file in the COBOL program with an
external medium, and specifies file organization, access mode, and other
information.
Format 3 (Relative File Entries)
ΓöÇΓöÇΓöÇSELECTΓöÇΓöÇΓöÇfile-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇASSIGNΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇassignment-name-1ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööTOΓöÿ ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇRESERVE integerΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
Γö£ΓöÇAREAΓöÇΓöÇΓöñ
ΓööΓöÇAREASΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇRELATIVEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇORGANIZATIONΓö¼ΓöÇΓöÇΓö¼Γöÿ
ΓööISΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼
ΓööACCESSΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼Γö¼SEQUENTIALΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööMODEΓöÿΓööISΓöÿΓöé ΓööRELATIVEΓö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼data-name-4Γöñ
Γöé ΓööKEYΓöÿΓööISΓöÿ Γöé
ΓööΓö¼ΓöÇRANDOMΓöÇΓöÇΓö¼RELATIVEΓö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼data-name-4Γöÿ
ΓööΓöÇDYNAMICΓöÇΓöÿ ΓööKEYΓöÿΓööISΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼STATUSΓö¼ΓöÇΓöÇΓö¼data-name-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööFILEΓöÿ ΓööISΓöÿ ΓööΓöÇdata-name-5ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Sort or Merge File Entries ΓòÉΓòÉΓòÉ
Description
The FILE-CONTROL paragraph associates each file in the COBOL program with an
external medium, and specifies file organization, access mode, and other
information.
Format 4 (Sort or Merge File Entries)
ΓöÇΓöÇΓöÇSELECTΓöÇΓöÇΓöÇfile-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇASSIGNΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇassignment-name-1ΓöÇΓö╝ΓöÇ. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööTOΓöÿ ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> TRANSACTION File Entries ΓòÉΓòÉΓòÉ
Description
The FILE-CONTROL paragraph associates each file in the COBOL program with an
external medium, and specifies file organization, access mode, and other
information.
Format 5 (TRANSACTION File Entries)
ΓöÇΓöÇΓöÇSELECTΓöÇΓöÇΓöÇfile-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇASSIGNΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇassignment-name-1ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööTOΓöÿ ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇTRANSACTIONΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇORGANIZATIONΓö¼ΓöÇΓöÇΓö¼Γöÿ
ΓööISΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼
ΓööACCESSΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼Γö¼SEQUENTIALΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööMODEΓöÿΓööISΓöÿΓööDYNAMICΓöÇΓöÇRELATIVEΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼ΓöÇdata-name-3ΓöÇΓöÿ
ΓööKEYΓöÿΓööISΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼STATUSΓö¼ΓöÇΓöÇΓö¼data-name-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööFILEΓöÿ ΓööISΓöÿ ΓööΓöÇdata-name-5ΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇCONTROL-AREAΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇdata-name-6ΓöÇΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.10. ASSIGN Clause ΓòÉΓòÉΓòÉ
The ASSIGN clause associates a file with an external medium.
For sort or merge files (associated with an SD entry), no external medium is
used. The related ASSIGN clause is only validity checked and it is not used for
I-O.
Assignment-name-1 or literal-1 consists of three parts:
Device
File name
Attribute.
The general structure is:
ΓöÇΓöÇΓöÇΓöÇdeviceΓöÇΓöÇ -file-nameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇ -attributeΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> ASSIGN Clause ΓòÉΓòÉΓòÉ
The ASSIGN clause associates the TRANSACTION file with a display file or ICF
file through the use of assignment-name-1 or literal-1.
Assignment-name-1 or literal-1 consists of three parts:
Device
File name
Attribute.
The general structure is:
ΓöÇΓöÇΓöÇΓöÇdeviceΓöÇΓöÇ -file-nameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇ -attributeΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.11. File-name ΓòÉΓòÉΓòÉ
-file-name must be an unhyphenated 1- through 10-character system name of the
actual external file (physical or logical database, or device). You must create
the external file before compiling the program, if the external file is used
within the program by a COPY statement, DDS (data description specifications)
or DD format.
For database files, you cannot specify the member name in the program. If you
want to specify a member other than the first member, you must use the Override
with Database File (OVRDBF) CL command at execution time to specify that member
name.
This file name is the name of the AS/400 object that is displayed by the
Display Program References (DSPPGMREF) command. Since no external medium is
used for an SD file, the DSPPGMREF command does not list any files defined for
an SD file.
You can change the file name at execution time with the TOFILE parameter of the
OVRxxxF CL command. For consistent results, ensure that the device type
associated with the TOFILE parameter is the same as that specified for
assignment-name-1 or literal-1.
ΓòÉΓòÉΓòÉ <hidden> EXTERNALLY-DESCRIBED-KEY ΓòÉΓòÉΓòÉ
You can use the reserved word EXTERNALLY-DESCRIBED-KEY to specify that the
keys for the file are those that are externally described in the data
description specifications (DDS).
The keys are determined by the record formats that are copied by the COPY
statement (DDS, DD, DDSR, or DDR format), under the file description (FD) for
this file.
The key can start at different offsets within the buffer for each format. In
this situation, you must be careful when changing from one record format to
another using a random READ or START statement. You must place the key in
the record format, at the correct offset in the format, that will be used in
the random access of the file. Unpredictable results can occur if the key
from the desired record is based on data that was part of the last record
read. This is because the movement of data to the key field can involve
overlapping records.
The key within a format can be made up of multiple, noncontiguous (not
adjacent) fields. You should reference only those record formats copied in
within the FD for the file with the FORMAT phrase. If you reference a format
defined within the file, but that format has not been copied into the
program, the key is built using key fields defined for the first record
format copied. This can cause unpredictable results.
If a portion of the key is declared in the logical file only as an element of
a concatenated item (rather than an independently-declared item), the result
of the CONCAT operation must not be a variable-length item.
ΓòÉΓòÉΓòÉ <hidden> Data-name-2 ΓòÉΓòÉΓòÉ
Data-name-2 represents the RECORD KEY data item. Describe it as an
alphanumeric item within a record description entry associated with the file.
The length of the record key is restricted; the key length, in characters,
cannot exceed 120.
Data-name-2 may be a numeric item when the file is assigned to a DATABASE
device type. The numeric item can have a usage of DISPLAY, COMP (COMP-3),
COMP-4, PACKED-DECIMAL, or BINARY.
Data-name-2 may be qualified, but it must not be subscripted.
The data description of data-name-2 and its relative location within the
record must be the same as those used when the file was defined in DDS.
The record description that defines data-name-2 will always be used to access
the record key field for the I-O operation.
ΓòÉΓòÉΓòÉ <hidden> DUPLICATES Phrase ΓòÉΓòÉΓòÉ
The DUPLICATES phrase allows a file to have keys with the same values. You
can only specify the DUPLICATES phrase for files assigned to DATABASE. If the
file has multiple formats, two keys in different formats have the same values
only when the key lengths and the contents of the keys are the same.
For example:
Format F1 with keys A, B, C
Format F2 with keys A, B, D
If fields C and D are the same length, have the same data type, and have the
same values, the file contains two records with a duplicate key. The term
duplicate key applies only to a complete record key for the format. A record
key for the format consists of the key fields defined for a DDS format for
records residing on the database. The term does not apply to the common key for
the file (only fields A and B in the example).
You will receive a file status of 95 after a file has been successfully
opened:
- If you specify the DUPLICATES phrase in the COBOL program and the file was
created with UNIQUE specified in the DDS.
- If you do not specify the DUPLICATES phrase in the COBOL program and the
file was created allowing nonunique keys. You can have unpredictable
results if you process files when either of these conditions exist.
In a file that allows duplicates and is processed randomly or dynamically,
the duplicate record that is updated or deleted must be the proper one. To
ensure this, the last input/output statement processed prior to the REWRITE
or DELETE operation must be a successfully processed READ statement without
the NO LOCK phrase.
If you specify the DDS file level keyword LIFO (last-in-first-out). the
duplicate records within a physical file are retrieved in a last-in-first-out
order.
ΓòÉΓòÉΓòÉ <hidden> Data-name-5 ΓòÉΓòÉΓòÉ
An optional status key data item may be specified for non-transaction and
transaction file processing.
For non-transaction files, the data item must be a 6-byte group item. The
item is treated as documentation for all non-transaction files except for
those that are dynamically created.
For transaction files, the data item must be a 4-character alphanumeric item.
ΓòÉΓòÉΓòÉ <hidden> Data-name-5 ΓòÉΓòÉΓòÉ
You must define data-name-5 in the Data Division as a 4-byte alphanumeric data
item. You cannot define data-name-5 in the File Section.
Data-name-5 identifies the extended-file-status data item, which contains major
and minor return codes. The first 2 bytes of the extended-file-status data item
contain the major return code, and the last 2 bytes contain the minor return
code. Return codes are moved into data-name-5 after any input or output
operation (except the ACCEPT or CLOSE statement) on the TRANSACTION file.
In some cases, the major and minor return codes can indicate I/O errors when
the file status code does not. The extended file status will have a value of
zeros after you perform an I/O operation on an unopened file.
ΓòÉΓòÉΓòÉ <hidden> Data-name-6 ΓòÉΓòÉΓòÉ
Data-name-6 is a CONTROL-AREA data item you must define in the LINKAGE
SECTION or WORKING-STORAGE section.
Data-name-6 must be 2, 12, or 22 characters long. Based upon the length of
data-name-6, the compiler assumes the availability of key feedback bytes, the
program device name, and the record format.
The format for data-name-6 is :
01 data-name-6.
02 function-key PIC X(2).
(Function key feedback field)
02 device-name PIC X(10).
(Program device name)
02 record-format PIC X(10).
(Record format)
For an ICF file, the actual name of a device may be different from the
program device name.
ΓòÉΓòÉΓòÉ 1.12. I-O CONTROL Paragraph ΓòÉΓòÉΓòÉ
Description
The I-O control paragraph of the INPUT-OUTPUT SECTION specifies when
checkpoints are to be taken and which storage areas are to be shared by
different files. It also specifies information needed for efficient
transmission of data between external media and the COBOL program. This
paragraph is optional in a COBOL program.
The keyword I-O-CONTROL may appear only once, at the beginning of the
paragraph. The word I-O-CONTROL must begin in Area A and must be followed
by a separator period.
Each clause within the paragraph may be separated from the next clause by
a separator comma or a separator semicolon. The order in which
I-O-CONTROL paragraph clauses are written is not significant. The
I-O-CONTROL paragraph ends with a separator period.
The I-O CONTROL paragraph has three formats:
- Format 1 (Sequential Files)
- Format 2 (Indexed and Relative Files)
- Format 3 (Sort/Merge Files)
ΓòÉΓòÉΓòÉ <hidden> I-O CONTROL Paragraph Format 1 (Sequential Files) ΓòÉΓòÉΓòÉ
Format 1 (Sequential Files)
ΓöÇΓöÇI-O-CONTROLΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4
2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
ΓööΓöÇRERUNΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
ΓööΓöÇONΓöÇΓö¼ΓöÇfile-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇassignment-name-1ΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-1ΓöÇΓöÇΓöÇRECORDSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇfile-name-2ΓöÇΓöÿ
ΓööΓöÇEVERYΓöÇΓöÿ ΓööΓöÇOFΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇ 2
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇSAMEΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇfile-name-3ΓöÇΓöÇΓöÇfile-name-4ΓöÇΓö┤ΓöÇΓöÇΓöÿ
ΓööΓöÇRECORDΓöÇΓöÿ ΓööΓöÇAREAΓöÇΓöÿ ΓööΓöÇFORΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓö¼ΓöÇ 2
Γöé Γöé Γöé
Γöé Γöé Γöé
ΓööΓöÇMULTIPLE FILEΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇfile-name-5ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÿ
ΓööTAPEΓöÿ ΓööCONTAINSΓöÿ ΓööPOSITIONΓöÇΓöÇinteger-2Γöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇCOMMITMENT CONTROLΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇfile-name-6ΓöÇΓö┤ΓöÇΓöÇΓöÿ
ΓööΓöÇFORΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> I-O CONTROL Paragraph Format 2 (Indexed and Relative Files) ΓòÉΓòÉΓòÉ
Format 2 (Indexed and Relative Files)
ΓöÇΓöÇI-O-CONTROLΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4
2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
ΓööΓöÇRERUNΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
ΓööΓöÇONΓöÇΓö¼ΓöÇfile-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇassignment-name-1ΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-1ΓöÇΓöÇΓöÇRECORDSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇfile-name-2ΓöÇΓöÿ
ΓööΓöÇEVERYΓöÇΓöÿ ΓööΓöÇOFΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇ 2
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇSAMEΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇfile-name-3ΓöÇΓöÇΓöÇfile-name-4ΓöÇΓö┤ΓöÇΓöÇΓöÿ
ΓööΓöÇRECORDΓöÇΓöÿ ΓööΓöÇAREAΓöÇΓöÿ ΓööΓöÇFORΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇCOMMITMENT CONTROLΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇfile-name-6ΓöÇΓö┤ΓöÇΓöÇΓöÿ
ΓööΓöÇFORΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> I-O CONTROL Paragraph Format 3 (Sort/Merge Files) ΓòÉΓòÉΓòÉ
Format 3 (Sort/Merge Files)
ΓöÇΓöÇI-O-CONTROL.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé Γöé
Γöé Γöé Γöé Γöé
ΓööΓöÇSAMEΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇfile-name-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
Γö£ΓöÇRECORDΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ ΓööΓöÇAREAΓöÇΓöÿΓööΓöÇFORΓöÇΓöÿ ΓööΓöÇfile-name-4ΓöÇΓöÿ
Γö£ΓöÇSORTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇSORT-MERGEΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> SAME RECORD AREA ΓòÉΓòÉΓòÉ
The SAME RECORD AREA clause specifies that two or more files are to use the
same main storage area for processing the current logical record. All the
files may be open at the same time. A logical record in the shared storage
area is considered to be both of the following:
- A logical record of each opened output file in the SAME RECORD AREA clause
- A logical record of the most recently read input file in the SAME RECORD
AREA clause.
The SAME RECORD AREA clause allows you to transfer data from one file to
another with no explicit data manipulation because the input/output record
areas of the files are identical, and all are available to you.
ΓòÉΓòÉΓòÉ <hidden> COMMITMENT CONTROL ΓòÉΓòÉΓòÉ
The COMMITMENT CONTROL clause specifies the files placed under commitment
control when they are opened. Files under commitment control are affected by
the COMMIT and ROLLBACK statements.
- The COMMIT statement allows the synchronization of changes to database
records while preventing other jobs from modifying those records until the
COMMIT is complete.
- The ROLLBACK statement provides a method of canceling changes made to
database files when those changes should not be made permanent.
You can only specify files assigned to a device type of DATABASE with the
COMMITMENT CONTROL clause.
Files under commitment control may have sequential, relative, or indexed
organization, and may have any access mode for a particular organization.
The system locks records contained in files under commitment control when the
records are accessed. Records remain locked until released by a COMMIT or
ROLLBACK statement.
ΓòÉΓòÉΓòÉ 1.13. Data Division ΓòÉΓòÉΓòÉ
Description
The Data Division of a COBOL source program describes, in a structured
manner, all the data to be processed by the object program. In a COBOL source
program, the Data Division is optional.
The Data Division is divided into three sections. Each section has a
specific logical function within a COBOL source program, and each may be
omitted from the source program when that logical function is not needed. If
you include these sections, they must be written in the order shown:
File Section
Describes externally stored data (including sort-merge files).
Working-Storage Section
Describes internal data.
Linkage Section
Describes data made available by another program.
ΓöÇΓöÇDATA DIVISION.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇFILE SECTION.Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝Γöÿ
Γöé Γöé
Γööfile-description-entryΓöÇΓöÇitem-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööWORKING-STORAGE SECTION.ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝Γöÿ
Γö£record-description-entryΓöÇΓöÇΓöÇΓöñ
Γöödata-item-description-entryΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇLINKAGE SECTION. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÿ
Γö£ΓöÇrecord-description-entryΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇdata-item-description-entryΓöÇΓöÿ
where item-1 is:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇrecord-description-entryΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ 1.14. Working-Storage Section ΓòÉΓòÉΓòÉ
Description
The Working-Storage Section describes data records that are not part of
external data files but are developed and processed internally.
The Working-Storage Section must begin with the section header
WORKING-STORAGE SECTION, followed by a separator period.
The Working-Storage Section contains record description entries and data
description entries for independent data items, called data item description
entries.
A maximum of 3 000 000 bytes are permitted for group items (including
tables).
A data description entry specifies the characteristics of a data item. A
data description entry has four formats:
Format 1 (All Data Division Sections): Use Format 1 for data description
entries in all Data Division sections. Specific rules and restrictions for
each clause are noted under discussion of the individual clause.
Format 2 (RENAMES Clause -- Level-66 Entry): Format 2 regroups previously
defined items.
Format 3 (Condition-Name VALUE Clause -- Level-88 Entry): Format 3
associates a single value, multiple values, and/or range(s) of values with
a condition-name.
Format 4 (Boolean Data): Format 4 describes indicators as Boolean data
items.
ΓòÉΓòÉΓòÉ 1.15. Linkage Section ΓòÉΓòÉΓòÉ
Description
The Linkage Section describes data made available from another program.
Record description entries and data item description entries in the Linkage
Section provide names and descriptions, but storage within the program is not
reserved because the data area exists elsewhere.
A maximum of 3 000 000 bytes are permitted for group items (including
tables).
Like the Working-Storage Section, the Linkage Section has four formats:
Format 1 (All Data Division Sections): Use Format 1 for data description
entries in all Data Division sections. Specific rules and restrictions for
each clause are noted under discussion of the individual clause.
Format 2 (RENAMES Clause -- Level-66 Entry): Format 2 regroups previously
defined items.
Format 3 (Condition-Name VALUE Clause -- Level-88 Entry): Format 3
associates a single value, multiple values, and/or range(s) of values with
a condition-name.
Format 4 (Boolean Data): Format 4 describes indicators as Boolean data
items.
ΓòÉΓòÉΓòÉ <hidden> Format 1 (All Data Division Sections) ΓòÉΓòÉΓòÉ
Description
Use Format 1 for data description entries in all Data Division sections. A
space, a separator comma, or a separator semicolon must separate clauses.
Note: You can write the clauses in any order, with two exceptions:
If you specify data-name or FILLER, it must immediately follow the
level-number.
When you specify the REDEFINES clause, it must immediately follow
data-name or FILLER, if either is specified. If you do not specify
data-name or FILLER, the REDEFINES clause must immediately follow the
level-number.
Specific rules and restrictions for each clause are noted under the discussion
of the individual clause.
Format 1 (All Data Division Sections)
ΓöÇΓöÇlevelΓöÇnumberΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇΓöÇdataΓöÇnameΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇFILLERΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇREDEFINES clauseΓöÇΓöñ
ΓööΓöÇLIKE clauseΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
ΓööΓöÇBLANK WHEN ZERO clauseΓöÇΓöÿ ΓööΓöÇJUSTIFIED clauseΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇOCCURS clauseΓöÇΓöÿ ΓööΓöÇPICTURE clauseΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇSIGN clauseΓöÇΓöÿ ΓööΓöÇSYNCHRONIZED clauseΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇUSAGE clauseΓöÇΓöÿ ΓööΓöÇVALUE clauseΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.16. Format 2 (RENAMES Clause -- Level-66 Entry) ΓòÉΓòÉΓòÉ
Description
Format 2 (RENAMES Clause -- Level-66 Entry) regroups previously defined items
by specifying alternative, possibly overlapping, groupings of elementary data
items.
You must use the level number 66 for data description entries that contain
the RENAMES clause. A level-66 entry cannot rename another level-66 entry,
nor can it rename a level-01, level-77, or level-88 entry.
One or more RENAMES entries can be written for a logical record. All RENAMES
entries associated with one logical record must immediately follow that
record's last data description entry.
Level number 66 and data-name-1 are not a part of the RENAMES clause itself
and are included in the format below only for clarity.
Format 2 (RENAMES Clause -- Level-66 Entry)
ΓöÇΓöÇ66 dataΓöÇnameΓöÇ1 RENAMES data-name-2ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
Γö£ΓöÇΓöÇTHROUGHΓöÇΓöÇΓö¼ΓöÇΓöÇdata-name-3ΓöÇΓöÇΓöÿ
ΓööΓöÇΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> data-name-2, data-name-3 ΓòÉΓòÉΓòÉ
Data-name-2 and data-name-3 identify the original grouping of data items; that
is, they must name elementary or group items within the associated level-01
entry, and must not be the same data-name. Both data-names may be qualified.
The OCCURS clause must not be specified in the data entries for data-name-2 and
data-name-3, or for any group entry to which they are subordinate. In addition,
the OCCURS DEPENDING ON clause must not be specified for any item defined
between data-name-2 and data-name-3.
When data-name-3 is specified, data-name-1 is treated as a group item that
includes all elementary items:
Starting with data-name-2 (if it is an elementary item) or the first
elementary item within data-name-2 (if it is a group item)
Ending with data-name-3 (if it is an elementary item) or the last elementary
item within data-name-3 (if it is a group item).
The keywords THROUGH and THRU are equivalent.
The leftmost character in data-name-3 must not precede the leftmost character
in data-name-2; the rightmost character in data-name-3 must not precede the
rightmost character in data-name-2. This means that data-name-3 may not be
totally subordinate to data-name-2.
When data-name-3 is not specified, all of the data attributes of data-name-2
become the data attributes for data-name-1. That is:
When data-name-2 is a group item, data-name-1 is treated as a group item.
When data-name-2 is an elementary item, data-name-1 is treated as an
elementary item.
ΓòÉΓòÉΓòÉ 1.17. Level-Number ΓòÉΓòÉΓòÉ
Description
Level-number specifies the hierarchy of data within a record and identifies
special-purpose data entries.
In Format 1, level-number can be any number from 01-49 or 77.
Level-numbers 01 and 77 must begin in Area A and be followed either by a
separator period or by a space followed by its associated data-name,
FILLER, or appropriate data description clause.
Level-numbers 02 through 49 can begin in Areas A or B and must be followed
by a space or a separator period.
Level-numbers 66 and 88 can begin in Areas A or B and must be followed by
a space.
You can substitute single-digit level-numbers 1 through 9 for level-numbers
01 through 09.
ΓòÉΓòÉΓòÉ 1.18. BLANK WHEN ZERO Clause ΓòÉΓòÉΓòÉ
Description
The BLANK WHEN ZERO clause specifies that an item contains nothing but spaces
when its value is zero. You can specify the BLANK WHEN ZERO clause only for
elementary numeric or numeric-edited items. These items must be described,
either implicitly or explicitly, as USAGE IS DISPLAY.
Do not specify the BLANK WHEN ZERO clause for level-66 or level-88 items.
Do not specify the BLANK WHEN ZERO clause for the same entry as the
PICTURE symbols S or *.
The BLANK WHEN ZERO clause is not allowed for items described with the
USAGE IS INDEX clause or the USAGE IS POINTER clause.
ΓöÇΓöÇΓöÇBLANKΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇZEROΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööWHENΓöÿ
ΓòÉΓòÉΓòÉ 1.19. JUSTIFIED Clause ΓòÉΓòÉΓòÉ
Description
The JUSTIFIED clause overrides standard positioning rules for a receiving
item of the alphabetic or alphanumeric categories. You can specify JUSTIFIED
only at the elementary level.
You can specify the JUSTIFIED clause for alphanumeric-edited items, but not
for numeric or numeric-edited items.
When you specify the JUSTIFIED clause for a receiving item, the data is
aligned at the rightmost character position in the receiving item. Also:
If the sending item is larger that the receiving item, the leftmost
characters are truncated.
If the sending item is smaller than the receiving item, the unused
character positions at the left are filled with spaces.
You cannot specify the JUSTIFIED clause:
In descriptions of items described with the USAGE IS INDEX clause or the
USAGE IS POINTER clause.
For level-66 (RENAMES) and level-88 (condition-name) entries.
For variables greater than 32 767 characters.
The JUSTIFIED clause does not affect initial values, as determined by the
VALUE clause.
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇJUSTIFIEDΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇΓöÇJUSTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööRIGHTΓöÿ
ΓòÉΓòÉΓòÉ 1.20. OCCURS Clause ΓòÉΓòÉΓòÉ
Description
The OCCURS clause specifies tables whose elements can be referred to by
indexing or subscripting. The OCCURS and USAGE IS INDEX clauses are the two
Data Division clauses used for table handling.
An item whose usage is POINTER can contain an OCCURS clause, or be
subordinate to an item declared with an OCCURS clause.
The OCCURS clause cannot be specified in a data description entry that has a
level number of 01, 66, 77, or 88. The OCCURS clause has two formats:
Format 1 (Fixed-length tables)
Format 2 (Variable-length tables)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Fixed-Length Tables) ΓòÉΓòÉΓòÉ
Description
Format 1 of the OCCURS clause specifies fixed-length tables.
Format 1 (Fixed-Length Tables)
ΓöÇΓöÇOCCURS integerΓöÇ2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTIMESΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇΓö¼ΓöÇASCENDINGΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇdataΓöÇnameΓöÇ2ΓöÇΓö┤ΓöÇΓöÿ
ΓööΓöÇDESCENDINGΓöÇΓöÿ ΓööΓöÇKEYΓöÇΓöÿΓööΓöÇISΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇINDEXEDΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇindexΓöÇnameΓöÇ1ΓöÇΓö┤ΓöÇΓöÇΓöÿ
ΓööΓöÇBYΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> ASCENDING/DESCENDING KEY Phrase ΓòÉΓòÉΓòÉ
With the ASCENDING/DESCENDING KEY phrase, data is arranged in ascending or
descending order, depending on the keyword specified, according to the values
contained in data-name-2. The data-names are listed in their descending order
of significance.
When you specify the ASCENDING/DESCENDING KEY phrase, the following rules
apply:
Keys must be listed in decreasing order of significance.
The total number of keys for a given table element must not exceed 12.
You must arrange the data in the table in ASCENDING or DESCENDING sequence
according to the collating sequence in use.
A key may have DISPLAY, BINARY, PACKED-DECIMAL, or COMPUTATIONAL usage.
ΓòÉΓòÉΓòÉ <hidden> Format 2 (Variable-Length Tables) ΓòÉΓòÉΓòÉ
Description
The OCCURS DEPENDING ON clause specifies variable-length tables.
Format 2 (Variable-Length Tables)
ΓöÇΓöÇOCCURSΓöÇΓöÇinteger-1 TO integer-2ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTIMESΓöÇΓöÿ
ΓöÇΓöÇDEPENDINGΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼dataΓöÇnameΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇONΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇΓö¼ΓöÇASCENDINGΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇdataΓöÇnameΓöÇ2ΓöÇΓö┤ΓöÇΓöÿ
ΓööΓöÇDESCENDINGΓöÇΓöÿ ΓööΓöÇKEYΓöÇΓöÿΓööΓöÇISΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇINDEXEDΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇindexΓöÇnameΓöÇ1ΓöÇΓö┤ΓöÇΓöÇΓöÿ
ΓööΓöÇBYΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.21. PICTURE Clause ΓòÉΓòÉΓòÉ
Description
The PICTURE clause specifies the general characteristics and editing
requirements of an elementary item. You must specify a PICTURE clause for
every elementary item except an index data item or the subject of the RENAMES
clause.
The PICTURE character string, which may contain a maximum of 30 characters,
is made up of certain COBOL characters used as symbols. The allowable
combinations determine the category of the elementary data item.
Allowable characters include: A, B, P, S, V, X, Z, 9, 1, 0, /, , (comma), .
(period), +, -, CR, DB, *, and $.
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇPICTUREΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇcharacterΓöÇstringΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇPICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇISΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.22. REDEFINES Clause ΓòÉΓòÉΓòÉ
Description
The REDEFINES clause allows you to use different description entries to
describe the same computer storage area. When you specify the REDEFINES
clause, it must be the first entry following data-name-1 or FILLER. If you
do not specify data-name-1 or FILLER, REDEFINES must be the first entry
following the level-number.
The level-numbers of data-name-1 and data-name-2 must be identical and must
not be level 66 or level 88.
ΓöÇΓöÇlevel-numberΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇREDEFINES dataΓöÇnameΓöÇ2ΓöÇΓöÇ
Γö£ΓöÇΓöÇdataΓöÇnameΓöÇ1ΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇFILLERΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.23. LIKE Clause ΓòÉΓòÉΓòÉ
Description
The LIKE clause allows you to define the PICTURE, USAGE, and SIGN
characteristics of a data item by copying them from a previously defined data
item. It also allows you to make the length of the data item you define
different from the original item. For Boolean data, you cannot change the
length of the data item using this clause.
You cannot use the LIKE clause to:
Change the length of an edited item
Change the length of an index
Change the number of decimal places in a data item.
You can specify one or more other clauses before or after the LIKE clause:
JUSTIFIED
SYNCHRONIZED
BLANK WHEN ZERO
VALUE
OCCURS.
You can specify BLANK WHEN ZERO only if it has not previously been inherited.
You cannot use the LIKE clause with:
REDEFINES
SIGN
USAGE
PICTURE.
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇLIKEΓöÇΓöÇΓöÇdata-nameΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇ(integer)ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.24. SIGN Clause ΓòÉΓòÉΓòÉ
Description
The SIGN clause specifies the position and the mode of representation of the
operational sign for a numeric entry. You can specify the SIGN clause only
for a signed numeric data description entry (that is, one whose PICTURE
character-string contains an S) or for a group item that contains at least
one such elementary entry. You must specify, explicitly or implicitly, USAGE
IS DISPLAY.
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇLEADINGΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇSIGNΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ ΓööΓöÇTRAILINGΓöÇΓöÿ ΓööSEPARATEΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööCHARACTERΓöÿ
ΓòÉΓòÉΓòÉ <hidden> SEPARATE CHARACTER Phrase ΓòÉΓòÉΓòÉ
If you specify the SEPARATE CHARACTER phrase:
The operational sign is presumed to be the LEADING or TRAILING character
position, whichever you specify, of the elementary numeric data item. This
character position is not a digit position.
The character S in the PICTURE character string is counted in determining the
size of the data item (in terms of standard data format characters).
+ is the character used for the positive operational sign.
- is the character used for the negative operational sign.
If you do not specify the SEPARATE CHARACTER phrase:
The operational sign is presumed to be associated with the LEADING or
TRAILING digit position, whichever you specify, of the elementary numeric
data item. In this instance, specifying SIGN IS TRAILING is the equivalent
of the standard action of the compiler.
The character S in the PICTURE character string is not counted in determining
the size of the item (in terms of standard data format characters).
ΓòÉΓòÉΓòÉ 1.25. SYNCHRONIZED Clause ΓòÉΓòÉΓòÉ
Description
The SYNCHRONIZED clause specifies the alignment of an elementary item on a
natural boundary in storage. The SYNCHRONIZED clause may appear only at the
elementary level. You cannot use it for group items.
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇSYNCHRONIZEDΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇSYNCΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γö£ΓöÇΓöÇLEFTΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇRIGHTΓöÇΓöÇΓöÿ
The effect of the SYNCHRONIZED clause is dependent on the USAGE you specify for
an item.
If the USAGE is... The SYNCHRONIZED clause...
DISPLAY is syntax-checked but does not affect execution
PACKED-DECIMAL is syntax-checked but does not affect execution
COMPUTATIONAL-3 is syntax-checked but does not affect execution
BINARY:
PIC S9(1) through S9(4) aligns the data item at a multiple of 2 relative
to the beginning of the record
PIC S9(5) through S9(18) aligns the data item at a multiple of 4 relative
to the beginning of the record
COMPUTATIONAL-4 functions the same as for USAGE BINARY
COMPUTATIONAL is syntax-checked but does not affect execution
INDEX is not permitted
ΓòÉΓòÉΓòÉ 1.26. USAGE Clause ΓòÉΓòÉΓòÉ
Description
The USAGE clause specifies the format of a data item in computer storage.
You can specify the USAGE clause for a data description entry at any level.
However, if you specify USAGE at the group level, USAGE applies to each
elementary item in the group. The usage of an elementary item must not
contradict the usage of a group to which the elementary item belongs.
The USAGE clause specifies the format in which data is represented in
storage. The format may be restricted if certain Procedure Division
statements are used.
When you do not specify the USAGE clause at either the group or elementary
level, it is assumed that usage is DISPLAY.
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇBINARYΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇΓöÇUSAGEΓöÇΓö¼ΓöÇΓöÇΓö¼Γöÿ Γö£ΓöÇΓöÇCOMPUTATIONALΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööISΓöÿ Γö£ΓöÇΓöÇCOMPΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇCOMPUTATIONAL-3ΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇCOMP-3ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇCOMPUTATIONAL-4ΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇCOMP-4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇDISPLAYΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇINDEXΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇPACKED-DECIMALΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇPOINTERΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.27. VALUE Clause ΓòÉΓòÉΓòÉ
Description
The VALUE clause specifies the initial contents of a data item or the value
or values associated with a condition-name. The VALUE clause has three
formats:
Format 1 (Literal Value Clause)
Format 2 (Condition-Name Value Clause)
Format 3 (NULL Value Clause)
ΓòÉΓòÉΓòÉ <hidden> Literal VALUE Clause ΓòÉΓòÉΓòÉ
Description
The Literal VALUE Clause specifies the initial value of a data item.
If the item is numeric, all VALUE clause literals must be numeric.
All numeric literals in a VALUE clause of an item must have a value that is
within the range of values indicated by the PICTURE clause for that item.
If the item is an elementary or group alphabetic, alphanumeric,
alphanumeric-edited, or numeric-edited item, the VALUE clause literal must be
nonnumeric.
If the item is Boolean, the VALUE clause must be a Boolean literal.
Literal VALUE Clause
ΓöÇΓöÇΓöÇVALUEΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇliteralΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇISΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Condition-Name VALUE Clause (Level-88 Entry) ΓòÉΓòÉΓòÉ
Description
The Condition-Name VALUE Clause associates a single value, multiple values,
and/or ranges of values with a condition-name. Each such condition-name
requires a separate level-88 entry.
Condition-Name VALUE Clause (Level-88 Entry)
ΓöÇΓöÇΓöÇ88 conditionΓöÇnameΓöÇΓöÇΓö¼ΓöÇVALUEΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓööΓöÇISΓöÇΓöÿ Γöé
ΓööΓöÇVALUESΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööΓöÇAREΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇTHROUGHΓöÇΓö¼ΓöÇΓöÇliteral-2ΓöÇΓöÇΓöÿ
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> NULL Value Clause ΓòÉΓòÉΓòÉ
Description
The Data Description Entry Format 3 (NULL Value Clause) assigns an address
that is not valid to a pointer data item (an item defined as USAGE IS
POINTER). The value of NULL is an undefined value.
You can specify VALUE IS NULL only for elementary items that are described
implicitly or explicitly as USAGE IS POINTER.
NULL Value Clause
ΓöÇΓöÇΓöÇVALUEΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇNULLΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööISΓöÿ ΓööΓöÇΓöÇNULLSΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.28. Format 4 (Boolean Data) ΓòÉΓòÉΓòÉ
Description
The Data Description Entry Format 4 (Boolean Data) describes the indicators
you use in a COBOL program as Boolean data items. Boolean data items are
items limited to a value of 1 or 0.
Format 4 (Boolean Data)
ΓöÇΓöÇΓöÇlevel-numberΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
Γö£ΓöÇΓöÇdata-name-1ΓöÇΓöÇΓöñ Γö£ΓöÇΓöÇREDEFINESΓöÇΓöÇdata-name-2ΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇFILLERΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇLIKEΓöÇΓöÇdata-name-3ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇPICTUREΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ1ΓöÇΓöÇΓöÿ
ΓööΓöÇΓöÇPICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇISΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇDISPLAYΓöÇΓöÇΓöÿ
ΓööΓöÇΓöÇUSAGEΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓööΓöÇOCCURSΓöÇΓö¼ΓöÇinteger-1 TO integer-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
Γöé ΓööΓöÇTIMESΓöÇΓöÿ
ΓööΓöÇinteger-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
ΓööΓöÇTIMESΓöÇΓöÿ
1 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4
2 ΓöÇΓöÇΓöÇDEPENDINGΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇdata-name-4ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 5
ΓööΓöÇONΓöÇΓöÿ Γöé
3 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
4 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
5 ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇΓöÇINDEXEDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇindex-name-1ΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÿ
ΓööΓöÇBYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇINDICATORΓöÇΓöÇΓö¼ΓöÇΓöÇinteger-3ΓöÇΓöÿ
Γö£ΓöÇINDICATORSΓöÇΓöñ
ΓööΓöÇINDICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇSYNCHRONIZEDΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööΓöÇΓöÇSYNCΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γö£ΓöÇΓöÇLEFTΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇRIGHTΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇJUSTIFIEDΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööΓöÇJUSTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇRIGHTΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇVALUEΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇboolean-literalΓöÇΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> OCCURS Clause ΓòÉΓòÉΓòÉ
Description
The OCCURS clause specifies tables whose elements can be referred to by
indexing or subscripting. The OCCURS and USAGE IS INDEX clauses are the two
Data Division clauses used for table handling.
An item whose usage is POINTER can contain an OCCURS clause, or be
subordinate to an item declared with an OCCURS clause.
The OCCURS clause cannot be specified in a data description entry that has a
level number of 01, 66, 77, or 88.
When the OCCURS clause and the INDICATOR clause are both specified at an
elementary level, a table of Boolean data items is defined with each element
in the table corresponding to an external indicator. The first element in the
table corresponds to the indicator number specified in the INDICATOR clause;
the second element corresponds to the indicator that sequentially follows the
indicator specified by the INDICATOR clause. For example, if you code:
07 SWITCHES PIC 1
OCCURS 10 TIMES
INDICATOR 16.
SWITCHES (1) corresponds to indicator 16, SWITCHES (2) corresponds to indicator
17, and similarly, SWITCHES (10) corresponds to indicator 25.
ΓòÉΓòÉΓòÉ 1.29. Data Division -- File and Sort Description Entries ΓòÉΓòÉΓòÉ
Description
The File Section describes externally stored data. The File Section must
begin with the header FILE SECTION, followed by a separator period.
In a COBOL program, the File Description (FD) Entry (or Sort Description (SD)
Entry for sort/merge files) represents the highest level of organization in
the File Section. The order in which the optional clauses follow the FD or
SD entry is not important.
The File Section must contain a level indicator for each input and output
file.
For all files except sort/merge, the File Section must contain an FD
entry.
For each sort or merge file, the File Section must contain an SD entry.
The File Description Entry has six formats:
Format 1 (Formatfile, Database, Disk Files)
Format 2 (Diskette Files)
Format 3 (Tapefile Files)
Format 4 (Printer Files)
Format 5 (Sort/Merge Files)
Format 6 (Transaction Files)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Formatfile, Database, Disk Files) ΓòÉΓòÉΓòÉ
Description
The File Section must contain a level indicator for each input and output
file. For all files except sort/merge, the File Section must contain an FD
entry. The last clause in the FD entry must be immediately followed by a
separator period.
Format 1 (Formatfile, Database, Disk Files)
ΓöÇΓöÇFD file-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇBLOCKΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿΓööinteger-1 TOΓöÿ Γö£CHARACTERSΓöñ
ΓööRECORDSΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööRECORDΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓöéΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ Γöé
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-4 TO integer-5ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇLABELΓöÇΓö¼RECORDΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇSTANDARDΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓööISΓöÿ Γöé ΓööΓöÇOMITTEDΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööRECORDSΓö¼ΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööAREΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇVALUE OFΓöÇΓöÇΓöÇΓöÇsystem-name-1Γö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇdata-name-1Γö╝Γöÿ
ΓööISΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé v Γöé Γöé
ΓööΓöÇDATAΓöÇΓö¼ΓöÇRECORDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇdata-name-2ΓöÇΓö┤ΓöÇΓöÿ
Γöé ΓööΓöÇISΓöÇΓöÿ Γöé
ΓööΓöÇRECORDSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇAREΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (Diskette Files) ΓòÉΓòÉΓòÉ
Description
The File Section must contain a level indicator for each input and output
file. For all files except sort/merge, the File Section must contain an FD
entry. The last clause in the FD entry must be immediately followed by a
separator period.
Format 2 (Diskette Files)
ΓöÇΓöÇFD file-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇBLOCKΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿΓööinteger-1 TOΓöÿ Γö£CHARACTERSΓöñ
ΓööRECORDSΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööRECORDΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓöéΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ Γöé
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-4 TO integer-5ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇLABELΓöÇΓö¼RECORDΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇSTANDARDΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓööISΓöÿ Γöé ΓööΓöÇOMITTEDΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööRECORDSΓö¼ΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööAREΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇVALUE OFΓöÇΓöÇΓöÇΓöÇsystem-name-1Γö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇdata-name-1Γö╝Γöÿ
ΓööISΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé v Γöé Γöé
ΓööΓöÇDATAΓöÇΓö¼ΓöÇRECORDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇdata-name-2ΓöÇΓö┤ΓöÇΓöÿ
Γöé ΓööΓöÇISΓöÇΓöÿ Γöé
ΓööΓöÇRECORDSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇAREΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇCODE-SETΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇalphabet-name-1ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (Tapefile Files) ΓòÉΓòÉΓòÉ
Description
The File Section must contain a level indicator for each input and output
file. For all files except sort/merge, the File Section must contain an FD
entry. The last clause in the FD entry must be immediately followed by a
separator period.
Format 3 (Tapefile Files)
ΓöÇΓöÇFD file-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇBLOCKΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿΓööinteger-1 TOΓöÿ Γö£CHARACTERSΓöñ
ΓööRECORDSΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööRECORDΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓöéΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ Γöé
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-4 TO integer-5ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇLABELΓöÇΓö¼RECORDΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇSTANDARDΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓööISΓöÿ Γöé ΓööΓöÇOMITTEDΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööRECORDSΓö¼ΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööAREΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇVALUE OFΓöÇΓöÇΓöÇΓöÇsystem-name-1Γö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇdata-name-1Γö╝Γöÿ
ΓööISΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé v Γöé Γöé
ΓööΓöÇDATAΓöÇΓö¼ΓöÇRECORDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇdata-name-2ΓöÇΓö┤ΓöÇΓöÿ
Γöé ΓööΓöÇISΓöÇΓöÿ Γöé
ΓööΓöÇRECORDSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇAREΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇCODE-SETΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇalphabet-name-1ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 4 (Printer Files) ΓòÉΓòÉΓòÉ
Description
The File Section must contain a level indicator for each input and output
file. For all files except sort/merge, the File Section must contain an FD
entry. The last clause in the FD entry must be immediately followed by a
separator period.
Format 4 (Printer Files)
ΓöÇΓöÇFD file-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇBLOCKΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿΓööinteger-1 TOΓöÿ Γö£CHARACTERSΓöñ
ΓööRECORDSΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööRECORDΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓöéΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ Γöé
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-4 TO integer-5ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇLABELΓöÇΓö¼RECORDΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇSTANDARDΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓööISΓöÿ Γöé ΓööΓöÇOMITTEDΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööRECORDSΓö¼ΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööAREΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇVALUE OFΓöÇΓöÇΓöÇΓöÇsystem-name-1Γö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇdata-name-1Γö╝Γöÿ
ΓööISΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé v Γöé Γöé
ΓööΓöÇDATAΓöÇΓö¼ΓöÇRECORDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇdata-name-2ΓöÇΓö┤ΓöÇΓöÿ
Γöé ΓööΓöÇISΓöÇΓöÿ Γöé
ΓööΓöÇRECORDSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇAREΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓööΓöÇLINAGEΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇdata-name-3ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
ΓööΓöÇISΓöÇΓöÿ integer-6ΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇLINESΓöÇΓöÿ
1 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
2 ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇFOOTINGΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇdata-name-4ΓöÇΓö¼Γöÿ
ΓööΓöÇWITHΓöÇΓöÿ ΓööΓöÇATΓöÇΓöÿ ΓööΓöÇinteger-7ΓöÇΓöÇΓöÇΓöÿ
3 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼
4 Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼TOPΓö¼data-name-5Γö¼Γöÿ ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓö¼BOTTOMΓö¼data-name-6Γö¼Γöÿ
ΓööLINESΓöÿΓööATΓöÿ Γööinteger-8ΓöÇΓöÇΓöÿ ΓööLINESΓöÿΓööATΓöÿ Γööinteger-9ΓöÇΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇCODE-SETΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇalphabet-name-1ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 5 (Sort/Merge Files) ΓòÉΓòÉΓòÉ
Description
The File Section must contain a level indicator for each input and output
file.
You must write an SD entry for each sort or merge file in the program. The
last clause in the SD entry must be immediately followed by a separator
period. The following example illustrates a File Section entry for a sort or
merge file:
SD SORT-FILE.
01 SORT-RECORD PICTURE X(80).
Format 5 (Sort/Merge Files)
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇSD file-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööRECORDΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓöéΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ Γöé
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-4 TO integer-5ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööDATAΓöÇΓö¼ΓöÇRECORDΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇdata-name-2ΓöÇΓö┤ΓöÇΓöÿ
Γöé ΓööISΓöÇΓöÿΓöé
ΓööΓöÇRECORDSΓö¼ΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööAREΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 6 (Transaction Files) ΓòÉΓòÉΓòÉ
Description
The File Section must contain a level indicator for each input and output
file. For all files except sort/merge, the File Section must contain an FD
entry. The last clause in the FD entry must be immediately followed by a
separator period.
Format 6 (Transaction Files)
ΓöÇΓöÇFD file-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööRECORDΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓöéΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ Γöé
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-4 TO integer-5ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇLABELΓöÇΓö¼RECORDΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇSTANDARDΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé ΓööISΓöÿ Γöé ΓööΓöÇOMITTEDΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööRECORDSΓö¼ΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööAREΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööDATAΓöÇΓö¼ΓöÇRECORDΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇdata-name-2ΓöÇΓö┤ΓöÇΓöÿ
Γöé ΓööISΓöÇΓöÿΓöé
ΓööΓöÇRECORDSΓö¼ΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööAREΓöÿ
The AS/400 system only supports ASCII and ISO for tape and diskette files.
Therefore, if the CODE-SET clause specifies a character code set of STANDARD-1
(ASCII), or STANDARD-2 (ISO) for a file that is not a tape or diskette file, a
warning message is issued and the EBCDIC character set is used.
ΓòÉΓòÉΓòÉ 1.30. RECORD Clause ΓòÉΓòÉΓòÉ
The RECORD Clause has two formats:
Format 1 specifies the number of character positions for fixed-length records:
ΓöÇΓöÇΓöÇRECORDΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼integer-3Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ
Format 2 specifies the number of character positions for either fixed or
variable-length records. You must specify the record size as the number of
character positions needed to store the record internally. That is, specify
the number of bytes occupied internally by the characters of the record (not
the number of characters used to represent the item within the record).
The maximum record length for a file is 32 766.
When one of the entries within a record description contains an OCCURS
DEPENDING ON clause, the compiler calculates the record size as follows:
When you specify the Format 2 RECORD CONTAINS clause, the record is
considered to have a variable size; varying from the size obtained for the
minimum size of the variable-length item, to the value obtained for the
maximum size of the variable-length item.
When you do not specify the RECORD CONTAINS clause, or if you specify the
Format 1 RECORD CONTAINS clause, the compiler uses the maximum value of the
variable-length item to calculate the record length.
ΓöÇΓöÇΓöÇRECORDΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼integer-4 TO integer-5ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼
ΓööCONTAINSΓöÿ ΓööCHARACTERSΓöÿ
ΓòÉΓòÉΓòÉ 1.31. Procedure Division ΓòÉΓòÉΓòÉ
Description
The Procedure Division is optional in a COBOL source program. The Procedure
Division consists of optional declaratives, and procedures that contain
sections and/or paragraphs, sentences, and statements.
The Procedure Division has two formats:
Procedure Division (Format 1)
Procedure Division (Format 2)
Click here for help with individual Procedure Division statements.
ΓòÉΓòÉΓòÉ 1.32. Procedure Division (Format 1) ΓòÉΓòÉΓòÉ
Description
The structure of the Procedure Division (Format 1) is as follows:
ΓöÇΓöÇΓöÇΓöÇPROCEDURE DIVISIONΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇUSING data-name-1ΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé Γöé
ΓööΓöÇDECLARATIVES. sectΓöÇΓöÇΓöÇUSE statement. ΓöÇΓöÇparaΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇ 2
1 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé
Γöé
2 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇEND DECLARATIVES. ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓöÇΓöÇsectΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇparaΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
where sect is
ΓöÇΓöÇΓöÇΓöÇΓöÇsection-name SECTIONΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ.ΓöÇΓöÇ
ΓööΓöÇsegment-numberΓöÇΓöÇΓöÿ
where para is
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé Γöé
ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé Γöé
ΓööΓöÇparagraph-name. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇsentenceΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.33. Procedure Division (Format 2) ΓòÉΓòÉΓòÉ
Description
The structure of the Procedure Division (Format 2) is as follows:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇPROCEDURE DIVISIONΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ. paragraphΓöÇname. ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé ΓöéΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé Γöé ΓöéΓöé
ΓööUSING dataΓöÇnameΓöÇ1Γö┤Γöÿ ΓöösentenceΓö┤Γöÿ
ΓòÉΓòÉΓòÉ 1.34. USING Phrase ΓòÉΓòÉΓòÉ
Description
The USING phrase makes data items defined in a calling program available
to a called subprogram. The USING phrase is required only if the object
program is to be invoked by a CALL statement and that statement includes a
USING phrase.
Each USING identifier in a calling program names data items that are
defined in any Data Division section.
An identifier may appear more than once in a Procedure Division USING
phrase. The last value passed to it by a CALL USING statement is used.
Data items defined in the Linkage Section of the called program may be
referenced within the Procedure Division of that program if, and only if,
they satisfy one of the following conditions:
- They are operands of the USING phrase of the Procedure Division header.
- They are defined with a REDEFINES or RENAMES clause, the object of
which satisfies the above conditions.
- They are items subordinate to any item that satisfies the condition in
the rules above.
- They are condition-names or index-names associated with data items that
satisfy any of the above conditions.
The USING phrase is valid with the following:
The Procedure Division header of a called subprogram:
The USING phrase is valid in the Procedure Division header of a called
subprogram entered at the beginning of the nondeclaratives portion; each
USING identifier must be defined as a level-01 or level-77 item in the
Linkage Section of the called subprogram; it must not contain a REDEFINES
clause.
The CALL statement of a called subprogram:
In a calling program, the USING phrase is valid for the CALL statement; each
USING identifier must be defined as a level-01, level-77, or an elementary
item in the Data Division. The maximum number of data-names that can be
specified is 30.
The USING phrase is specified in the Procedure Division header if, and only
if, this program is a subprogram invoked by a CALL statement that itself
contains a USING phrase. That is, for each CALL USING statement in a calling
program, a corresponding USING phrase must be specified in a called
subprogram.
The identifiers specified in a CALL USING statement name data items available
to the calling program that may be referred to in the called program; a given
identifier may appear more than once. These items are defined in any Data
Division section.
ΓòÉΓòÉΓòÉ 1.35. DECLARATIVES ΓòÉΓòÉΓòÉ
Description
Declaratives provide one or more special-purpose sections that are executed
when an exception condition occurs.
Preface the entire group of Declarative Sections with the keyword
DECLARATIVES. Write it on the line after the Procedure Division header.
Specify the end of the group with the keywords END DECLARATIVES. The
keywords DECLARATIVES and END DECLARATIVES must begin in Area A and be
followed by a separator period. No other text may appear on the same
line..
When you specify Declarative Sections, you must group them at the
beginning of the Procedure Division. When Declarative Sections are
specified, you need to divide the entire Procedure Division into sections.
Begin each Declarative Section with a USE sentence that identifies the
section's function. When an exception condition occurs, the series of
procedures that follow the USE sentence specify the actions to be taken.
End each Declarative Section with another section-name followed by a USE
sentence, or with the keywords END DECLARATIVES.
ΓòÉΓòÉΓòÉ 1.36. Procedure Division Statements ΓòÉΓòÉΓòÉ
Description
A Procedure Division statement is a syntactically valid combination of
identifiers and symbols (literals, relational-operators, and so forth)
beginning with a COBOL verb.
There are four categories of statements:
Imperative: Specifies an unconditional action to be taken by the program,
or is a conditional statement terminated by its explicit scope terminator.
Conditional: Specifies that the truth value of a condition is to be
determined, and that the subsequent action of the object program is
dependent on this truth value.
Delimited scope: Uses an explicit scope terminator to turn a conditional
statement into an imperative statement; the resulting imperative statement
can then be nested. Explicit scope terminators may also be used, however,
to terminate the scope of an imperative statement.
Compiler-directing: Directs the compiler to take specific actions during
compilation of the program.
COBOL statements can also be categorized according to the type of operations
they perform:
Arithmetic statements perform computations.
Data manipulation statements move and inspect data.
Input/output statements transfer data to and from files stored on external
media, and control low-volume data that is obtained from or sent to an
input/output device.
Procedure-branching statements allow statements, sentences, and paragraphs
in the Procedure Division to be executed non-sequentially.
For help with individual Procedure Division statements, select from the
following list.
ACCEPT INITIALIZE
ACQUIRE INSPECT
ADD MERGE
ALTER MOVE
CALL MULTIPLY
CANCEL OPEN
CLOSE PERFORM
COMMIT READ
COMPUTE RELEASE
CONTINUE RETURN
DELETE REWRITE
DISPLAY ROLLBACK
DIVIDE SEARCH
DROP SET
ENTER SORT
EVALUATE START
EXIT STOP
EXIT PROGRAM STRING
GOBACK SUBTRACT
GO TO UNSTRING
IF WRITE
ΓòÉΓòÉΓòÉ 1.37. ACCEPT Statement ΓòÉΓòÉΓòÉ
Description
The ACCEPT statement transfers data into the specified identifier. There is
no editing or error checking of the incoming data. The ACCEPT statement has
seven formats:
Format 1 (Data Transfer)
Format 2 (System Information Transfer)
Format 3 (Feedback)
Format 4 (Local Data Area)
Format 5 (PIP Data Area)
Format 6 (Attribute Data)
Format 7 (Workstation I/O)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Data Transfer) ΓòÉΓòÉΓòÉ
Description
Format 1 of the ACCEPT statement transfers data from an input/output device
into the specified identifier. The incoming data is received in USAGE IS
DISPLAY format. When you omit the FROM phrase, the ACCEPT statement obtains
input from the job input stream for batch jobs, and from the workstation for
interactive jobs.
Format 1 is useful for exceptional situations when operator intervention (to
supply a given message, code, or exception indicator) is required. The
operator must have the appropriate messages with which to reply.
Format 1 (Data Transfer)
ΓöÇΓöÇACCEPT identifier ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFROMΓöÇΓö¼ΓöÇΓöÇmnemonicΓöÇnameΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööΓöÇΓöÇenvironmentΓöÇnameΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (System Information Transfer) ΓòÉΓòÉΓòÉ
Description
Format 2 of the ACCEPT statement transfers system information contained in
the specified conceptual data items DATE, DAY, or TIME into the identifier.
The transfer must follow the rules for the MOVE statement without the
CORRESPONDING phrase.
Format 2 (System Information Transfer)
ΓöÇΓöÇACCEPT identifier FROMΓöÇΓöÇΓö¼ΓöÇΓöÇDATEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
Γö£ΓöÇΓöÇDAYΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇTIMEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (Feedback) ΓòÉΓòÉΓòÉ
Description
Format 3 of the ACCEPT statement transfers feedback information from an
active file to the identifier.
Format 3 (Feedback)
ΓöÇΓöÇACCEPT identifier FROM mnemonic-nameΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇFOR file-nameΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 4 (Local Data Area) ΓòÉΓòÉΓòÉ
Description
Format 4 of the ACCEPT statement transfers data to identifier-1 from the
system-defined local data area created for the job.
The move into identifier-1 takes place according to the rules for the MOVE
statement for a group move without the CORRESPONDING phrase.
There is only one local data area for each job, and all devices in a job
access the same local data area.
Format 4 (Local Data Area)
ΓöÇΓöÇACCEPT identifier-1 FROM mnemonic-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇliteralΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 5 (PIP Data Area) ΓòÉΓòÉΓòÉ
Description
Format 5 of the ACCEPT statement transfers data from the PIP (Program
Initialization Parameters) data area into the identifier.
The move into the identifier takes place according to the rules for the MOVE
statement for a group move without the CORRESPONDING phrase.
Format 5 (PIP Data Area)
ΓöÇΓöÇACCEPT identifier FROM mnemonic-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEXCEPTION imperative-statement-1ΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEXCEPTION imperative-statement-2ΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-ACCEPTΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 6 (Attribute Data) ΓòÉΓòÉΓòÉ
Description
Format 6 of the ACCEPT statement retrieves information (attribute data) about
a particular program device associated with a TRANSACTION file.
You can only use this format of the ACCEPT statement for files with an
organization of TRANSACTION.
Program device attributes are moved into identifier-1 from the appropriate
attribute data format, according to the rules for the MOVE statement for a
group move without the CORRESPONDING phrase.
The attribute data retrieved by the ACCEPT statement depends on whether the
data and the associated fields are applicable to a workstation or to a
communications device.
Format 6 (Attribute Data)
ΓöÇΓöÇACCEPT identifier-1 FROM mnemonic-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇFORΓöÇΓöÇfile-name-1ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 7 (Workstation I/O) ΓòÉΓòÉΓòÉ
Description
Format 7 of the ACCEPT statement (also known as the extended ACCEPT
statement) provides input support for workstation I/O.
An extended ACCEPT statement has one of the following:
an AT phrase
a FROM phrase with the CRT keyword
a MODE IS BLOCK phrase
a WITH phrase
an ON EXCEPTION phrase or a NOT ON EXCEPTION phrase, and PIP-DATA is not
specified for mnemonic-name
no FROM phrase, but CONSOLE IS CRT is specified in the SPECIAL-NAMES
paragraph.
An ACCEPT statement is not an extended ACCEPT statement if it:
has a FROM phrase (except the FROM CRT phrase) and CONSOLE IS CRT is
specified in the SPECIAL-NAMES paragraph, or
does not have a FROM phrase and CONSOLE IS CRT is not specified.
Format 7 (Workstation I/O)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇACCEPTΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇline-col-phraseΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇFROM CRTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇMODEΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇBLOCKΓöÇΓöÇΓöñ
Γöé ΓööΓöÇISΓöÇΓöÿ Γöé
Γöé Γöé
ΓööΓöÇwith-phraseΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEXCEPTION imperative-statement-1ΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEXCEPTION imperative-statement-2ΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-ACCEPTΓöÇΓöÿ
where line-col-phrase is:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇLINEΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓö¼ΓöÇΓöÇ
Γöé ΓööΓöÇATΓöÇΓöÿ Γöé ΓööΓöÇNUMBERΓöÇΓöÿ ΓööΓöÇinteger-1ΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé Γöé
Γöé Γöé Γöé Γöé
Γöé ΓööΓöÇΓö¼ΓöÇCOLUMNΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓöñ Γöé
Γöé ΓööΓöÇCOLΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇNUMBERΓöÇΓöÿ ΓööΓöÇinteger-1ΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
ΓööΓöÇΓöÇATΓöÇΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇinteger-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
where with-phrase is:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇWITHΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇAUTOΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ
Γöé ΓööΓöÇAUTO-SKIPΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓö¼ΓöÇBELLΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇBEEPΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇBLINKΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓö¼ΓöÇFULLΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇLENGTH-CHECKΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇHIGHLIGHTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓö¼ΓöÇREQUIREDΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇEMPTY-CHECKΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇREVERSE-VIDEOΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓö¼ΓöÇSECUREΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇNO-ECHOΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇUNDERLINEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇRIGHT-JUSTIFYΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇSPACE-FILLΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇTRAILING-SIGNΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇUPDATEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇZERO-FILLΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇSIZEΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-4ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇinteger-3ΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇPROMPTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-5ΓöÇΓö¼ΓöÇΓöñ
Γöé ΓööΓöÇCHARACTER ISΓöÇΓöÿ ΓööΓöÇliteralΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓö¼ΓöÇFOREGROUND-COLORΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇFOREGROUND-COLOURΓöÇΓöÿ ΓööΓöÇISΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓö¼ΓöÇBACKGROUND-COLORΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-5ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇBACKGROUND-COLOURΓöÇΓöÿ ΓööΓöÇISΓöÇΓöÿ Γöé
Γöé Γöé
ΓööΓöÇΓöÇΓöÇLEFT-JUSTIFYΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.38. ACQUIRE Statement ΓòÉΓòÉΓòÉ
Description
The ACQUIRE statement acquires a program device for a TRANSACTION file.
Successful completion of the ACQUIRE operation makes the program device
available for input and output operations. If the ACQUIRE is unsuccessful,
the file status is set to 9H and any applicable USE AFTER EXCEPTION/ERROR
procedure is invoked.
Format-TRANSACTION
ΓöÇΓöÇΓöÇACQUIREΓöÇΓöÇΓö¼ΓöÇidentifierΓöÇΓö¼ΓöÇΓöÇFORΓöÇΓöÇfile-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇliteralΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.39. ADD Statement ΓòÉΓòÉΓòÉ
Description
The ADD statement sums two or more numeric operands and stores the results.
Format 1 (ADD)
Format 2 (ADD with GIVING)
Format 3 (ADD with CORRESPONDING)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (ADD) ΓòÉΓòÉΓòÉ
Description
In Format 1, all identifiers or literals preceding the keyword TO are added
together; the resulting sum is added to and stored in identifier-2. This
process is repeated for each successive occurrence of identifier-2, in the
left-to-right order in which identifier-2 is specified.
The composite of operands in an arithmetic statement can have a maximum
length of 30 digits. In Format 1, the composite of operands is determined by
using all of the operands in a given statement.
Format 1 (ADD)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé Γöé
ΓöÇΓöÇΓöÇADDΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö╝ΓöÇΓöÇTOΓöÇΓöÇidentifier-2ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇROUNDEDΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-ADDΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (ADD with GIVING) ΓòÉΓòÉΓòÉ
Description
In Format 2, the values of the operands preceding the word GIVING are added
together, and the sum is stored as the new value of each data item referenced
by identifier-3.
The composite of operands in an arithmetic statement can have a maximum
length of 30 digits. In Format 2, the composite of operands is determined by
using all of the operands in a given statement excluding the data items that
follow the word GIVING.
Format 2 (ADD with GIVING)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇADDΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-2ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇTOΓöÇΓöÿ ΓööΓöÇΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇGIVINGΓöÇΓöÇΓöÇidentifier-3ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇROUNDEDΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-ADDΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (ADD with CORRESPONDING) ΓòÉΓòÉΓòÉ
Description
In Format 3, elementary data items within identifier-1 are added to and
stored in the corresponding elementary items within identifier-2.
The composite of operands in an arithmetic statement can have a maximum
length of 30 digits. In Format 3, the composite of operands is determined
separately for each pair of corresponding data items.
Format 3 (ADD with CORRESPONDING)
ΓöÇΓöÇΓöÇADDΓöÇΓöÇΓö¼ΓöÇCORRESPONDINGΓöÇΓö¼ΓöÇidentifier-1 TO identifier-2ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇCORRΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇROUNDEDΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-ADDΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.40. ALTER Statement ΓòÉΓòÉΓòÉ
Description
The ALTER statement changes the transfer point specified in a GO TO
statement.
Note: The ALTER statement is an obsolete language element and encourages
the use of unstructured programming practices. It is to be deleted from the
next revision of the ANSI Standard. The EVALUATE statement provides the same
function as the ALTER statement and helps ensure that your program will be
well-structured.
Format
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇALTER procedureΓöÇnameΓöÇ1 TOΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇprocedureΓöÇnameΓöÇ2Γö┤ΓöÇΓöÇ
ΓööΓöÇΓöÇPROCEED TOΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.41. CALL Statement ΓòÉΓòÉΓòÉ
Description
The CALL statement transfers control from one object program to another
within the run unit.
The program containing the CALL statement is the calling program; the program
identified in the CALL statement is the called subprogram.
Processing of the CALL statement passes control to the first nondeclarative
instruction of the called subprogram. Control returns to the calling program
at the instruction following the CALL statement.
Called subprograms can contain CALL statements; however, a called subprogram
must not itself execute a CALL statement that directly or indirectly calls
the calling program.
Format 1 (CALL ON OVERFLOW)
Format 2 (CALL ON EXCEPTION)
You can also use the CALL statement to access OS/400 graphics routines:
CALL GDDM
ΓòÉΓòÉΓòÉ <hidden> Format 1 (CALL ON OVERFLOW) ΓòÉΓòÉΓòÉ
Description
The program containing the CALL statement is the calling program; the program
identified in the CALL statement is the called subprogram.
Format 1 (CALL ON OVERFLOW)
ΓöÇΓöÇCALLΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöéΓöé
Γöé ΓöéΓöéΓöé
ΓööΓöÇUSINGΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼identifier-2Γö╝Γö╝Γöÿ
Γöé ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇREFERENCEΓöÇΓöÇΓöÿ Γö£ΓöÇADDRESS OFΓöÇΓöÇΓöÿ ΓöéΓöé
Γöé ΓööΓöÇBYΓöÇΓöÿ ΓööΓöÇfile-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿΓöé
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇCONTENTΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇidentifier-2Γö╝Γöÿ
ΓööΓöÇBYΓöÇΓöÿ Γöé Γö£ADDRESS OFΓöñ Γöé
Γöé ΓööLENGTH OFΓöÇΓöÿ Γöé
ΓööΓöÇΓöÇΓö¼ΓöÇliteral-2ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇfile-name-1ΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓö¼OVERFLOW imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööONΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇENDΓöÇCALLΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (CALL ON EXCEPTION) ΓòÉΓòÉΓòÉ
Description
The program containing the CALL statement is the calling program; the program
identified in the CALL statement is the called subprogram.
Format 2 (CALL ON EXCEPTION)
ΓöÇΓöÇCALLΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöéΓöé
Γöé Γöé ΓöéΓöé
ΓööΓöÇUSINGΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇidentifier-2Γö╝ΓöÇΓö╝Γöÿ
Γöé ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇREFERENCEΓöÇΓöÿΓö£ΓöÇADDRESS OFΓöÇΓöÇΓöÿ Γöé Γöé
Γöé ΓööΓöÇBYΓöÇΓöÿ ΓööΓöÇfile-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇCONTENTΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇidentifier-2ΓöÇΓö╝Γöÿ
ΓööΓöÇBYΓöÇΓöÿ Γöé Γö£ΓöÇADDRESS OFΓöÇΓöñ Γöé
Γöé ΓööΓöÇLENGTH OFΓöÇΓöÇΓöÿ Γöé
ΓööΓöÇΓö¼ΓöÇliteral-2ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇfile-name-1ΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇEXCEPTION imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇEXCEPTION imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇENDΓöÇCALLΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.42. CALL GDDM ΓòÉΓòÉΓòÉ
Description
You can use the CALL statement to access the following OS/400 graphics
routines:
Graphical Data Display Manager (GDDM), a set of graphics primitives for
drawing pictures
Presentation Graphics Routines (PGR), a set of business charting routines.
You access all these graphics routines with the same format of the CALL
statement.
CALL GDDM
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇCALL "GDDM" USINGΓöÇΓöÇΓöÇroutine-nameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇdata-name-1ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.43. CANCEL Statement ΓòÉΓòÉΓòÉ
Description
The CANCEL statement ensures that the next time the referenced subprogram is
called, it will be entered in its initial state.
A CANCEL statement:
Closes all open files
Operates only on the program specified, and not on any program that may
have been called by the canceled program.
No action is taken when you use a CANCEL statement to cancel the following
types of programs:
A program that has not been called in the run unit
A program that has been called and subsequently canceled.
Called subprograms may contain CANCEL statements. However, recursive calls
are not allowed; a called subprogram must not contain a CANCEL statement that
directly or indirectly cancels the calling program itself, or any other
program higher than itself in the calling hierarchy. In this case, control
passes to the next statement.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé Γöé
Γöé
ΓöÇΓöÇΓöÇΓöÇCANCELΓöÇΓöÇΓö¼ΓöÇΓöÇidentifierΓöÇ1ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇliteralΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.44. CLOSE Statement ΓòÉΓòÉΓòÉ
Description
The CLOSE statement terminates the processing of volumes and files, with
optional rewind and/or lock or removal, where applicable.
Format 1 (Sequential Files)
Format 2 (Indexed and Relative Files)
Format 3 (Transaction Files)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Sequential Files) ΓòÉΓòÉΓòÉ
Description
The CLOSE statement terminates the processing of volumes and files, with
optional rewind and/or lock or removal, where applicable.
You may execute it only for a file in an open mode. After successful
execution of the CLOSE statement without the REEL/UNIT phrase:
The record area associated with the file-name is no longer available.
Unsuccessful execution of a CLOSE statement leaves availability of the
record data undefined.
An OPEN statement for the file must be executed before any other
input/output statement.
Format 1 (Sequential Files Format)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇCLOSE file-name-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇΓö¼ΓöÇREELΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÿ
Γöé ΓööΓöÇUNITΓöÇΓöÿ Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇREMOVALΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé ΓööΓöÇFORΓöÇΓöÿ Γöé
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇNO REWINDΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ ΓööΓöÇLOCKΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (Indexed and Relative Files) ΓòÉΓòÉΓòÉ
Description
The CLOSE statement terminates the processing of volumes and files, with
optional rewind and/or lock or removal, where applicable. You may execute it
only for a file in an open mode.
Format 2 (Indexed and Relative Files Format)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇCLOSE fileΓöÇnameΓöÇ1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇLOCKΓöÇΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (Transaction Files) ΓòÉΓòÉΓòÉ
Description
The CLOSE statement terminates the processing of volumes and files, with
optional rewind and/or lock or removal, where applicable. You may execute it
only for a file in an open mode.
Format 3 (Transaction Files Format)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇCLOSE fileΓöÇnameΓöÇ1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇLOCKΓöÇΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.45. COMMIT Statement ΓòÉΓòÉΓòÉ
Description
The COMMIT statement provides a way of synchronizing changes to data base
records while preventing other jobs from modifying those records until the
COMMIT is performed.
When the COMMIT statement is executed, all changes made to files under
commitment control since the previous commitment boundary are made permanent.
A commitment boundary is established by the successful execution of a
ROLLBACK or COMMIT statement. If no COMMIT or ROLLBACK has been issued in
the current job, a commitment boundary is established by the first OPEN of
any file under commitment control in the job. Changes are made to all files
under commitment control in the job, not just to files under commitment
control in the COBOL program that issues the COMMIT statement.
When a COMMIT is executed, all record locks held by the job since the last
commitment boundary for files under commitment control are released and the
records become available to other jobs.
The COMMIT statement only affects files under commitment control. If a
COMMIT is executed and there are no files opened under commitment control,
the COMMIT statement has no effect and no commitment boundary is established.
The COMMIT statement does not:
Modify the I-O-FEEDBACK area for any file
Change the file position indicator for any file
Set a file status value for any file.
ΓöÇΓöÇΓöÇCOMMITΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ 1.46. COMPUTE Statement ΓòÉΓòÉΓòÉ
Description
The COMPUTE statement assigns the value of an arithmetic expression to one or
more data items. It allows you to combine arithmetic operations without the
restrictions on receiving data items that the rules for the ADD, SUBTRACT,
MULTIPLY, and DIVIDE statements impose. When you need to combine arithmetic
operations, using the COMPUTE statement may be more efficient than writing a
series of separate arithmetic statements.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇCOMPUTE identifier-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇROUNDEDΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇ = arithmetic-expressionΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇEND-COMPUTEΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> arithmetic-expression ΓòÉΓòÉΓòÉ
When the COMPUTE statement is executed, the value of arithmetic-expression is
calculated, and this value is stored as the new value of each data item
referenced by identifier-1.
An arithmetic expression consisting of a single identifier or literal allows
you to set the value of the data items referenced by identifier-1 equal to the
value of that identifier or literal.
Click here for a description of arithmetic expressions.
ΓòÉΓòÉΓòÉ 1.47. CONTINUE Statement ΓòÉΓòÉΓòÉ
Description
The CONTINUE statement allows you to specify a no operation statement.
CONTINUE indicates that no executable instruction is present.
You can use the CONTINUE statement anywhere a conditional statement or an
imperative statement may be used. It has no effect on the execution of the
program.
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCONTINUEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ 1.48. DELETE Statement ΓòÉΓòÉΓòÉ
Description
The DELETE statement removes a record from an indexed or relative file. For
indexed files, you may reuse the key for record addition. For relative files,
the space is then available for a new record with the same RELATIVE KEY
value.
When the DELETE statement is executed, the associated file must be open in
I-O mode.
After successful execution of a DELETE statement, the record is logically
removed from the file and can no longer be accessed. Execution of the DELETE
statement does not affect the contents of the record area associated with the
file-name.
If you specified the FILE STATUS clause in the File-Control entry, the
associated status key is updated when the DELETE statement is executed.
The file position indicator is not affected by the processing of the DELETE
statement.
ΓöÇΓöÇΓöÇDELETE file-nameΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇRECORDΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-1ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINVALIDΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇimperative-statement-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOT INVALIDΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇimperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-DELETEΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> INVALID KEY/NOT INVALID KEY ΓòÉΓòÉΓòÉ
You must specify the INVALID KEY phrase for files for which an applicable
EXCEPTION/ERROR procedure is not specified.
After processing of a DELETE statement for which a NOT INVALID KEY phrase has
been specified, control transfers to imperative-statement-2.
For files in sequential access mode, the INVALID KEY and NOT INVALID KEY
phrases must not be specified; however, an EXCEPTION/ERROR procedure may be
specified.
For files in random or dynamic access mode, the results of DELETE statement
execution depend on whether the file organization is indexed or relative:
For files with indexed organization, the system logically removes the record
identified by the contents of the RECORD KEY data item. If the file does not
contain such a record, an INVALID KEY condition exists.
For files with relative organization, the system logically removes the record
identified by the contents of the RELATIVE KEY data item. If the file does
not contain such a record, an INVALID KEY condition exists. The space is then
available for a new record with the same RELATIVE KEY value.
For files in random or dynamic access mode, both the INVALID KEY phrase and the
EXCEPTION/ERROR procedure may be omitted.
Click here for further information about the INVALID KEY condition.
ΓòÉΓòÉΓòÉ 1.49. DISPLAY Statement ΓòÉΓòÉΓòÉ
Description
The DISPLAY statement transfers the contents of each operand to the output
device or system defined local data area. The contents are displayed in the
order from left to right in which the operands are listed. The DISPLAY
statement has three formats:
Format 1 (Data Transfer)
Format 2 (Local Data Area)
Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Data Transfer) ΓòÉΓòÉΓòÉ
Description
Format 1 of the DISPLAY statement transfers the data in the sending field to
the output device. The size of the sending field is the total character
count of all operands listed. If the hardware device is capable of receiving
data of the same size as the data item being transferred, then the data item
is transferred. If the hardware device is not capable of receiving data of
the same size as the data item being transferred, then one of the following
applies:
If the total character count is less than the device maximum logical
record size, the remaining rightmost characters are padded with spaces.
If the total character count exceeds the maximum, as many records are
written as are needed to display all operands. Any operand being printed
or displayed when the end of a record is reached is continued in the next
record.
After the last operand has been transferred to the output device, the device
is reset to the leftmost position of the next line of the device.
Format 1 (Data Transfer)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇDISPLAYΓöÇΓöÇΓö¼ΓöÇidentifierΓöÇ1ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇliteralΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇmnemonicΓöÇnameΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööΓöÇUPONΓöÇΓöÿ ΓööΓöÇenvironmentΓöÇnameΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> identifier-1 ΓòÉΓòÉΓòÉ
If identifier-1 is numeric and is not described as an external decimal, the
identifier is converted automatically to external format as follows:
Binary or internal decimal are converted to external decimal. Negative signed
values cause a low-order sign to be displayed. For example, if SIGN WITH
SEPARATE CHARACTER is not specified and two numeric items have the values -34
and 34, they are displayed as 3M and 34 respectively. If SIGN WITH SEPARATE
CHARACTER is specified, a + or a - sign is displayed as either leading or
trailing, depending on how the number was specified.
Note: Group items containing packed or binary data (COMP, COMP-3,
PACKED-DECIMAL, BINARY, or COMP-4) should not be displayed on a display
station. Such data can contain display station control characters which can
cause undesirable and unpredictable results.
No other identifiers require conversion.
ΓòÉΓòÉΓòÉ <hidden> Format 2 (Local Data Area) ΓòÉΓòÉΓòÉ
Description
Format 2 of the DISPLAY statement transfers data to the system-defined area
created for the job.
The data is written to the local data area according to the rules for the
MOVE statement for a group move without the CORRESPONDING phrase, and without
padding on the right with spaces.
There is only one local data area for each job, and all devices in a job
access the same local data area.
Format 2 (Local Data Area)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇDISPLAYΓöÇΓöÇΓö¼ΓöÇidentifierΓöÇ1ΓöÇΓö╝ΓöÇΓöÇUPONΓöÇΓöÇΓöÇmnemonic-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇliteralΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼Γöÿ
ΓööΓöÇFORΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (Workstation I/O) ΓòÉΓòÉΓòÉ
Description
Format 3 of the DISPLAY statement (also known as the extended DISPLAY
statement) provides output support for workstation I/O.
An extended DISPLAY statement has one of the following:
an AT phrase
an UPON phrase with CRT or CRT-UNDER
a MODE IS BLOCK phrase
a WITH phrase
no UPON phrase, but CONSOLE IS CRT is specified in the SPECIAL-NAMES
paragraph.
A DISPLAY statement is not an extended DISPLAY statement if it:
has an UPON phrase (except the UPON CRT/CRT-UNDER phrase)
does not have an UPON phrase and CONSOLE IS CRT is not specified in the
SPECIAL-NAMES paragraph.
Format 3 (Workstation I/O)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇDISPLAYΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇline-col-phraseΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇUPONΓöÇΓö¼ΓöÇCRTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇCRT-UNDERΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇMODEΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇBLOCKΓöÇΓöÇΓöñ
Γöé ΓööΓöÇISΓöÇΓöÿ Γöé
Γöé Γöé
ΓööΓöÇwith-phraseΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
where line-col-phrase is:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇLINEΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓö¼ΓöÇΓöÇ
Γöé ΓööΓöÇATΓöÇΓöÿ Γöé ΓööΓöÇNUMBERΓöÇΓöÿ ΓööΓöÇinteger-1ΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé Γöé
Γöé Γöé Γöé Γöé
Γöé ΓööΓöÇΓö¼ΓöÇCOLUMNΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓöñ Γöé
Γöé ΓööΓöÇCOLΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇNUMBERΓöÇΓöÿ ΓööΓöÇinteger-1ΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
ΓööΓöÇΓöÇATΓöÇΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇinteger-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
where with-phrase is:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇWITHΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇBELLΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ
Γöé ΓööΓöÇBEEPΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇBLINKΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇHIGHLIGHTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇREVERSE-VIDEOΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇUNDERLINEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇBLANKΓöÇΓöÇΓö¼ΓöÇSCREENΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇLINEΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓöÇΓöÇSIZEΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-4ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇinteger-3ΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
Γö£ΓöÇΓö¼ΓöÇFOREGROUND-COLORΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇFOREGROUND-COLOURΓöÇΓöÿ ΓööΓöÇISΓöÇΓöÿ Γöé
Γöé Γöé
ΓööΓöÇΓö¼ΓöÇBACKGROUND-COLORΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇinteger-5ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇBACKGROUND-COLOURΓöÇΓöÿ ΓööΓöÇISΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Identifier-1, Literal-1 ΓòÉΓòÉΓòÉ
Identifier-1 and literal-1 are data items whose value may be displayed.
If identifier-1 is a group item and there is no MODE IS BLOCK phrase, those
elementary subordinate items that have names other than FILLER are displayed.
They are displayed simultaneously, and positioned on the screen in the order
that their descriptions appear in the DATA DIVISION, separated by the lengths
of the FILLER items in the group. For this purpose, the first position on a
line is regarded as immediately following the last position on the previous
line. When items are separated by FILLERs, the attribute bytes are included in
the FILLER length. Thus a FILLER of one or two bytes would contain both the
trailing and leading attributes of separate items. In the case of a one-byte
FILLER, the trailing and leading attributes would occupy the same byte. Since
data items are normally separated by one attribute byte, one-byte FILLERs are
not necessary.
Identifiers or literals in a DISPLAY statement follow one after another,
separated by one attribute byte, unless an AT, LINE, or COLUMN phrase is
specified. If no AT, LINE, or COLUMN phrase appears in the statement, the first
identifier or literal begins at line 1, column 2, followed immediately by all
other identifiers or literals.
The phrases following the identifier or literal can be in any order. All
phrases specified apply to the previous identifier or literal, if one was
specified. The WITH and MODE phrases cannot be specified if an identifier or
literal was not previously specified.
If identifier-1 or literal-1 is not specified, neither the MODE IS BLOCK phrase
nor the WITH phrase is allowed.
If no identifier or literal is present, the DISPLAY operation changes the
screen position without actually displaying any data.
ΓòÉΓòÉΓòÉ 1.50. DIVIDE Statement ΓòÉΓòÉΓòÉ
Description
The DIVIDE statement divides one numeric data item into/by others and sets
the values of data items equal to the quotient and remainder.
Format 1 (DIVIDE)
Format 2 (DIVIDE INTO, GIVING)
Format 3 (DIVIDE BY, GIVING)
Format 4 (DIVIDE INTO, GIVING, with REMAINDER)
Format 5 (DIVIDE BY, GIVING, with REMAINDER)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (DIVIDE) ΓòÉΓòÉΓòÉ
Description
In Format 1 of the DIVIDE statement, the value of identifier-1 or literal-2
is divided into the value of identifier-2; the quotient is then placed in
identifier-2. This process is repeated for each successive occurrence.
Format 1 (DIVIDE)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇDIVIDEΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö¼ΓöÇINTO identifier-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇROUNDEDΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-DIVIDEΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (DIVIDE INTO, GIVING) ΓòÉΓòÉΓòÉ
Description
In Format 2, the value of identifier-1 or literal-1 is divided into the value
of identifier-2 or literal-2. The value of the quotient is stored in each
data item referenced in the GIVING phrase by identifier-3.
Format 2 (DIVIDE INTO, GIVING)
ΓöÇΓöÇDIVIDEΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇINTOΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇGIVING identifier-3ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇROUNDEDΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-DIVIDEΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (DIVIDE BY, GIVING) ΓòÉΓòÉΓòÉ
Description
In Format 3, the value of identifier-1 or literal-1 is divided by the value
of identifier-2 or literal-2. The value of the quotient is stored in each
data item referenced in the GIVING phrase by identifier-3.
Format 3 (DIVIDE BY, GIVING)
ΓöÇΓöÇDIVIDEΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö¼ΓöÇΓöÇBYΓöÇΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇGIVING identifier-3ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇROUNDEDΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-DIVIDEΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 4 (DIVIDE INTO, GIVING, with REMAINDER) ΓòÉΓòÉΓòÉ
Description
In Format 4, the value of identifier-1 or literal-1 is divided into
identifier-2 or literal-2. The value of the quotient is stored in
identifier-3, and the value of the remainder is stored in identifier-4.
Format 4 (DIVIDE INTO, GIVING, with REMAINDER)
ΓöÇΓöÇDIVIDEΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇINTOΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇGIVING identifier-3ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇROUNDEDΓöÇΓöÇΓöÿ
ΓöÇΓöÇREMAINDER identifier-4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-DIVIDEΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 5 (DIVIDE BY, GIVING, with REMAINDER) ΓòÉΓòÉΓòÉ
Description
In Format 5, the value of identifier-1 or literal-1 is divided by
identifier-2 or literal-2. The value of the quotient is stored in
identifier-3, and the value of the remainder is stored in identifier-4.
Format 5 (DIVIDE BY, GIVING, with REMAINDER)
ΓöÇΓöÇDIVIDEΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö¼ΓöÇΓöÇBYΓöÇΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇGIVING identifier-3ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇROUNDEDΓöÇΓöÇΓöÿ
ΓöÇΓöÇREMAINDER identifier-4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-DIVIDEΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.51. DROP Statement ΓòÉΓòÉΓòÉ
Description
The DROP statement releases a program device acquired by a TRANSACTION file.
Program devices you specify in a DROP statement must have been acquired by
the TRANSACTION file, either through an explicit ACQUIRE or through an
implicit ACQUIRE at OPEN time.
After successful execution of the DROP statement, the program device is no
longer available for input or output operations through the TRANSACTION file.
The device may be reacquired if necessary. The contents of the record area
associated with a released program device are no longer available, even if
the device is reacquired.
If the DROP statement is unsuccessful, any applicable USE AFTER
EXCEPTION/ERROR procedures are executed.
ΓöÇΓöÇΓöÇDROPΓöÇΓöÇΓö¼ΓöÇidentifierΓöÇΓö¼ΓöÇΓöÇFROMΓöÇΓöÇΓöÇfile-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇliteralΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.52. ENTER Statement ΓòÉΓòÉΓòÉ
Description
The ENTER statement is obsolete and will be deleted from the next revision of
the ANSI Standard. It is syntax-checked during compilation, but has no effect
on the execution of the program.
The ENTER statement allows the use of more than one source language in the
same source program. The COBOL/400 compiler allows only COBOL in the source
program.
ΓöÇΓöÇENTER languageΓöÇnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇroutineΓöÇnameΓöÇΓöÇΓöÿ ΓööΓöÇ . ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.53. EVALUATE Statement ΓòÉΓòÉΓòÉ
Description
The EVALUATE statement provides a shorthand notation for a series of nested
IF statements. It can evaluate multiple conditions. That is, the IF statement
can be made up of compound conditions. The subsequent action of the object
program depends on the results of these evaluations.
ΓöÇΓöÇEVALUATEΓöÇΓö¼ΓöÇΓöÇidentifierΓöÇ1ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
Γö£ΓöÇΓöÇliteralΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γö£ΓöÇΓöÇexpressionΓöÇ1ΓöÇΓöÇΓöñ Γöé Γöé Γöé
Γö£ΓöÇΓöÇTRUEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ ΓööΓöÇALSOΓöÇΓö¼ΓöÇΓöÇidentifierΓöÇ2ΓöÇΓöÇΓö╝ΓöÇΓöÿ
ΓööΓöÇΓöÇFALSEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γö£ΓöÇΓöÇliteralΓöÇ2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇexpressionΓöÇ2ΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇTRUEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇFALSEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
ΓöÇΓöÇWHEN phraseΓöÇ1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇimperativeΓöÇstatementΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööALSO phraseΓöÇ2Γö┤Γöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇWHEN OTHER imperativeΓöÇstatementΓöÇ2ΓöÇΓöÿ ΓööΓöÇEND-EVALUATEΓöÇΓöÿ
where phraseΓöÇ1 is:
ΓöÇΓö¼ΓöÇANYΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
Γö£ΓöÇconditionΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇTRUEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇFALSEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifierΓöÇ3ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööNOTΓöÿ Γö£ΓöÇliteralΓöÇ3ΓöÇΓöÇΓöÇΓöÇΓöñ ΓööΓö¼ΓöÇTHROUGHΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifierΓöÇ4ΓöÇΓö¼Γöÿ
ΓööΓöÇarithΓöÇexpΓöÇ1ΓöÇΓöÇΓöÿ ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ Γö£ΓöÇliteralΓöÇ4ΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇarithΓöÇexpΓöÇ2ΓöÇΓöÇΓöÿ
where phrase-2 is:
ΓöÇΓö¼ΓöÇANYΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
Γö£ΓöÇconditionΓöÇ2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇTRUEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇFALSEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifierΓöÇ5ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööNOTΓöÿ Γö£ΓöÇliteralΓöÇ5ΓöÇΓöÇΓöÇΓöÇΓöñ ΓööΓö¼ΓöÇTHROUGHΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifierΓöÇ6ΓöÇΓö¼Γöÿ
ΓööΓöÇarithΓöÇexpΓöÇ3ΓöÇΓöÇΓöÿ ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ Γö£ΓöÇliteralΓöÇ6ΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇarithΓöÇexpΓöÇ4ΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> arithmetic-expression ΓòÉΓòÉΓòÉ
Any selection subject in which expression-1, expression-2, ... is specified as
an arithmetic expression, and any selection object without the NOT or THRU
phrase in which arithmetic-expression-1 and/or arithmetic-expression-3 is
specified, are assigned numeric values according to the rules for evaluating an
arithmetic expression.
Click here for a description of arithmetic expressions.
ΓòÉΓòÉΓòÉ 1.54. EXIT Statement ΓòÉΓòÉΓòÉ
Description
The EXIT statement provides a common end point for a series of paragraphs.
It assigns a name to a given point in a program, and has no other effect on
the compilation or execution of the program. The EXIT statement must be
preceded by a paragraph-name and must appear in a sentence by itself. This
sentence does not need to be the only sentence in the paragraph.
The EXIT statement is useful for documenting the end point in a series of
paragraphs. If an EXIT paragraph is written as the last paragraph in a
declarative procedure or a series of performed procedures, it identifies the
point at which control will be transferred:
When control reaches such an EXIT paragraph and the associated declarative
or PERFORM statement is active, control is transferred to the appropriate
part of the Procedure Division.
When control reaches an EXIT paragraph that is not the end of a range of
procedures governed by an active PERFORM or USE statement, control passes
through the EXIT statement to the first statement of the next paragraph.
Without an EXIT statement, the end of the sequence is difficult to determine,
unless you know the logic of the program.
ΓöÇΓöÇΓöÇEXITΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ 1.55. EXIT PROGRAM Statement ΓòÉΓòÉΓòÉ
Description
The EXIT PROGRAM statement specifies the end of a called program and returns
control to the calling program.
If control reaches an EXIT PROGRAM statement while operating as a subprogram
in a COBOL run unit, control returns to the point in the calling program
immediately following the CALL statement. The program state of the calling
program is identical to that which existed at the time it executed the CALL
statement. The contents of data items and the contents of data files shared
between the calling and called program may have been changed. The program
state of the called program is not altered except that the ends of the ranges
of all PERFORM statements executed by that called program are considered to
have been reached.
If control reaches an EXIT PROGRAM statement, and no CALL statement is
active, control passes through the exit point to the next executable
statement.
The EXIT PROGRAM statement must appear as the only statement, or as the last
statement, in a series of imperative statements in a sentence.
When there is no next executable statement in a called program, an implicit
EXIT PROGRAM statement is executed.
ΓöÇΓöÇΓöÇEXIT PROGRAMΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ 1.56. GOBACK Statement ΓòÉΓòÉΓòÉ
Description
The GOBACK statement specifies the logical end of a called program. It
functions like the EXIT PROGRAM statement when coded as a part of a called
program, and like the STOP RUN statement when coded in a main program. In a
sentence, the GOBACK statement should appear as the only statement or as the
last statement in a series of imperative statements, because any statements
following GOBACK are not executed.
If control reached a GOBACK statement in a subprogram in a COBOL run unit,
control returns to the point in the calling program immediately following the
CALL statement, as in the EXIT PROGRAM statement.
ΓöÇΓöÇΓöÇGOBACKΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ 1.57. GO TO Statement ΓòÉΓòÉΓòÉ
Description
The GO TO statement transfers control from one part of the Procedure Division
to another. GO TO has three formats:
Format 1 (Unconditional GO TO)
Format 2 (Conditional GO TO)
Format 3 (Altered GO TO)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Unconditional GO TO) ΓòÉΓòÉΓòÉ
Description
The unconditional GO TO statement transfers control to the first statement in
the paragraph or section named in procedure-name, unless GO TO has been
modified by an ALTER statement. An unconditional GO TO statement, when it
appears in a sequence of imperative statements, must be the last statement in
the sequence.
When an ALTER statement refers to a paragraph, the paragraph must consist of
a paragraph-name followed by an unconditional or altered GO TO statement.
Format 1 (Unconditional GO TO)
ΓöÇΓöÇGOΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇprocedureΓöÇnameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTOΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (Conditional GO TO) ΓòÉΓòÉΓòÉ
Description
The conditional GO TO statement transfers control to one of a series of
procedures, depending on the value of the identifier. The maximum number of
procedure-names for a conditional GO TO statement is 255.
Format 2 (Conditional GO TO)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇGOΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇprocedureΓöÇnameΓöÇ1Γö┤ΓöÇDEPENDINGΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifierΓöÇ
ΓööTOΓöÿ ΓööONΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Identifier ΓòÉΓòÉΓòÉ
Identifier must be a numeric elementary data item which is an integer.
If 1, control is transferred to the first statement in the procedure named by
the first occurrence of procedure-name-1;
If 2, control is transferred to the first statement in the procedure named by
the second occurrence of procedure-name-1, and so forth.
If the value of identifier is anything other than a value within the range of
1 through n, (where n is the number of procedure-names specified in this GO
TO statement), no control transfer occurs. Instead, control passes to the
next statement in the normal sequence in running the program.
ΓòÉΓòÉΓòÉ <hidden> Format 3 (Altered GO TO) ΓòÉΓòÉΓòÉ
Description
The altered GO TO statement transfers control to the first statement of the
paragraph named in the ALTER statement. An ALTER statement referring to the
paragraph containing this GO TO statement must have been performed before
this GO TO is performed.
When an ALTER statement refers to a paragraph, the paragraph may consist only
of the paragraph-name followed by an unconditional or altered GO TO
statement.
The altered GO TO statement is an obsolete element and is to be deleted from
the next revision of the ANSI Standard.
Format 3 (Altered GO TO)
ΓöÇΓöÇGOΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTOΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.58. IF Statement ΓòÉΓòÉΓòÉ
Description
The IF statement evaluates a condition and provides for alternative actions
in the object program, depending on the evaluation.
ΓöÇΓöÇIF conditionΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTHENΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇstatement-1ΓöÇΓö┤ΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
Γöé ΓööΓöÇΓöÇNEXT SENTENCEΓöÇΓöÇΓöÿ Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé Γöé
Γöé Γöé Γöé Γöé Γöé
Γöé ΓööΓöÇELSEΓöÇΓö¼ΓöÇstatement-2ΓöÇΓö┤ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé ΓööΓöÇNEXT SENTENCEΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇstatement-1ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇELSEΓöÇΓöÇΓöÇstatement-2ΓöÇΓö┤ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇEND-IFΓöÇΓöÿ Γöé
Γöé Γöé
ΓööΓöÇEND-IFΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.59. INITIALIZE Statement ΓòÉΓòÉΓòÉ
Description
The INITIALIZE statement sets selected categories of data fields to
predetermined values; it is functionally equivalent to one or more MOVE
statements.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇINITIALIZEΓöÇΓöÇΓöÇidentifier-1ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇΓöÇREPLACINGΓöÇΓöÇΓö¼ΓöÇALPHABETICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓö¼BYΓö¼ΓöÇidentifier-2Γö╝Γöÿ
Γö£ΓöÇALPHANUMERICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñΓööDATAΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÿ
Γö£ΓöÇNUMERICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇALPHANUMERIC-EDITEDΓöñ
ΓööΓöÇNUMERIC-EDITEDΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> identifier-1 ΓòÉΓòÉΓòÉ
Identifier-1 is the receiving area.
You can specify a subscripted item or a reference-modified item for
identifier-1. You can initialize a complete table only by specifying
identifier-1 as a group that contains the complete table. (Click here for
information about reference modification.)
The description for the data item referenced by identifier-1 or any items
subordinate to identifier-1 may not contain the DEPENDING ON phrase of the
OCCURS clause.
The data description entry for identifier-1 must not contain a RENAMES clause.
An index data item may not be an operand of INITIALIZE.
Whether identifier-1 references an elementary or group item, all operations are
performed as if a series of MOVE statements had been written, each of which had
an elementary item as a receiving field.
All such elementary receiving fields, including all occurrences of table items
within the group, are affected, with the following exceptions:
Index and pointer data items.
Elementary FILLER data items.
Items that are subordinate to identifier-1 and contain a REDEFINES clause, or
any items subordinate to such an item. (However, identifier-1 may contain a
REDEFINES clause or be subordinate to a redefining item.)
Boolean data items.
The areas referenced by identifier-1 are initialized in the order (left to
right) of the appearance of identifier-1 in the statement. Within a group
receiving field, affected elementary items are initialized in the order of
their definition within the group.
If identifier-1 occupies the same storage area as identifier-2, the result of
the execution of this statement is undefined, even if these operands are
defined by the same data description entry.
If identifier-1 is a group item, then all of the items within that group item
are considered as being referenced in the program.
ΓòÉΓòÉΓòÉ <hidden> REPLACING phrase ΓòÉΓòÉΓòÉ
When you use the REPLACING phrase:
Make the category of identifier-2 or literal-1 compatible with the category
indicated in the corresponding REPLACING phrase, according to the rules for
MOVE.
Do not repeat the same category in a REPLACING phrase.
When you do not use the REPLACING phrase:
SPACE is the implied sending field for alphabetic, alphanumeric, and
alphanumeric-edited items.
ZERO is the implied sending field for numeric and numeric-edited items.
If you specify the REPLACING phrase:
If identifier-1 references a group item, any elementary item within the data
item referenced by identifier-1 is initialized only if it belongs to the
category specified in the REPLACING phrase.
If identifier-1 references an elementary item, that item is initialized only
if it belongs to the category specified in the REPLACING phrase.
This initialization takes place as if the data item referenced by identifier-2
or literal-1 acts as the sending operand in an implicit MOVE statement to the
identified item.
ΓòÉΓòÉΓòÉ 1.60. INSPECT Statement ΓòÉΓòÉΓòÉ
Description
The INSPECT statement specifies that characters in a data item are to be
counted (tallied) or replaced, or both. The INSPECT statement will:
Count the occurrence of a specific character (alphabetic, numeric, or
special character) in a data item.
Fill all or portions of a data item with spaces or zeros.
Translate characters from one collating sequence to another.
This statement does not support reference modification.
The INSPECT statement has four formats:
Format 1 (INSPECT/TALLYING)
Format 2 (INSPECT/REPLACING)
Format 3 (INSPECT/TALLYING/REPLACING)
Format 4 (INSPECT/CONVERTING)
ΓòÉΓòÉΓòÉ <hidden> Format 1 ΓòÉΓòÉΓòÉ
Format 1 (INSPECT/TALLYING)
ΓöÇINSPECT identifierΓöÇ1 TALLYING ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
ΓöÇidentifierΓöÇ2 FORΓöÇΓö¼ΓöÇCHARACTERSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ
Γöé ΓööΓöÇphraseΓöÇ1ΓöÇΓöÿ Γöé
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñΓöé
Γöé ΓöéΓöé
Γö£ΓöÇALLΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇidentifierΓöÇ3ΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝Γöÿ
ΓööΓöÇLEADINGΓöÇΓöÿΓööΓöÇliteralΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÿΓööphraseΓöÇ1Γöÿ
where phraseΓöÇ1 is:
ΓöÇΓö¼ΓöÇBEFOREΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇidentifierΓöÇ4ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇAFTERΓöÇΓöÇΓöÿ ΓööΓöÇINITIALΓöÇΓöÿ ΓööΓöÇliteralΓöÇ2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 ΓòÉΓòÉΓòÉ
Format 2 (INSPECT/REPLACING)
ΓöÇINSPECT identifierΓöÇ1 REPLACINGΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
ΓöÇΓö¼ΓöÇCHARACTERS BYΓöÇΓö¼ΓöÇidentifierΓöÇ5ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ
Γöé ΓööΓöÇliteralΓöÇ3ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇphraseΓöÇ1ΓöÇΓöÿ Γöé
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñΓöé
Γöé ΓöéΓöé
Γö£ΓöÇALLΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇidentifierΓöÇ3ΓöÇΓö¼BYΓö¼ΓöÇidentifierΓöÇ5ΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝Γöÿ
Γö£ΓöÇLEADINGΓöÇΓöñΓööΓöÇliteralΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇliteralΓöÇ3ΓöÇΓöÇΓöÇΓöÇΓöÿΓööphraseΓöÇ1Γöÿ
ΓööΓöÇFIRSTΓöÇΓöÇΓöÇΓöÿ
where phraseΓöÇ1 is:
ΓöÇΓö¼ΓöÇBEFOREΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇidentifierΓöÇ4ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇAFTERΓöÇΓöÇΓöÿ ΓööΓöÇINITIALΓöÇΓöÿ ΓööΓöÇliteralΓöÇ2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 ΓòÉΓòÉΓòÉ
Format 3 (INSPECT/TALLYING/REPLACING)
ΓöÇINSPECT identifierΓöÇ1 TALLYING ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
ΓöÇidentifierΓöÇ2 FORΓöÇΓö¼ΓöÇCHARACTERSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇ
Γöé ΓööΓöÇphraseΓöÇ1ΓöÇΓöÿ Γöé
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñΓöé
Γöé ΓöéΓöé
Γö£ΓöÇALLΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇidentifierΓöÇ3ΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝Γöÿ
ΓööΓöÇLEADINGΓöÇΓöÿΓööΓöÇliteralΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÿΓööphraseΓöÇ1Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓöÇREPLACINGΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
ΓöÇΓö¼ΓöÇCHARACTERS BYΓöÇΓö¼ΓöÇidentifierΓöÇ5ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ
Γöé ΓööΓöÇliteralΓöÇ3ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇphraseΓöÇ1ΓöÇΓöÿ Γöé
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñΓöé
Γöé ΓöéΓöé
Γö£ΓöÇALLΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇidentifierΓöÇ3ΓöÇΓö¼BYΓö¼ΓöÇidentifierΓöÇ5ΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝Γöÿ
Γö£ΓöÇLEADINGΓöÇΓöñΓööΓöÇliteralΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇliteralΓöÇ3ΓöÇΓöÇΓöÇΓöÇΓöÿΓööphraseΓöÇ1Γöÿ
ΓööΓöÇFIRSTΓöÇΓöÇΓöÇΓöÿ
where phraseΓöÇ1 is:
ΓöÇΓö¼ΓöÇBEFOREΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇidentifierΓöÇ4ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇAFTERΓöÇΓöÇΓöÿ ΓööΓöÇINITIALΓöÇΓöÿ ΓööΓöÇliteralΓöÇ2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 4 ΓòÉΓòÉΓòÉ
Format 4 (INSPECT/CONVERTING)
ΓöÇINSPECT identifierΓöÇ1 CONVERTINGΓöÇΓö¼identifierΓöÇ6ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇliteralΓöÇ4ΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓöÇTOΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇidentifierΓöÇ7ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇliteralΓöÇ5ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇphraseΓöÇ1ΓöÇΓöÿ
where phraseΓöÇ1 is:
ΓöÇΓö¼ΓöÇBEFOREΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇidentifier-4ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇAFTERΓöÇΓöÇΓöÿ ΓööΓöÇINITIALΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> BEFORE and AFTER Phrases (All Formats) ΓòÉΓòÉΓòÉ
You cannot specify more than one BEFORE phrase and one AFTER phrase for any one
ALL, LEADING, CHARACTERS, FIRST, or CONVERTING phrase.
If you specify more than one BEFORE or AFTER phrases, the rules for counting
and replacing are modified.
When you specify the BEFORE phrase, counting and/or replacing of the inspected
item begins at the leftmost character and continues until the first occurrence
of the delimiter is reached. If no delimiter is present in the inspected item,
counting and/or replacing continues toward the rightmost character.
When you specify the AFTER phrase, counting and/or replacing of the inspected
item begins with the first character to the immediate right of the delimiter
and continues toward the rightmost character in the inspected item. If no
delimiter is present in the inspected item, no counting or replacement takes
place.
ΓòÉΓòÉΓòÉ <hidden> CONVERTING Phrase (Format 4) ΓòÉΓòÉΓòÉ
A string of replacement values may be expressed by the CONVERTING phrase. The
size of the receiving location (identifier-7 or literal-5) must be the same
size as the sending location (identifier-6 or literal-4). When a figurative
constant is used as literal-5, the size of the figurative constant is equal to
the size of literal-4 or identifier-6. The same character must not appear more
than once, either in literal-4 or identifier-6.
A Format 4 INSPECT statement is interpreted and executed as if a Format 2
INSPECT statement had been written with a series of ALL phrases (one for each
character of literal-4), specifying the same identifier-1. The effect is as if
each single character of literal-4 were referenced as literal-1, and the
corresponding single character of literal-5 referenced as literal-3.
Correspondence between the characters of literal-4 and the characters of
literal-5 is by ordinal position within the data item.
If identifier-4, identifier-6, or identifier-7 occupies the same storage area
as identifier-1, the result of the execution of this statement is undefined,
even if they are defined by the same data description entry.
ΓòÉΓòÉΓòÉ 1.61. MERGE Statement ΓòÉΓòÉΓòÉ
Description
The MERGE statement combines two or more identically sequenced files (files
that have already been sorted according to an identical set of
ascending/descending keys) on one or more keys and makes records available,
in merged order, to an output procedure or an output file. MERGE may appear
anywhere in the Procedure Division except in a Declarative Section.
It is not necessary to sequence input files prior to a merge operation.
ΓöÇMERGE fileΓöÇnameΓöÇ1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇASCENDINGΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇdataΓöÇnameΓöÇ1ΓöÇΓö┤ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇONΓöÇΓöÿ ΓööΓöÇDESCENDINGΓöÇΓöÿ ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇSEQUENCEΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇalphabetΓöÇnameΓöÇ1ΓöÇΓöÿ
ΓööCOLLATINGΓöÿ ΓööΓöÇISΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇUSING fileΓöÇnameΓöÇ2 fileΓöÇnameΓöÇ3ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇOUTPUT PROCEDUREΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇprocedure-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓööΓöÇISΓöÇΓöÿ
Γöé Γöé
ΓööΓöÇGIVING fileΓöÇnameΓöÇ4ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇTHROUGHΓöÇΓö¼ΓöÇprocedureΓöÇnameΓöÇ2ΓöÇΓöÇΓöÿ Γöé
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> data-name-1 ΓòÉΓòÉΓòÉ
Data-name-1 specifies a KEY data item on which the merge will be based. Each
data-name must identify a data item in a record associated with file-name-1. In
MERGE, the data names following the word KEY are listed from left to right in
order of decreasing significance without regard to how they are divided into
KEY phrases. The left-most data-name is the major key, the next data-name is
the next most significant key, and so forth. The following rules apply:
A specific KEY data item must be physically located in the same position and
have the same data format in each input file. However, it does not need to
have the same data-name.
If file-name-1 has more than one file description, the KEY data items need be
described in only one or the record descriptions.
KEY data items must be fixed-length items.
KEY data items must not contain an OCCURS clause or be subordinate to an item
that contains OCCURS.
KEY data items can be qualified or reference modified; they cannot be
subscripted or indexed. (Click here for information about reference
modification.)
The total length (in bytes) of the KEY data items must not exceed 256.
ΓòÉΓòÉΓòÉ 1.62. MOVE Statement ΓòÉΓòÉΓòÉ
Description
The MOVE statement transfers data from one area of storage to one or more
other areas of storage. The MOVE statement has two formats:
Format 1 (MOVE)
Format 2 (MOVE with CORRESPONDING)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (MOVE) ΓòÉΓòÉΓòÉ
Description
The MOVE statement transfers data from one area of storage to one or more
other areas. Do not specify an index data item in a MOVE statement.
Format 1 (MOVE)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇMOVEΓöÇΓöÇΓö¼ΓöÇidentifier-1ΓöÇΓö¼ΓöÇTO identifier-2ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (MOVE with CORRESPONDING) ΓòÉΓòÉΓòÉ
Description
When you specify Format 2, both identifiers must be group items. Do not
specify an index data item in a MOVE statement.
Format 2 (MOVE with CORRESPONDING)
ΓöÇΓöÇMOVEΓöÇΓö¼ΓöÇCORRESPONDINGΓöÇΓö¼ΓöÇidentifier-1 TO identifier-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇCORRΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.63. MULTIPLY Statement ΓòÉΓòÉΓòÉ
Description
The MULTIPLY statement multiplies numeric items and sets the values of data
items equal to the results. The MULTIPLY statement has two formats:
Format 1 (MULTIPLY)
Format 2 (MULTIPLY with GIVING)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (MULTIPLY) ΓòÉΓòÉΓòÉ
Description
In Format 1, the value of identifier-1 or literal-1 is multiplied by the
value of identifier-2; the product is then placed in identifier-2. For each
successive occurrence of identifier-2, the multiplication takes place in the
left-to-right order in which identifier-2 is specified. The composite of
operands in an arithmetic statement can have a maximum of 30 digits.
Format 1 (MULTIPLY)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇMULTIPLYΓöÇΓö¼ΓöÇidentifier-1ΓöÇΓö¼ΓöÇBYΓöÇΓöÇidentifier-2ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ
ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööROUNDEDΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇNOTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-MULTIPLYΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (MULTIPLY with GIVING) ΓòÉΓòÉΓòÉ
Description
In Format 2, the value of identifier-1 or literal-1 is multiplied by the
value of identifier-2 or literal-2. The product is then stored in the data
items referenced by identifier-3. The composite of operands in an arithmetic
statement can have a maximum of 30 digits.
Format 2 (MULTIPLY with GIVING)
ΓöÇΓöÇMULTIPLYΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓö¼ΓöÇBYΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇGIVING identifier-3ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇROUNDEDΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-MULTIPLYΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.64. OPEN Statement ΓòÉΓòÉΓòÉ
Description
The OPEN statement initiates the processing of files and checks and/or writes
labels. The OPEN statement varies depending on the type of file:
Sequential
Indexed
Relative
Transaction
The OPEN statement has three formats:
Format 1 (Sequential Files)
Format 2 (Indexed and Relative Files)
Format 3 (Transaction Files)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Sequential Files) ΓòÉΓòÉΓòÉ
Description
In Format 1 of the OPEN statement, you must specify at least one of the
phrases: INPUT, OUTPUT, I-O, or EXTEND. The INPUT, OUTPUT, I-O, and EXTEND
phrases may appear in any order.
Format 1 (Sequential Files)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
ΓöÇΓöÇΓöÇOPENΓöÇΓö¼ΓöÇINPUTΓöÇΓöÇΓöÇfile-name-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇ
Γöé Γö£ΓöÇΓöÇREVERSEDΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ Γöé
Γöé ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼NO REWINDΓöÇΓöÇΓöÿ Γöé
Γöé ΓööWITHΓöÿ Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
Γö£ΓöÇOUTPUTΓöÇΓöÇΓöÇfile-name-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöñ
Γöé ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼NO REWINDΓöÇΓöÇΓöÿ Γöé
Γöé ΓööWITHΓöÿ Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
Γö£ΓöÇI-OΓöÇΓöÇΓöÇfile-name-3ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇEXTENDΓöÇΓöÇΓöÇfile-name-4ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (Indexed and Relative Files) ΓòÉΓòÉΓòÉ
Description
In Format 2 of the OPEN statement, you must specify at least one of the
phrases INPUT, OUTPUT, or I-O with the OPEN keyword. The INPUT, OUTPUT, and
I-O phrases may appear in any order.
Format 2 (Indexed and Relative Files)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
ΓöÇΓöÇΓöÇOPENΓöÇΓöÇΓö¼ΓöÇΓöÇINPUTΓöÇΓöÇΓöÇfile-name-1ΓöÇΓö┤ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
Γö£ΓöÇΓöÇOUTPUTΓöÇΓöÇΓöÇfile-name-2ΓöÇΓö┤ΓöÇΓöÇΓöñ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇΓöÇI-OΓöÇΓöÇΓöÇfile-name-3ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (TRANSACTION Files) ΓòÉΓòÉΓòÉ
Description
In Format 3 of the OPEN statement, you must specify I-O with the OPEN
keyword. The Format 3 OPEN statement can cause a program device to be
implicitly acquired for a TRANSACTION file.
Format 3 (TRANSACTION Files)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇOPEN I-OΓöÇΓöÇfile-nameΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ 1.65. PERFORM Statement ΓòÉΓòÉΓòÉ
Description
The PERFORM statement explicitly transfers control to one or more procedures
and, after execution of the specified procedures or imperative statements,
implicitly returns control to the next executable statement. The PERFORM
statement can be:
An out-of-line PERFORM statement. (Procedure-name-1 is specified.)
An in-line PERFORM statement. (Procedure-name-1 is omitted.) An in-line
PERFORM must be delimited by the END-PERFORM phrase.
The in-line and out-of-line formats cannot be combined. For example, if you
specify procedure-name-1, you must not specify imperative-statement and the
END-PERFORM phrase.
The PERFORM statement has four formats:
Format 1 (Basic PERFORM)
Format 2 (PERFORM with TIMES)
Format 3 (PERFORM with UNTIL)
Format 4 (PERFORM with VARYING)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Basic PERFORM) ΓòÉΓòÉΓòÉ
Description
The procedures referenced in the basic PERFORM statement are run once and
control then passes to the next executable statement following the PERFORM
statement.
Format 1 (Basic PERFORM)
ΓöÇΓöÇPERFORMΓöÇΓö¼ΓöÇprocedure-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
Γöé
Γöé
Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
1ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇTHROUGHΓöÇΓö¼ΓöÇprocedure-name-2ΓöÇΓöÿ Γöé
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé
2ΓöÇΓöÇΓöÇimperative-statement END-PERFORMΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (PERFORM with TIMES) ΓòÉΓòÉΓòÉ
Description
The procedures referred to in Format 2 (PERFORM with TIMES) are executed the
number of times specified by the value in identifier-1 or integer-1. Control
then passes to the next executable statement following the PERFORM statement.
Format 2 (PERFORM with TIMES)
ΓöÇΓöÇΓöÇPERFORMΓöÇΓö¼ΓöÇprocedure-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
Γöé
Γöé
Γöé
ΓööΓöÇphrase-1 imperative-statementΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
1ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇphrase-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇTHROUGHΓöÇΓö¼ΓöÇprocedure-name-2ΓöÇΓöÿ Γöé
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé
2ΓöÇΓöÇΓöÇΓöÇEND-PERFORMΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
where phrase-1 is:
ΓöÇΓöÇΓöÇΓöÇΓö¼identifier-1ΓöÇΓö¼ΓöÇΓöÇTIMESΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇinteger-1ΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (PERFORM with UNTIL) ΓòÉΓòÉΓòÉ
Description
In Format 3 (PERFORM with UNTIL), the procedures referred to are performed
until the condition that the UNTIL phrase specifies is true. Control then
passes to next executable statement following PERFORM.
Format 3 (PERFORM with UNTIL)
ΓöÇΓöÇΓöÇPERFORMΓöÇΓö¼ΓöÇprocedure-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
Γöé
Γöé
Γöé
ΓööΓöÇphrase-1 imperative-statementΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
1ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇphrase-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇTHROUGHΓöÇΓö¼ΓöÇprocedure-name-2ΓöÇΓöÿ Γöé
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé
2ΓöÇΓöÇΓöÇΓöÇEND-PERFORMΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
where phrase-1 is:
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇUNTIL condition-1ΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇTESTΓöÇΓö¼ΓöÇBEFOREΓöÇΓöñ
ΓööΓöÇWITHΓöÇΓöÿ ΓööΓöÇAFTERΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 4 (PERFORM with VARYING) ΓòÉΓòÉΓòÉ
Description
Format 4 (PERFORM with VARYING) increases or decreases the value of one or
more identifiers or index-names according to certain rules for the varying
phrase.
The Format 4 PERFORM statement can serially search an entire 7-dimensional
table.
Format 4 (PERFORM with VARYING)
ΓöÇΓöÇΓöÇPERFORMΓöÇΓö¼ΓöÇprocedure-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
Γöé
Γöé
Γöé
ΓööΓöÇphrase-1 imperative-statementΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
1 ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇphrase-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇTHROUGHΓöÇΓö¼ΓöÇprocedure-name-2ΓöÇΓöÿ Γöé
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé
2 ΓöÇΓöÇΓöÇΓöÇEND-PERFORMΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
where phrase-1 is:
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇVARYINGΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇTESTΓöÇΓö¼ΓöÇBEFOREΓöÇΓöñ ΓööΓöÇindex-name-1ΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ ΓööΓöÇAFTERΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇFROMΓö¼identifier-3Γö¼BYΓö¼identifier-4Γö¼UNTIL condition-1ΓöÇΓöÇ
Γö£index-name-2Γöñ Γööliteral-2ΓöÇΓöÇΓöÇΓöÿ
Γööliteral-1ΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4
Γöé
ΓööΓöÇAFTERΓöÇΓö¼ΓöÇidentifier-5ΓöÇΓö¼ΓöÇFROMΓöÇΓö¼ΓöÇidentifier-6ΓöÇΓö¼ΓöÇBYΓöÇΓöÇΓöÇΓöÇ 5
ΓööΓöÇindex-name-3ΓöÇΓöÿ Γö£ΓöÇindex-name-4ΓöÇΓöñ
ΓööΓöÇliteral-3ΓöÇΓöÇΓöÇΓöÇΓöÿ
3 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
4 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
5 ΓöÇΓöÇΓöÇΓö¼ΓöÇidentifier-7ΓöÇΓö¼ΓöÇUNTIL condition-2ΓöÇΓö┤ΓöÇΓöÿ
ΓööΓöÇliteral-4ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.66. READ Statement ΓòÉΓòÉΓòÉ
Description
The READ statement makes a record available to the program. For sequential
access, the READ statement makes the next logical record from a file
available to the object program. For random access, the READ statement makes
a specified record from a direct-access file available to the object program.
When the READ statement is executed, the associated file must be open in
INPUT or I-O mode. The READ statement has five formats:
Format 1 (Sequential Retrieval using Sequential Access)
Format 2 (Sequential Retrieval using Dynamic Access)
Format 3 (Random Retrieval)
Format 4 (TRANSACTION Nonsubfile)
Format 5 (TRANSACTION Subfile)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Sequential Retrieval using Sequential Access) ΓòÉΓòÉΓòÉ
Description
Use Format 1 for all files in sequential access mode. Format 1 retrieves the
next logical record from the file. The file organization determines the next
record accessed.
Format 1 (Sequential Retrieval using Sequential Access)
ΓöÇΓöÇΓöÇREAD file-nameΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööNEXTΓöÿ ΓööRECORDΓöÿ ΓööINTO identifier-1Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇNO LOCKΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEND imperative-statement-1ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEND imperative-statement-2ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-READΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (Sequential Retrieval using Dynamic Access) ΓòÉΓòÉΓòÉ
Description
Use Format 2 for indexed and relative files in dynamic access mode. In
dynamic access mode, Format 2 with NEXT, FIRST, LAST, or PRIOR must be
specified for sequential retrieval.
Format 2 (Sequential Retrieval using Dynamic Access)
ΓöÇΓöÇΓöÇREAD file-nameΓöÇΓö¼ΓöÇNEXTΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
Γö£ΓöÇFIRSTΓöÇΓöñ ΓööRECORDΓöÿ ΓööINTO identifier-1Γöÿ
Γö£ΓöÇLASTΓöÇΓöÇΓöñ
ΓööΓöÇPRIORΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇNO LOCKΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEND imperative-statement-1ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEND imperative-statement-2ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-READΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (Random Retrieval) ΓòÉΓòÉΓòÉ
Description
You must specify Format 3 (Random Retrieval) for indexed and relative files
in random access mode.
Format 3 (Random Retrieval)
ΓöÇΓöÇΓöÇREAD file-nameΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇRECORDΓöÇΓöÿ ΓööΓöÇINTO identifier-1ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇNO LOCKΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇKEYΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇdata-name-1ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINVALIDΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇimperative-statement-1ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOT INVALIDΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇimperative-statement-2ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-READΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 4 (TRANSACTION Nonsubfile) ΓòÉΓòÉΓòÉ
Description
You must use the Format 4 READ statement for a subfile control record format
to place those subfile records that were updated on a display into the
subfile. You cannot use the Format 4 READ statement to read a subfile
record.
Format 4 (TRANSACTION Nonsubfile)
ΓöÇΓöÇΓöÇREAD file-nameΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇRECORDΓöÇΓöÿ ΓööΓöÇINTO identifier-1ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTERMINALΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇINDICATORΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-4ΓöÇΓöÇΓöÇΓöÇΓöÿ
Γö£ΓöÇINDICATORSΓöÇΓöñ Γö£ΓöÇISΓöÇΓöÇΓöñ
ΓööΓöÇINDICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇAREΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNO DATA imperative-statement-1ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEND imperative-statement-2ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEND imperative-statement-3ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-READΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 5 (TRANSACTION Subfile) ΓòÉΓòÉΓòÉ
Description
The Format 5 READ statement is used only to read a format that is a subfile
record. You cannot use Format 5 for communications devices. If the subfile
format of the READ statement is used for a communication device, the READ
operation fails.
The AT END phrase can only be specified when the NEXT MODIFIED phrase is
specified. The INVALID KEY phrase must not be used when the NEXT MODIFIED
phrase is specified.
Format 5 (TRANSACTION Subfile)
ΓöÇΓöÇΓöÇREAD SUBFILE file-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇMODIFIEDΓöÇΓöÿ ΓööΓöÇRECORDΓöÇΓöÿ
ΓööΓöÇNEXTΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINTO identifier-1ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTERMINALΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇINDICATORΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-4ΓöÇΓöÇΓöÇΓöÇΓöÿ
Γö£ΓöÇINDICATORSΓöÇΓöñ Γö£ΓöÇISΓöÇΓöÇΓöñ
ΓööΓöÇINDICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇAREΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINVALIDΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇimperative-statement-1ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOT INVALIDΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇimperative-statement-2ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEND imperative-statement-3ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEND imperative-statement-4ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-READΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> NEXT MODIFIED Phrase ΓòÉΓòÉΓòÉ
When you specify the NEXT MODIFIED phrase, the record made available is the
first record in the subfile that has been modified.
The search for the next modified record begins:
At the beginning of the subfile if:
- An I-O operation has been performed for the subfile control record.
- The I-O operation cleared, initialized, or displayed the subfile.
For all other cases, with the record following the record that was read by a
previous read operation.
The value of the RELATIVE KEY data item is updated to reflect the relative
record number of the record made available to the program.
If you specify NEXT MODIFIED and there is no user-modified record in the
subfile with a relative record number greater than the relative record number
contained in the RELATIVE KEY data item, the AT END condition exists, the file
status is set to 12, and the value of the RELATIVE KEY data item is set to the
key of the last record in the subfile. Imperative-statement-2, or any
applicable USE AFTER ERROR/EXCEPTION procedure, if any, is then executed.
If you do not specify the NEXT MODIFIED phrase, the data record made available
is the record in the subfile with a relative record number that corresponds to
the value of the RELATIVE KEY data item; and if the RELATIVE KEY data item
contains a value other than the relative record number of a record in the
subfile, the INVALID KEY condition exists and the execution of the READ
statement is unsuccessful.
Random Access of Subfile Records: The NEXT MODIFIED phrase must not be used to
randomly access records in a subfile. The INVALID KEY phrase can only be used
for random access of subfile records.
Sequential Access of Subfile Records: The NEXT MODIFIED phrase must be
specified to access subfile records sequentially. The AT END phrase can only
be specified with the NEXT MODIFIED phrase.
ΓòÉΓòÉΓòÉ 1.67. RELEASE Statement ΓòÉΓòÉΓòÉ
Description
The RELEASE statement transfers records from an input/output area to the
initial phase of a sorting operation. You can only use the RELEASE statement
within the range of an input procedure associated with a SORT statement.
Within an INPUT PROCEDURE, you must specify at least one RELEASE statement.
When the RELEASE statement is executed, the current contents of record-name-1
are placed in the sort file; that is, made available for the beginning of the
sorting operation.
ΓöÇΓöÇΓöÇRELEASE record-name-1ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFROM identifier-1ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.68. RETURN Statement ΓòÉΓòÉΓòÉ
Description
The RETURN statement transfers records from the final phase of a sort or
merge operation to an OUTPUT PROCEDURE.
Use the RETURN statement only within the range of an output procedure
associated with a SORT or MERGE statement. Within the OUTPUT PROCEDURE, you
must specify at least one RETURN statement.
Execution of the RETURN statement makes the next record from file-name-1
available for processing by the OUTPUT PROCEDURE.
ΓöÇΓöÇΓöÇRETURN file-name-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
ΓööΓöÇRECORDΓöÇΓöÿ ΓööΓöÇINTO identifier-1ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇEND imperative-statement-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇATΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
ΓööΓöÇNOTΓö¼ΓöÇΓöÇΓö¼ΓöÇEND imperative-statement-2ΓöÇΓöÿ ΓööΓöÇEND-RETURNΓöÇΓöÿ
ΓööATΓöÿ
ΓòÉΓòÉΓòÉ <hidden> INTO identifier-1 ΓòÉΓòÉΓòÉ
The RETURN INTO statement is equivalent to the statements:
RETURN file-name-1
MOVE record-name TO identifier-1
The moving of the current record from the record area to the area specified by
identifier-1 takes place according to the rules for the MOVE statement without
the CORRESPONDING phrase. Any subscripting, indexing, or reference
modification associated with identifier-1 is evaluated after the record has
been returned and immediately before it is moved to identifier-1. (Click here
for information about reference modification.)
You can specify the INTO phrase in a RETURN statement if one or both of the
following are true:
1. Only one record description is subordinate to the sort-merge file
description entry
2. All record-names associated with file-name-1 and the data item referenced
by identifier-1 describe a group item, a numeric-edited item, or an
elementary alphanumeric item.
The record areas associated with file-name-1 and identifier-1 must not be the
same storage area.
ΓòÉΓòÉΓòÉ 1.69. REWRITE Statement ΓòÉΓòÉΓòÉ
Description
The REWRITE statement logically replaces an existing record in a
direct-access file. When the REWRITE statement is executed, the associated
direct-access file must be open in I-O mode. The REWRITE statement has two
formats:
Format 1 (REWRITE)
Format 2 (TRANSACTION Subfile)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (REWRITE) ΓòÉΓòÉΓòÉ
Description
When the Format 1 REWRITE statement is processed, the system logically
replaces a record retrieved by a READ statement. The last input/output
statement for this file must have been a successfully processed READ
statement without the NO LOCK phrase.
The operation of the REWRITE statement varies depending on the file
organization and access mode:
For sequential files and sequential access mode, the record retrieved by
the last successfully processed READ statement is replaced.
For indexed files and sequential access mode, the record specified by the
value contained in the prime RECORD KEY is replaced. When the REWRITE
statement is executed, this value must equal the value of the prime record
key data item in the last record read from this file.
For indexed files and random or dynamic access mode, the record specified
by the value contained in the prime RECORD KEY is replaced.
For relative files and sequential access mode, the record retrieved by the
last successfully processed READ statement is replaced.
For relative files and random or dynamic access mode, the record specified
by the value in the RELATIVE KEY data item is replaced.
ΓöÇΓöÇREWRITE record-name-1ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFROM identifier-1ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINVALIDΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇimperative-statement-1ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOT INVALIDΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇimperative-statement-2ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-REWRITEΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (TRANSACTION Subfile) ΓòÉΓòÉΓòÉ
Description
Use the Format 2 REWRITE statement to replace a subfile record that already
exists in the subfile.
A successful read operation on the record must be done prior to the rewrite
operation. The record replaced in the subfile is that record accessed by the
previous read operation.
You cannot use Format 2 for communications devices.
Format 2 (TRANSACTION Subfile)
ΓöÇΓöÇΓöÇREWRITE SUBFILE record-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFROM identifier-1ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTERMINALΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇINDICATORΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-4ΓöÇΓöÇΓöÇΓöÇΓöÿ
Γö£ΓöÇINDICATORSΓöÇΓöñ Γö£ΓöÇISΓöÇΓöÇΓöñ
ΓööΓöÇINDICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇAREΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINVALIDΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇimperative-statement-1ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOT INVALIDΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇimperative-statement-2ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-REWRITEΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.70. ROLLBACK Statement ΓòÉΓòÉΓòÉ
Description
The ROLLBACK statement provides a way to cancel one or more changes to
database records when the changes should not remain permanent.
ΓöÇΓöÇΓöÇROLLBACKΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
When the ROLLBACK statement is executed, all changes made to files under
commitment control since the previous commitment boundary are removed from
the database. (When a file is cleared while being opened for OUTPUT,
execution of a ROLLBACK statement does not restore cleared records to the
file.) A commitment boundary is the previous occurrence of a ROLLBACK or
COMMIT statement. If no COMMIT or ROLLBACK has been issued, the commitment
boundary is the first OPEN of a file under commitment control. Removal of
changes takes place for all files under commitment control in the job, and
not just for files under commitment control in the COBOL program that issues
the ROLLBACK.
Once the ROLLBACK is successfully executed, all record locks held by the job
for files under commitment control are released and the records become
available to other jobs.
The ROLLBACK has no effect on files not under commitment control. If a
ROLLBACK is executed and there are no files opened under commitment control,
the ROLLBACK is ignored.
A file under commitment control can be opened or closed without affecting the
status of changes made since the last commitment boundary. A COMMIT must
still be issued to make changes permanent. A ROLLBACK, when executed, leaves
files in the same open or closed state as before execution.
The ROLLBACK statement does not:
Modify the I-O-FEEDBACK area for any file
Set a file status value for any file.
For the ROLLBACK statement, the following considerations apply:
The ROLLBACK statement sets the file position indicator to the pointer's
position at the previous commitment boundary. This is important if you
are doing for sequential processing.
If no COMMIT statement has been issued since the file was opened, the
ROLLBACK statement sets the file position indicator to the pointer's
position at the OPEN.
The file position indicator is undefined after a ROLLBACK if the file is
closed with uncommited changes.
At the end of every job, an implicit ROLLBACK of uncommitted records is
automatically done for all files under commitment control. Any uncommitted
changes to the database are cancelled.
ΓòÉΓòÉΓòÉ 1.71. SEARCH Statement ΓòÉΓòÉΓòÉ
Description
The SEARCH statement searches a table for an element that satisfies the
specified condition, and adjusts the associated index to indicate that
element. The SEARCH statement has two formats:
Format 1 (Serial Search)
Format 2 (Binary Search)
ΓòÉΓòÉΓòÉ <hidden> Format 1 Serial Search ΓòÉΓòÉΓòÉ
Description
The Format 1 (Serial Search) statement runs a serial search beginning at the
current index setting.
Format 1 (Serial Search)
ΓöÇΓöÇSEARCH identifier-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇVARYINGΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇindex-name-1ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇEND imperative-statement-1ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓö¼ΓöÇWHEN condition-1ΓöÇΓö¼ΓöÇimperative-statement-2ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
Γöé ΓööΓöÇNEXT SENTENCEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γöé
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇWHEN condition-1ΓöÇΓöÇΓöÇimperative-statement-2ΓöÇΓö┤Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööΓöÇEND-SEARCHΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 Binary Search ΓòÉΓòÉΓòÉ
Description
The Format 2 Binary Search statement executes a binary search. The search
index does not need to be initialized by SET statements, because its setting
is varied during the search operation so that its value is at no time less
than the value of the first table element, nor ever greater than the value of
the last table element. The index used is always that associated with the
first index-name specified in the OCCURS clause.
Format 2 (Binary Search)
ΓöÇΓöÇΓöÇSEARCH ALL identifier-1ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
ΓööΓöÇATΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
2ΓöÇΓöÇΓöÇEND imperative-statement-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇWHENΓöÇΓö¼ΓöÇdata-name-1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇEQUALΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ3
Γöé ΓööΓöÇISΓöÇΓöÿ Γöé ΓööΓöÇTOΓöÇΓöÿ Γöé
Γöé ΓööΓöÇ = ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇcondition-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ4
3ΓöÇΓöÇΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇarithmetic-expression-1ΓöÇΓöñ
4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ5
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ6
ΓööΓöÇANDΓöÇΓöÇΓö¼ΓöÇdata-name-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇEQUALΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ7
Γöé ΓööΓöÇISΓöÇΓöÿ Γöé ΓööΓöÇTOΓöÇΓöÿ Γöé
Γöé ΓööΓöÇ = ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇcondition-name-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ8
5ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
6ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
7ΓöÇΓöÇΓöÇΓö¼ΓöÇidentifier-4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöñ
Γö£ΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñΓöé
ΓööΓöÇarithmetic-expression-2ΓöÇΓöÿΓöé
8ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇimperative-statement-2ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
Γöé ΓööΓöÇEND-SEARCHΓöÇΓöÿ Γöé
ΓööΓöÇNEXT SENTENCEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.72. SET Statement ΓòÉΓòÉΓòÉ
Description
The SET statement establishes reference points for table handling operations
by doing one of the following:
1. Placing values associated with table elements into indexes associated
with index-names
2. Incrementing or decrementing an occurrence number
3. Setting the status of an external switch to ON or OFF
4. Moving data to condition names to make conditions true
5. Setting addresses of pointer data items.
Index-names are related to a given table through the INDEXED BY phrase of the
OCCURS clause; they are not further defined in the program.
When the sending and receiving fields in a SET statement share part of their
storage (that is, the operands overlap), the result of the execution of such a
SET statement is undefined.
The SET statement has five Formats:
Format 1 (TO Phrase)
Format 2 (UP BY/DOWN BY Phrase)
Format 3 (ON/OFF Phrase)
Format 4 (TO TRUE Phrase)
Format 5 (Pointer Data Item Phrase)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (TO Phrase) ΓòÉΓòÉΓòÉ
Description
When this form of the SET statement is executed, the current value of the
receiving field is replaced by the value of the sending field (with
conversion).
Format 1 (TO Phrase)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇSETΓöÇΓö¼ΓöÇindex-name-1ΓöÇΓö╝ΓöÇTO ΓöÇΓöÇΓöÇΓö¼ΓöÇindex-name-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇidentifier-1ΓöÇΓöÿ Γö£ΓöÇidentifier-2ΓöÇΓöñ
ΓööΓöÇinteger-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (UP BY/DOWN BY Phrase) ΓòÉΓòÉΓòÉ
Description
When this form of the SET statement is executed, the value of the receiving
field is increased (UP BY) or decreased (DOWN BY) by a value corresponding to
the value in the sending field.
Format 2 (UP BY/DOWN BY Phrase)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇSET index-name-3ΓöÇΓö┤Γö¼ΓöÇUP BYΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇDOWN BYΓöÇΓöÿ ΓööΓöÇinteger-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (ON/OFF Phrase) ΓòÉΓòÉΓòÉ
Description
When this form of the SET statement is executed, the status of each external
switch associated with the specified mnemonic-name is switched ON or OFF.
Format 3 (ON/OFF Phrase)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
ΓöÇΓöÇΓöÇSETΓöÇΓöÇΓöÇΓöÇΓöÇmnemonic-name-1ΓöÇΓö┤ΓöÇTOΓöÇΓöÇΓöÇΓö¼ΓöÇONΓöÇΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇOFFΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 4 (TO TRUE Phrase) ΓòÉΓòÉΓòÉ
Description
When this form of the SET statement is executed, the value associated with a
condition name is placed in its conditional variable according to the rules
of the VALUE phrase.
Format 4 (TO TRUE Phrase)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇSET condition-name-1ΓöÇΓö┤ΓöÇTO TRUEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ <hidden> Format 5 (Pointer Data Item Phrase) ΓòÉΓòÉΓòÉ
Description
When this form of the SET statement is executed, the current value of the
receiving field is replaced by the address value contained in the sending
field.
Format 5 (Pointer Data Item Phrase)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé Γöé
Γöé
ΓöÇΓöÇΓöÇSETΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-4ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇADDRESS OF identifier-5ΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇTOΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-6ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇΓöÇADDRESS OF identifier-7ΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇNULLΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇNULLSΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.73. SORT Statement ΓòÉΓòÉΓòÉ
Description
The SORT statement accepts records from one or more files, sorts them
according to the specified keys, and makes the sorted records available
either through an OUTPUT PROCEDURE or in an output file. The SORT statement
may appear anywhere in the Procedure Division except in the declarative
portion.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
Γöé
ΓöÇΓöÇΓöÇSORT file-name-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇASCENDINGΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
ΓööΓöÇONΓöÇΓöÿ ΓööΓöÇDESCENDINGΓöÇΓöÿ ΓööΓöÇKEYΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé
2ΓöÇΓöÇΓöÇΓöÇdata-name-1ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇDUPLICATESΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ ΓööΓöÇIN ORDERΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇSEQUENCEΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇalphabet-name-1ΓöÇΓöÿ
ΓööΓöÇCOLLATINGΓöÇΓöÿ ΓööISΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇUSING file-name-2ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
ΓööΓöÇINPUT PROCEDUREΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇprocedure-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4
ΓööΓöÇISΓöÇΓöÿ
3 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
4 ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööΓöÇΓö¼ΓöÇTHROUGHΓöÇΓö¼ΓöÇprocedure-name-2ΓöÇΓöÿ
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇGIVING file-name-3ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 5
ΓööΓöÇOUTPUT PROCEDUREΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇprocedure-name-3ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 6
ΓööΓöÇISΓöÇΓöÿ
5 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
6 ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööΓöÇΓö¼ΓöÇTHROUGHΓöÇΓö¼ΓöÇprocedure-name-4ΓöÇΓöÿ
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Data-name-1 ΓòÉΓòÉΓòÉ
Data-name-1 specifies a KEY data item on which the sort will be based. Each
such data-name must identify a data item in a record associated with
file-name-1. The data-names following the word KEY are listed from left to
right in the SORT statement in order of decreasing significance without regard
to how they are divided into KEY phrases. The leftmost data-name is the major
key, the next data-name is the next most significant key, and so forth. The
following rules apply:
1. A specific KEY data item must be physically located in the same position
and have the same data format in each input file. However, it does not
need to have the same data-name.
2. If file-name-1 has more than one record description, then the KEY
data-items need to be described in only one of the record descriptions.
3. KEY data items must be fixed-length items.
4. KEY data items must not contain an OCCURS clause or be subordinate to an
item that contains an OCCURS clause.
5. KEY data items can be qualified or reference modified; they cannot be
subscripted or indexed. (Click here for information about reference
modification.)
6. The total length of the KEY data item must not exceed 256 bytes.
ΓòÉΓòÉΓòÉ 1.74. START Statement ΓòÉΓòÉΓòÉ
Description
The START statement positions an indexed or relative file for subsequent
sequential record retrieval. When the START statement is executed, the
associated indexed or relative file must be open in either INPUT or I-O mode.
ΓöÇΓöÇΓöÇSTART file-nameΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1
ΓööΓöÇKEYΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2
ΓööΓöÇISΓöÇΓöÿ
1 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3
2 ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEQUALΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4
Γöé ΓööΓöÇTOΓöÇΓöÿ Γöé
Γö£ΓöÇ = ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇGREATERΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇTHANΓöÇΓöÿ Γöé
Γö£ΓöÇ > ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇNOT LESSΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓööΓöÇTHANΓöÇΓöÿ Γöé
Γö£ΓöÇNOT < ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇGREATERΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇOR EQUALΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöñ
Γöé ΓööΓöÇTHANΓöÇΓöÿ ΓööΓöÇTOΓöÇΓöÿ Γöé
ΓööΓöÇ >= ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
3 ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
4 ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇEXTERNALLY-DESCRIBED-KEYΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇdata-name-1ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇNO LOCKΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇWITHΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-1ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINVALIDΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇimperative-statement-1ΓöÇΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööNOT INVALIDΓö¼ΓöÇΓöÇΓöÇΓö¼imperative-statement-2Γöÿ ΓööEND-STARTΓöÿ
ΓööKEYΓöÿ
ΓòÉΓòÉΓòÉ 1.75. STOP Statement ΓòÉΓòÉΓòÉ
Description
The STOP statement halts the running of the object program either permanently
or temporarily.
ΓöÇΓöÇΓöÇSTOPΓöÇΓö¼ΓöÇΓöÇRUNΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇliteralΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.76. STRING Statement ΓòÉΓòÉΓòÉ
Description
The STRING statement strings together the partial or complete contents of two
or more data items or literals into one single data item. One STRING
statement can replace a series of MOVE statements. When the STRING statement
is executed, data is transferred from the sending field to the receiving
field. Any subscripting and reference modification is performed only once, at
the beginning of the execution of the STRING statement. (Click here for
information about reference modification.)
After the STRING statement has completed, only that part of the receiving
field into which data was transferred is changed. The rest of the receiving
field contains the data that was present before executing the STRING
statement.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇSTRINGΓöÇΓöÇΓö¼ΓöÇidentifier-1ΓöÇΓö╝ΓöÇDELIMITEDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇBYΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
Γöé
2ΓöÇΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöÇINTO identifier-3ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇSIZEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇPOINTER identifier-4ΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇOVERFLOW imperative-statement-1ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇOVERFLOW imperative-statement-2ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-STRINGΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.77. SUBTRACT Statement ΓòÉΓòÉΓòÉ
Description
The SUBTRACT statement subtracts one numeric item, or the sum of two or more
numeric items from one or more numeric items, and stores the result. The
composite of all operands can have a maximum length of 30 digits. The
SUBTRACT statement has three formats:
Format 1 (SUBTRACT)
Format 2 (SUBTRACT with GIVING)
Format 3 (SUBTRACT with CORRESPONDING)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (SUBTRACT) ΓòÉΓòÉΓòÉ
Description
In Format 1 (SUBTRACT), all identifiers or literals preceding the keyword
FROM are added together. This sum is then subtracted from and stored
immediately in identifier-2. This initial sum is also subtracted from each
successive occurrence of identifier-2, in the left-to-right order in which
identifier-2 is specified.
Format 1 (SUBTRACT)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé Γöé
ΓöÇΓöÇSUBTRACTΓöÇΓö¼ΓöÇidentifier-1ΓöÇΓö╝FROMΓöÇidentifier-2Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ
ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööROUNDEDΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-SUBTRACTΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (SUBTRACT with GIVING) ΓòÉΓòÉΓòÉ
Description
In Format 2 (SUBTRACT with GIVING), all identifiers or literals preceding the
keyword FROM are added together and this sum is subtracted from identifier-2
or literal-2. The result of the subtraction is stored as the new value of
each data item referenced by identifier-3.
Format 2 (SUBTRACT with GIVING)
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇSUBTRACTΓöÇΓö¼ΓöÇidentifier-1ΓöÇΓö╝FROMΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇGIVINGΓöÇΓöÇΓöÇidentifier-3ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇROUNDEDΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-SUBTRACTΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 3 (SUBTRACT with CORRESPONDING) ΓòÉΓòÉΓòÉ
Description
In Format 3 (SUBTRACT with CORRESPONDING), elementary data items within
identifier-1 are subtracted from the corresponding elementary data items
within identifier-2, where the results are stored.
Format 3 (SUBTRACT with CORRESPONDING)
ΓöÇΓöÇSUBTRACTΓöÇΓö¼ΓöÇCORRESPONDINGΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇCORRΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇidentifier-1 FROM identifier-2ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇROUNDEDΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇSIZE ERROR imperative-statement-1ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇSIZE ERROR imperative-statement-2ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-SUBTRACTΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.78. UNSTRING Statement ΓòÉΓòÉΓòÉ
Description
The UNSTRING statement causes contiguous data in a sending field to be
separated and placed into multiple receiving fields. You can use one
UNSTRING statement instead of multiple MOVE statements. All subscripting and
reference modification is performed only once, at the beginning of the
execution of the UNSTRING statement. (Click here for information about
reference modification.)
ΓöÇΓöÇUNSTRING identifier-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
ΓööΓöÇDELIMITEDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
ΓööΓöÇBYΓöÇΓöÿ ΓööΓöÇALLΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
2ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ
Γöé Γöé
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓöÇORΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓöÇΓö╝Γöÿ
ΓööΓöÇALLΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ3
ΓöÇΓöÇINTOΓöÇΓöÇΓöÇidentifier-4ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼4
ΓööΓöÇDELIMITERΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-5ΓöÇΓöÿ
ΓööINΓöÿ
3ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
4ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇCOUNTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇidentifier-6ΓöÇΓöÿ
ΓööΓöÇINΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇPOINTER identifier-7ΓöÇΓöÿ
ΓööΓöÇWITHΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTALLYINGΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇidentifier-8ΓöÇΓöÿ
ΓööΓöÇINΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇOVERFLOW imperative-statement-1ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇOVERFLOW imperative-statement-2ΓöÇΓöÿ
ΓööΓöÇONΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇEND-UNSTRINGΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.79. WRITE Statement ΓòÉΓòÉΓòÉ
Description
The WRITE statement releases a logical record for an output or input/output
file. When the WRITE statement is executed, the associated sequential file
must be open in OUTPUT or EXTEND mode; the associated indexed or relative
file must be open in OUTPUT, I-O, or EXTEND mode. The WRITE statement has
five formats:
Format 1 (Sequential Files)
Format 2 (Indexed and Relative Files)
Format 3 (FORMATFILE)
Format 4 (TRANSACTION Nonsubfile)
Format 5 (TRANSACTION Subfile)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (Sequential Files) ΓòÉΓòÉΓòÉ
Description
Sequential files are sequentially organized. ADVANCING and END-OF-PAGE
control the vertical positioning of each line on a printed page. However, do
not specify both ADVANCING and END-OF-PAGE in a single WRITE statement.
If the printed page is held on an intermediate device (a disk, for example),
the format, when edited or browsed, may appear different than the expected
output.
Format 1 (Sequential Files)
ΓöÇΓöÇΓöÇWRITE record-name-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFROM identifier-1ΓöÇΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓö¼ΓöÇBEFOREΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼Γöÿ
ΓööΓöÇAFTERΓöÇΓöÇΓöÿ ΓööΓöÇADVANCINGΓöÇΓöÿ Γöé ΓööΓöÇinteger-1ΓöÇΓöÇΓöÇΓöÇΓöÿ Γö£ΓöÇLINEΓöÇΓöÇΓöñ Γöé
Γöé ΓööΓöÇLINESΓöÇΓöÿ Γöé
Γö£ΓöÇmnemonic-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇPAGEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇEND-OF-PAGEΓöÇΓö¼ΓöÇimperative-statement-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇΓöÇΓöÇΓöÇEOPΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇEND-OF-PAGEΓöÇΓö¼ΓöÇimperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿΓööΓöÇΓöÇΓöÇΓöÇEOPΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇEND-WRITEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (Indexed and Relative Files) ΓòÉΓòÉΓòÉ
Description
The WRITE statement releases a logical record for an output or input/output
file. When the WRITE statement is executed, the associated indexed and
relative files must be open in OUTPUT, I-O, or EXTEND mode.
Format 2 (Indexed and Relative Files)
ΓöÇΓöÇΓöÇWRITE record-name-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööFROM identifier-1Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINVALIDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇimperative-statement-1ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼
ΓööNOT INVALIDΓö¼ΓöÇΓöÇΓöÇΓö¼imperative-statement-2Γöÿ ΓööEND-WRITEΓöÿ
ΓööKEYΓöÿ
ΓòÉΓòÉΓòÉ <hidden> INVALID KEY Phrase ΓòÉΓòÉΓòÉ
The INVALID KEY phrase must be specified for files for which there is not an
appropriate EXCEPTION/ERROR procedure.
When an attempt is made to write beyond the externally defined boundaries of
the file, WRITE statement execution is unsuccessful and an EXCEPTION/ERROR
condition exists.
For indexed files, an invalid key condition is caused by any of the following:
An attempt is made to write beyond the externally defined boundaries of the
file.
The access mode is sequential and the file is opened OUTPUT, and the value of
the prime record key is not greater than that of the previous record.
The file is opened OUTPUT or I-O and the value of the prime record key equals
that of an already existing record.
The value of the key field in the record area equals that of an already
existing record and DUPLICATES are not allowed.
The value of the key field in the record area is not greater than that for
the previous record. For a file that allows duplicate keys, the INVALID KEY
condition exists only if the value of the record key is less than that for
the previous record.
For relative files, an invalid key condition is caused by any of the following:
An attempt is made to write beyond the externally defined boundaries of the
file.
The access mode is random or dynamic and the RELATIVE KEY data item specifies
a record that already contains data.
When the invalid key condition is recognized, WRITE statement execution is
unsuccessful, and the contents of the record are unaffected. Program execution
proceeds according to the rules described under invalid key condition.
ΓòÉΓòÉΓòÉ <hidden> Format 3 (FORMATFILE) ΓòÉΓòÉΓòÉ
Description
The WRITE statement releases a logical record for an output or input/output
file. When the WRITE statement is executed, the associated file must be open
in OUTPUT, I-O, or EXTEND mode.
Format 3 (FORMATFILE)
ΓöÇΓöÇΓöÇWRITE record-name-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööFROM identifier-1Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇINDICATORΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-3ΓöÇΓöÇΓöÇΓöÇΓöÿ
Γö£ΓöÇINDICATORSΓöÇΓöñ Γö£ΓöÇISΓöÇΓöÇΓöñ
ΓööΓöÇINDICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇAREΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇEND-OF-PAGEΓöÇΓö¼ΓöÇimperative-statement-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇΓöÇΓöÇΓöÇEOPΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇNOTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇEND-OF-PAGEΓöÇΓö¼ΓöÇimperative-statement-2ΓöÇΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿΓööΓöÇΓöÇΓöÇΓöÇEOPΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇEND-WRITEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ <hidden> Format 4 (TRANSACTION Nonsubfile) ΓòÉΓòÉΓòÉ
Description
The WRITE statement releases a logical record to the file.
Format 4 (TRANSACTION Nonsubfile)
ΓöÇΓöÇΓöÇWRITE record-name-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööFROM identifier-1Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTERMINALΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇSTARTINGΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-4ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇATΓöÇΓöÿ ΓööΓöÇLINEΓöÇΓöÿ ΓööΓöÇliteral-3ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ1
ΓööΓöÇΓö¼ΓöÇBEFOREΓöÇΓö¼ΓöÇROLLINGΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-5ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ2
ΓööΓöÇAFTERΓöÇΓöÇΓöÿ Γö£ΓöÇLINESΓöÇΓöñ ΓööΓöÇliteral-4ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇLINEΓöÇΓöÇΓöÿ
1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ3
2ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-6ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ4
Γö£ΓöÇTHROUGHΓöÇΓöñ ΓööΓöÇliteral-5ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇTHRUΓöÇΓöÇΓöÇΓöÇΓöÿ
3ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
4ΓöÇΓöÇΓöÇΓö¼ΓöÇUPΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇidentifier-7ΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
ΓööΓöÇDOWNΓöÇΓöÿ ΓööΓöÇliteral-6ΓöÇΓöÇΓöÇΓöÇΓöÿ Γö£ΓöÇLINESΓöÇΓöñ
ΓööΓöÇLINEΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇINDICATORΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-8ΓöÇΓöÇΓöÇΓöÇΓöÿ
Γö£ΓöÇINDICATORSΓöÇΓöñ Γö£ΓöÇISΓöÇΓöÇΓöñ
ΓööΓöÇINDICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇAREΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇEND-WRITEΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓòÉΓòÉΓòÉ <hidden> STARTING Phrase ΓòÉΓòÉΓòÉ
The STARTING phrase specifies the starting line number for the record formats
that use the variable starting line keyword. This phrase is only valid for
display devices.
The actual line number on which a field begins can be determined by the
following equation:
Actual-line = Start-line + DDS Start-line - 1
Where:
Actual-line is the actual line number
Start-line is the starting line number specified in the program
DDS Start-line is the line number specified in positions 39 through 41 of the
Data Description Specifications form.
The write operation is successful if:
The result of the equation is positive and less than or equal to the number
of lines on the workstation screen.
The value specified for the STARTING phrase is 0. In this case, a value of 1
is assumed.
ΓòÉΓòÉΓòÉ <hidden> ROLLING Phrase ΓòÉΓòÉΓòÉ
The ROLLING phrase allows you to move lines displayed on the workstation
screen. All or some of the lines on the screen can be rolled up or down. The
lines vacated by the rolled lines are cleared, and can have another screen
format written into them. This phrase is only valid for display devices.
You specify ROLLING in the WRITE statement that is writing a new format to the
workstation screen. You must specify whether the write is before or after the
roll, the range of lines you want to roll, how many lines you want to roll
these lines, and whether the roll operation is up or down.
After lines are rolled, the field on these lines retain their DDS display
attributes, for example, underlining, but lose their DDS usage attributes, for
example, input capability. Fields on lines that are written and then rolled
(BEFORE ROLLING phrase) also lose their usage attributes.
If any part of a format is rolled, the entire format loses its usage
attributes. If more than one format exists, only the rolled formats lose their
usage attributes.
ΓòÉΓòÉΓòÉ <hidden> Format 5 (TRANSACTION Subfile) ΓòÉΓòÉΓòÉ
Description
The WRITE statement releases a logical record to the file.
Format 5 (TRANSACTION Subfile)
ΓöÇΓöÇΓöÇWRITE SUBFILE record-name-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööFROM identifier-1Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORMATΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-2ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇTERMINALΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇidentifier-3ΓöÇΓö¼ΓöÇΓöÿ
ΓööΓöÇISΓöÇΓöÿ ΓööΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓö¼ΓöÇINDICATORΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-4ΓöÇΓöÇΓöÇΓöÇΓöÿ
Γö£ΓöÇINDICATORSΓöÇΓöñ Γö£ΓöÇISΓöÇΓöÇΓöñ
ΓööΓöÇINDICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇAREΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇINVALIDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇimperative-statement-1ΓöÇΓöÿ
ΓööΓöÇKEYΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
ΓööNOT INVALIDΓö¼ΓöÇΓöÇΓöÇΓö¼imperative-statement-2Γöÿ ΓööEND-WRITEΓöÿ
ΓööKEYΓöÿ
ΓòÉΓòÉΓòÉ 1.80. Compiler-Directing Statements ΓòÉΓòÉΓòÉ
Description
The compiler's main job is to translate your COBOL program into language that
the computer can process (object code). The compiler also lists errors in
your source statements and provides supplementary information to aid you in
debugging and tuning your program. You can direct and control compilation
with compiler-directing statements.
A compiler-directing statement begins with a compiler-directing verb that
causes the compiler to perform a specific operation during compilation.
For help with individual compiler-directing statements, select from the
following list:
*CONTROL(*CBL) COPY
EJECT SKIP1/2/3
TITLE USE
PROCESS
ΓòÉΓòÉΓòÉ 1.81. *CONTROL(*CBL) Statement ΓòÉΓòÉΓòÉ
Description
*CONTROL(*CBL) allows you to selectively display or suppress the listing of
source code throughout the source program.
The *CONTROL and *CBL statements are synonymous. Whenever you use *CONTROL,
*CBL is accepted as well.
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ*CONTROLΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇSOURCEΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇΓöÇΓöÇ*CBLΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ Γö£ΓöÇΓöÇΓöÇNOSOURCEΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇΓöÇLISTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇΓöÇNOLISTΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇΓöÇMAPΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇΓöÇNOMAPΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.82. COPY Statement ΓòÉΓòÉΓòÉ
Description
The Format 1 COPY statement is a library statement that places prewritten
text in a COBOL program. The Format 2 COPY statement can be used to create
COBOL Data Division statements to describe a file that exists on the system.
The two formats of the COPY statement are:
Format 1 (COPY)
Format 2 (COPY DDS Translate)
ΓòÉΓòÉΓòÉ <hidden> Format 1 (COPY) ΓòÉΓòÉΓòÉ
Description
The Format 1 COPY statement is a library statement that places prewritten
text in a COBOL program.
Prewritten source program entries can be included in a source program at
compile time. Thus, an installation can use standard file descriptions,
record descriptions, or procedures without recoding them. These entries and
procedures can then be saved in user-created libraries; they can then be
included in the source program by means of the COPY statement.
The effect of processing a COPY statement is that the library text associated
with text-name is copied into the source program, logically replacing the
entire COPY statement, beginning with the word COPY and ending with the
period, inclusive. When the REPLACING phrase is not specified, the library
text is copied unchanged.
Format 1 (COPY)
ΓöÇΓöÇΓöÇCOPYΓöÇΓöÇtext-nameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfile-nameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇΓöÇOFΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇlibrary-name- ΓöÇΓöÿ ΓööΓöÇΓöÇSUPPRESSΓöÇΓöÇΓöÿ
ΓööΓöÇΓöÇINΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇΓöÇREPLACINGΓöÇΓö¼ ==pseudo-text-1== Γö¼ΓöÇBYΓöÇΓö¼ ==pseudo-text-2== Γö╝ΓöÇΓöÿ
Γö£ΓöÇΓöÇΓöÇΓöÇidentifier-1ΓöÇΓöÇΓöÇΓöñ Γö£ΓöÇΓöÇΓöÇidentifier-2ΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ Γö£ΓöÇΓöÇΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇΓöÇΓöÇword-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇΓöÇword-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> Format 2 (COPY DDS Translate) ΓòÉΓòÉΓòÉ
Description
The Format 2 COPY statement (DD, DDR, DDS, DDSR option) can be used to create
COBOL Data Division statements to describe a file that exists on the system.
These descriptions are based on the version of the file in existence at
compile time. They do not make use of the DDS source statements for the
file.
You can use the Format 2 Copy statement only in the Data Division, and you
must precede the statement with a group level item that has a level number
less than 05.
When the RECORD KEY clause specifies EXTERNALLY-DESCRIBED-KEY, a format can
be copied only once under the FD entry for the file.
Format 2 (COPY DDS Translate)
ΓöÇΓöÇΓöÇCOPYΓöÇΓöÇΓö¼ΓöÇDD-format-nameΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇDD-ALL-FORMATSΓöÇΓöÇΓöÇΓöñ Γö£ΓöÇ -IΓöÇΓöÇΓöÇΓöñ Γö£ΓöÇ -INDICATORΓöÇΓöÇΓöñ
Γö£ΓöÇDDR-format-nameΓöÇΓöÇΓöñ Γö£ΓöÇ -OΓöÇΓöÇΓöÇΓöñ Γö£ΓöÇ -INDICATORSΓöÇΓöñ
Γö£ΓöÇDDR-ALL-FORMATSΓöÇΓöÇΓöñ ΓööΓöÇ -I-OΓöÇΓöÿ ΓööΓöÇ -INDICΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Γö£ΓöÇDDS-format-nameΓöÇΓöÇΓöñ
Γö£ΓöÇDDS-ALL-FORMATSΓöÇΓöÇΓöñ
Γö£ΓöÇDDSR-format-nameΓöÇΓöñ
ΓööΓöÇDDSR-ALL-FORMATSΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfile-nameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇΓöÇOFΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇlibrary-name- ΓöÇΓöÿ ΓööΓöÇΓöÇSUPPRESSΓöÇΓöÇΓöÿ
ΓööΓöÇΓöÇINΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
Γöé ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
Γöé Γöé Γöé
ΓööΓöÇΓöÇREPLACINGΓöÇΓö¼ ==pseudo-text-1== Γö¼ΓöÇBYΓöÇΓö¼ ==pseudo-text-2== Γö╝ΓöÇΓöÿ
Γö£ΓöÇΓöÇΓöÇΓöÇidentifier-1ΓöÇΓöÇΓöÇΓöñ Γö£ΓöÇΓöÇΓöÇidentifier-2ΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇΓöÇΓöÇliteral-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ Γö£ΓöÇΓöÇΓöÇliteral-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇΓöÇΓöÇword-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇΓöÇΓöÇword-2ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> REPLACING ΓòÉΓòÉΓòÉ
In the following discussion, each operand may consist of one of the following:
Pseudo-text
An identifier
A literal
A COBOL word (except COPY).
When you specify REPLACING, the library text is copied, and each properly
matched occurrence of the first operand within the library text is replaced by
the second operand. For example, identifier-1 is replaced by identifier-2.
Each operand may consist of one of the following:
Pseudo-text
1. A sequence of character-strings and/or separators bounded by, but not
including, pseudo-text delimiters (==). Both characters of each
pseudo-text delimiter must appear on one line; however,
character-strings within pseudo-text-1 can be continued. Because of the
replacement rules, the continued line of pseudo-text-2 can begin in area
A.
2. A character-string for pseudo-text can consist of single-byte characters
of any kind. The prefix portion of a data name, however, cannot be
replaced using pseudo-text unless the entire data name is used.
3. Pseudo-text-1 must not be null, nor may it consist solely of the space
character, separator comma, separator semicolon, and/or comment lines.
Beginning and ending blanks are not included in the text comparison
process. Embedded blanks are used in the text comparison process to
indicate multiple text words.
4. Pseudo-text-2 may be null; it may consist solely of space characters
and/or comment lines. Each text word in pseudo-text-2 that is to be
copied into the program is placed in the same area of the resultant
program as the area in which it appears in pseudo-text-2.
Identifier
- May be defined in any Data Division section
Literal
- May be numeric or nonnumeric
Word
- May be any single COBOL word (except COPY)
For purposes of matching, each identifier-1, literal-1, or word-1 is treated,
respectively, as pseudo-text containing only identifier-1, literal-1, or
word-1.
ΓòÉΓòÉΓòÉ 1.83. EJECT Statement ΓòÉΓòÉΓòÉ
Description
The EJECT statement specifies that the next source statement is to be
printed at the top of the next page.
The EJECT statement must be the only statement on the line. You may write
it in either Area A or Area B, and you may terminate it with a separator
period.
The EJECT statement has no effect on the compilation of the source program
itself.
ΓöÇΓöÇEJECTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇ . ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.84. SKIP1/2/3 Statement ΓòÉΓòÉΓòÉ
Description
The SKIP 1/2/3 statements specify blank lines that the compiler should add
when printing the source listing. SKIP statements have no effect on the
compilation of the source program itself.
ΓöÇΓöÇΓö¼ΓöÇΓöÇSKIP1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇΓöÇSKIP2ΓöÇΓöÇΓöñ ΓööΓöÇ . ΓöÇΓöÿ
ΓööΓöÇΓöÇSKIP3ΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.85. TITLE Statement ΓòÉΓòÉΓòÉ
Description
The TITLE statement specifies a title to be printed at the top of each page
of the source listing produced during compilation. If no TITLE statement is
found, a title containing the identification of the compiler and the current
release level is generated. The title is left-justified on the title line.
The TITLE statement:
Forces a new page immediately, if the SOURCE compiler option is in effect
Is not printed on the source listing
Has no other effect on compilation
Has no effect on program execution
ΓöÇΓöÇTITLE literalΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇ . ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 1.86. USE Statement ΓòÉΓòÉΓòÉ
Description
USE is a compiler-directing statement that can appear only in the Procedure
Division, and that can begin only in Area B. The USE statement has two
declaratives:
EXCEPTION/ERROR Declarative
DEBUGGING Declarative
ΓòÉΓòÉΓòÉ <hidden> EXCEPTION/ERROR Declarative ΓòÉΓòÉΓòÉ
Description
The EXCEPTION/ERROR declarative specifies procedures for input/output
exception or error handling that are to be executed in addition to the
system-defined procedures.
The EXCEPTION/ERROR procedures are activated when an input/output error
occurs during execution of a ACQUIRE, DROP, READ, WRITE, REWRITE, START,
OPEN, CLOSE, or DELETE statement.
After execution of the EXCEPTION/ERROR declarative procedure, control is
returned to the statement immediately following the input/output statement
which caused the error.
The words EXCEPTION and ERROR are synonymous and may be used
interchangeably.
ΓöÇΓöÇUSE AFTERΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇEXCEPTIONΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇSTANDARDΓöÇΓöÿ ΓööΓöÇERRORΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇPROCEDUREΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇfile-name-1ΓöÇΓö┤ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇONΓöÇΓöÿ Γö£ΓöÇINPUTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇOUTPUTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇI-OΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇEXTENDΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> DEBUGGING Declarative ΓòÉΓòÉΓòÉ
Description
The USE FOR DEBUGGING sentence in the Procedure Division identifies the items
in the source program that are to be monitored by the associated debugging
declarative procedure.
Note: Debugging sections are obsolete language elements and are to be
deleted from the next revision of the ANSI Standard.
All debugging statements must be written together in a section immediately
after the DECLARATIVES header. Except for the USE FOR DEBUGGING sentence
itself, within the debugging procedure there must be no reference to any
non-declarative procedures.
ΓöÇΓöÇΓöÇUSEΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇDEBUGGINGΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇFORΓöÇΓöÿ ΓööΓöÇONΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇidentifier-1ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓööΓöÇALLΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ Γöé
Γöé ΓööΓöÇREFERENCES OFΓöÇΓöÿ Γöé
Γö£ΓöÇfile-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇprocedure-name-1ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇALL PROCEDURESΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> ALL REFERENCES OF Phrase ΓòÉΓòÉΓòÉ
When you specify ALL REFERENCES OF identifier-1, that debugging section is
executed for every statement that explicitly references identifier-1 at each of
the following times:
Before the execution of a WRITE or REWRITE identifier-1 and after the
execution of any implicit move resulting from the presence of the FROM
phrase.
Before control is transferred with GO TO DEPENDING ON identifier-1, and
before any debugging section for the procedure-name runs.
After each initialization, modification, or evaluation of the contents of
identifier-1 in PERFORM VARYING/AFTER/UNTIL identifier-1.
After any other COBOL statement explicitly referring to identifier-1.
If identifier-1 is specified in a phrase that is not executed or evaluated, the
associated debugging section is not executed.
ΓòÉΓòÉΓòÉ <hidden> Identifier-1 ΓòÉΓòÉΓòÉ
An identifier in a USE FOR DEBUGGING sentence:
Must be specified without the subscripting or indexing normally required if
it contains an OCCURS clause or is subordinate to an entry containing an
OCCURS clause. (A SEARCH or SEARCH ALL statement that refers to such an
identifier does not call the USE FOR DEBUGGING procedures.)
Must not be a special register.
Cannot be reference modified.
When you specify identifier-1, that debugging section is executed at each of
the following times:
Before the execution of a WRITE or REWRITE statement that explicitly
references identifier-1 and after the execution of any implicit move
resulting from the presence of the FROM phrase.
After each initialization, modification, or evaluation of the contents of
identifier-1 in PERFORM VARYING/AFTER/UNTIL identifier-1.
After any other COBOL statement explicitly referring to identifier-1 and
causes a change in the contents of identifier-1.
Any given identifier may appear in only one USE FOR DEBUGGING sentence, and
only once in that sentence.
If identifier-1 is specified in a phrase that is not executed or evaluated, the
associated debugging section is not executed.
ΓòÉΓòÉΓòÉ 1.87. PROCESS Statement ΓòÉΓòÉΓòÉ
Description
The PROCESS statement is an optional part of the COBOL source program. It
lets you specify options that you would normally specify at compilation time.
Options specified in the PROCESS statement override the corresponding options
specified in the Compiler Options Dialog.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇPROCESSΓöÇΓöÇΓöÇoption-1ΓöÇΓö┤ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇ . ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ <hidden> PROCESS Statement ΓòÉΓòÉΓòÉ
The following rules apply to the PROCESS statement:
The statement must be placed before the first source statement in the COBOL
program immediately preceding the IDENTIFICATION DIVISION header.
The statement begins with the word PROCESS. Options can appear on more than
one line; however, only the first line can contain the word PROCESS.
The word PROCESS and all options must appear within positions 8 through 72.
Position 7 must be left blank. The remaining positions can be used as in
COBOL source statements: positions 1 through 6 for sequence numbers,
positions 73 through 80 for identification purposes.
The options must be separated by blanks and/or commas.
The options can appear in any order. If conflicting options are specified,
for example, LIST and NOLIST, the last option encountered takes precedence.
For any options with suboptions, if the option keyword is correct and the
suboption is in error, the default suboption is assumed.
ΓòÉΓòÉΓòÉ <hidden> Option-1 ΓòÉΓòÉΓòÉ
Option-1 represents the options available with the PROCESS statement. Following
is a list of these options. You may click on each one for a description of the
option.
GENLVL(nn) NOBLK
GEN BLK
NOGEN STDINZ
NOMAP NOSTDINZ
MAP FS21DUPKEY
NONUMBER NOFS21DUPKEY
NUMBER RANGE
LINENUMBER NORANGE
NOSECLVL UNREF
SECLVL NOUNREF
NOOPTIONS NOVARCHAR
OPTIONS VARCHAR
QUOTE NODATETIME
APOST DATETIME
NOSEQUENCE NOCVTGRAPHIC
SEQUENCE CVTGRAPHIC
SOURCE (or SRC) NOFIPS
NOSOURCE (or NOSRC) MINIMUM
NOVBSUM INTERMEDIATE
VBSUM HIGH
NOXREF NOSEG
XREF SEG1
PRTCORR SEG2
NOPRTCORR NODEB
NOINZDLT DEB1
INZDLT DEB2
NOLIST NOOBSOLETE
LIST OBSOLETE
STDERR EXTDSPOPT(a b c)
NOSTDERR NOSAAFLAG
NODDSFILLER SAAFLAG
DDSFILLER FLAG(nn)
NOSYNC NOFS9MTO0M
SYNC FS9MTO0M
NOCRTF NOGRAPHIC
CRTF GRAPHIC
NODUPKEYCHK NOFS9ATO0A
DUPKEYCHK FS9ATO0A
NOEXTACCDSP SRTSEQ(a)
EXTACCDSP LANGID(a)
ΓòÉΓòÉΓòÉ <hidden> EXTDSPOPT Option ΓòÉΓòÉΓòÉ
EXTDSPOPT specifies the options to use for extended ACCEPT and extended DISPLAY
statements for workstation I/O, and takes the form:
EXTDSPOPT(a b c)
Where a is DFRWRT or NODFRWRT, b is UNDSPCHR or NOUNDSPCHR, and c is ACCUPDALL
or ACCUPDNE.
DFRWRT indicates that extended DISPLAY statements are held in a buffer until
an extended ACCEPT statement is encountered, or until the buffer is filled.
DFRWRT is the default value.
If an extended ACCEPT statement is not encountered before the buffer is
filled, the contents of the buffer are written to the display. When an
extended ACCEPT statement is encountered, the current contents of the buffer
are written to the display.
NODFRWRT indicates that each extended DISPLAY statement is performed as it is
encountered.
UNDSPCHR indicates that displayable and undisplayable characters are handled
by extended ACCEPT and extended DISPLAY statements. UNDSPCHR is the default
value.
NOUNDSPCHR indicates that only displayable characters are handled by extended
ACCEPT and extended DISPLAY statements.
Although you must use this option for display stations attached to remote
3174 and 3274 controllers, you can also use it for local work stations. If
you do use this option, your data must contain displayable characters. If
the data contains values less than hexadecimal 20, the results are
unpredictable, and can range from unexpected display formats to severe
errors.
ACCUPDALL indicates that all types of data are predisplayed in the extended
ACCEPT statements regardless of the existence of the UPDATE phrase.
ACCUPDALL is the default value.
ACCUPDNE indicates that only numeric edited data are predisplayed in the
extended ACCEPT statements that do not contain the UPDATE phrase.
ΓòÉΓòÉΓòÉ <hidden> SRTSEQ Option ΓòÉΓòÉΓòÉ
SRTSEQ specifies the sort sequence used when NLSSORT is associated with an
alphabet-name in the ALPHABET clause. The SRTSEQ option is used in conjunction
with the LANGID option to determine which system-defined or user-defined sort
sequence table the program will use. SRTSEQ takes the form:
SRTSEQ(a)
Where a is HEX, JOB, JOBRUN, LANGIDUNQ, LANGIDSHR, "table-name" or
"library-name/table-name".
HEX indicates that no sort sequence table will be used and the hexadecimal
values of the characters will be used to determine the sort sequence. This is
the default value.
JOB indicates that the sort sequence of the program will be resolved and
associated with the program at compile time. The sort sequence table must
exist in the system at compile time.
JOBRUN indicates that the sort sequence of the program will be resolved and
associated with the program at run time. At compile time, the compiler will
associate the sort sequence of the compile job with the program. At run time,
this sort sequence will be replaced by the sort sequence associated with the
job at run time. This value allows a program to be compiled once and used
with different sort sequences at run time.
LANGIDUNQ indicates that the sort sequence table being used must contain a
unique weight for each character in the code page. The sort sequence table
used will be the unique weighted table associated with the language specified
in the LANGID option.
LANGIDSHR indicates that the sort sequence table being used can contain the
same weight for multiple characters in the code page. The sort sequence table
used will be the shared weighted table associated with the language specified
in the LANGID option.
"table-name" or "library-name/table-name" indicates the name of the sort
sequence table to be used. The table contains weights for all characters in a
given code page. A weight is associated with the character that is defined at
the code point. The library is specified as LIBL, CURLIB or library-name.
- LIBL indicates the library list is searched to find the library where the
sort sequence table is located. This is the default value.
- CURLIB indicates that the current library is searched. If you have not
assigned a library as the current library, QGPL is used.
- library-name indicates the name of the library where the sort sequence
table is found.
ΓòÉΓòÉΓòÉ <hidden> LANGID Option ΓòÉΓòÉΓòÉ
LANGID specifies the language identifier which is used in conjunction with the
sort sequence. The LANGID option is used only when the SRTSEQ value in effect
is LANGIDUNQ or LANGIDSHR. LANGID takes the form:
LANGID(a)
Where a is JOBRUN, JOB or "language-identifier".
JOBRUN indicates that the language identifier of the program will be resolved
at run time. When the compiled program is run, the language identifier of the
job is used. This value allows a program to be compiled once and used with
different language identifiers at run time. This is the default value.
JOB indicates that the language identifier of the program will be resolved at
compile time.
"language-identifier" is a valid 3 character language identifier.
ΓòÉΓòÉΓòÉ <hidden> alphabet-name-1 ΓòÉΓòÉΓòÉ
You must specify alphabet-name-1 in the ALPHABET clause of the SPECIAL-NAMES
paragraph. You may specify any one of the alphabet-name clause phrases with
the following results:
STANDARD-1 The ASCII collating sequence is used for all nonnumeric
comparisons.
STANDARD-2 The International Reference Version of the ISO 7-bit code
defined in International Standard 646, 7-bit Coded Character
Set for Information Processing Interchange is used for all
nonnumeric comparisons
NATIVE The EBCDIC collating sequence is used for all nonnumeric
comparisons.
EBCDIC The EBCDIC collating sequence is used for all nonnumeric
comparisons.
NLSSORT The Sort sequence (SRTSEQ) and Language identifier (LANGID)
specifications in the compiler options (or implied defaults)
are used to determine the character code set used for all
nonnumeric comparisons.
literal The collating sequence established by the specification of
literals in the alphabet-name clause is used for all nonnumeric
comparisons.
ΓòÉΓòÉΓòÉ 1.88. Arithmetic Expressions ΓòÉΓòÉΓòÉ
Arithmetic expressions are used as operands of certain conditional and
arithmetic statements.
An arithmetic expression may consist of any of the following:
1. An identifier described as a numeric elementary item
2. A numeric literal
3. The figurative constant ZERO
4. Identifiers and literals, as defined in items 1, 2, and 3, separated by
arithmetic operators
5. Two arithmetic expressions, as defined in items 1, 2, 3, and/or 4,
separated by an arithmetic operator
6. An arithmetic expression, as defined in items 1, 2, 3, 4, and/or 5,
enclosed in parentheses.
Any arithmetic expression may be preceded by a unary operator.
Identifiers and literals appearing in arithmetic expressions must represent
either numeric elementary items or numeric literals on which arithmetic may be
performed.
If an exponential expression is evaluated as both a positive and a negative
number, the result will always be the positive number. The square root of 4,
for example (4 ** 0.5) is evaluated as +2 and -2. The compiler always
returns +2.
If the value of an expression to be raised to a power is zero, the exponent
must have a value greater than zero. Otherwise, the size error condition
exists. In any case, where no real number exists as a result of the
evaluation, the size error condition exists.
Arithmetic Operators
Five binary arithmetic operators and two unary arithmetic operators may be used
in arithmetic expressions. They must be preceded and followed by a space, and
they are interpreted as follows:
Binary Operator Operation Performed
+ Addition
- Subtraction
* Multiplication
/ Division
** Exponentiation
Unary Operator Operation Performed
+ Multiplication by +1
- Multiplication by -1
You can use parentheses in arithmetic expressions to specify the order in which
elements are to be evaluated. Expressions within parentheses are evaluated
first. When expressions are contained within a nest of parentheses, evaluation
proceeds from the innermost to the outermost set.
When parentheses are not used, or when parenthesized expressions are at the
same level of inclusiveness, the following hierarchical order is implied:
1. Unary operator
2. Exponentiation
3. Multiplication and division
4. Addition and subtraction
Parentheses either eliminate ambiguities in logic where consecutive operations
appear at the same hierarchic level, or modify the normal hierarchic sequence
of execution when this is necessary. When the order of consecutive operations
at the same hierarchic level is not completely specified by parentheses, the
order is from left to right.
An arithmetic expression may begin only with a left parenthesis, a unary
operator, or an operand (that is, an identifier or a literal). It may end only
with a right parenthesis or an operand. An arithmetic expression must contain
at least one reference to an identifier or a literal.
There must be a one-to-one correspondence between left and right parentheses in
an arithmetic expression, with each left parenthesis placed to the left of its
corresponding right parenthesis.
If the first operator in an arithmetic expression is a unary operator, it must
be immediately preceded by a left parenthesis if that arithmetic expression
immediately follows an identifier or another arithmetic expression.
ΓòÉΓòÉΓòÉ 1.89. INVALID KEY Condition ΓòÉΓòÉΓòÉ
The invalid key condition can occur during execution of a DELETE, READ,
REWRITE, START, or WRITE statement. When an invalid key condition occurs, the
input-output statement that caused the condition is unsuccessful.
When the invalid key condition exists after an input-output operation, actions
are taken according to the type of error handling in effect:
With standard error handling, if there is an applicable file status clause
(but not an applicable USE procedure), the file status is updated, and
control returns to the program. In the absence of a file status clause, USE
procedure, or INVALID KEY phrase to handle the error, a run-time message is
issued, giving you the option to end or return to the program.
Without standard error handling, the status key, if specified, is updated.
If an explicit or implicit EXCEPTION/ERROR procedure is specified for the
file, the procedure runs. If no such procedure is specified, the results are
unpredictable.
If the invalid key condition does not exist after execution of the input-output
operation, the INVALID KEY phrase, if specified, is ignored, and the following
actions are taken:
1. If an exception condition which is not an invalid key condition exists,
control is transferred according to the rules of the USE statement
following the execution of any USE AFTER EXCEPTION procedure.
2. If no exception condition exists, control is transferred to the end of the
input-output statement or the imperative statement specified in the NOT
INVALID KEY phrase, if specified.
ΓòÉΓòÉΓòÉ 1.90. Program-name ΓòÉΓòÉΓòÉ
The program-name is a user-defined word that identifies your program. The
system uses the first 10 characters of the program-name as the identifying
name of the program.
The first character must be alphabetic. If the first character is not
alphabetic, it is converted as follows:
- 0 is changed to J
- 1 through 9 are changed to A through I.
If you use a non-trailing hyphen in positions 2 through 9 of the
program-name, the hyphen is changed to zero (0).
ΓòÉΓòÉΓòÉ 1.91. ROUNDED Phrase ΓòÉΓòÉΓòÉ
The ROUNDED phrase prevents truncation when the size of the fractional result
of an arithmetic operation exceeds the number of places provided for its
storage.
The ROUNDED phrase causes the least significant digit of the resultant
identifier to be increased by 1 whenever the most significant digit of the
excess is greater than or equal to 5.
When the resultant identifier is described by a PICTURE clause containing
rightmost P's, and when the number of places in the calculated result exceeds
the number of integer positions specified, rounding or truncation occurs,
relative to the rightmost integer position for which storage is allocated.
ΓòÉΓòÉΓòÉ 1.92. SIZE ERROR/NOT SIZE ERROR ΓòÉΓòÉΓòÉ
A size error condition can occur in three different ways:
1. When the absolute value of the result of an arithmetic evaluation, after
decimal point alignment, exceeds the largest value that can be contained in
the result field
2. When division by zero occurs
3. In an exponential expression, when:
Zero is raised to zero power. If a SIZE ERROR clause is present, the SIZE
ERROR imperative statement is executed.
Zero is raised to a negative number. If a SIZE ERROR clause is present,
the SIZE ERROR imperative statement is executed.
A negative number is raised to a fractional power. If a SIZE ERROR clause
is present, the SIZE ERROR imperative statement is executed.
If a SIZE ERROR phrase is not present and a size error condition occurs, the
value of the affected resultant identifier is unpredictable. Values of other
resultant identifiers are not affected, as long as no size error occurred for
them.
The size error condition applies only to final results, not to intermediate
results.
If the resultant identifier is defined with USAGE IS BINARY, or
COMPUTATIONAL-4, the largest value that can be contained in it is the maximum
value implied by its associated decimal PICTURE character-string.
When a size error occurs, the subsequent action of the program depends on
whether or not the ON SIZE ERROR phrase is specified.
If you do specify the ON SIZE ERROR phrase and a size error condition occurs,
the value of the resultant identifier affected by the size error is not
altered---that is, the error results are not placed in the receiving
identifier. After completion of the execution of the arithmetic operation, the
imperative statement in the ON SIZE ERROR phrase is executed, control is
transferred to the end of the arithmetic statement, and the NOT ON SIZE ERROR
phrase, if specified, is ignored.
If you specify the NOT ON SIZE ERROR phrase and, after execution of an
arithmetic operation, a size error condition does not exist, the NOT ON SIZE
ERROR phrase is executed.
When you specify both the ON SIZE ERROR and NOT ON SIZE ERROR phrases, and the
statement in the phrase that is executed does not contain any explicit transfer
of control, then, if necessary, an implicit transfer of control is made after
execution of the phrase to the end of the arithmetic statement.
For ADD CORRESPONDING and SUBTRACT CORRESPONDING statements, if an individual
arithmetic operation causes a size error condition, the ON SIZE ERROR
imperative statement is not executed until all the individual additions or
subtractions have been completed.
ΓòÉΓòÉΓòÉ 1.93. Reference Modification ΓòÉΓòÉΓòÉ
Reference modification resembles substringing in other computer languages.
Reference modification defines a data item by specifying a starting position
and length for the item. It is generally allowed anywhere an identifier
referencing an alphanumeric data item is allowed.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇdata-name-1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γö£ΓöÇOFΓöÇΓö¼ΓöÇdata-name-2ΓöÇΓöÿ
ΓööΓöÇINΓöÇΓöÿ
ΓöÇΓöÇΓöÇ(leftmost-character-position:ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇlengthΓöÇΓöÿ
Without reference modification, you cannot use operands that are longer than 32
767 bytes in the following statements:
ACCEPT
CANCEL
DISPLAY
EVALUATE (relational condition)
IF (relational condition)
PERFORM (relational condition)
STRING
UNSTRING
USE (USE FOR DEBUGGING)
Note: When you use IF condition-name, an implicit comparison of the
condition-name (88-level item) with its condition variable takes place, even
though the condition variable is not referenced in the IF statement. Therefore,
IF condition-name cannot be used when the associated condition variable is
longer than 32 767 bytes.
With reference modification, this 32 767-byte limit does not apply if the
length of the operand is known at compilation time. In other words, the
reference modification length specification (or starting position in the
absence of a length specification) must be a numeric literal.
Evaluation of Operands
Reference modification for an operand is evaluated as follows:
If subscripting is specified for the operand, the reference modification is
evaluated immediately after evaluation of the subscript.
If subscripting is not specified for the operand, the reference modification
is evaluated at the time subscripting would be evaluated if subscripts had
been specified.
Reference modification creates a unique data item which is a subset of the data
item referenced by data-name-1. This unique data item is considered an
elementary data item without the JUSTIFIED clause. It has the same class and
category as that defined for the data item referenced by data-name-1, except
that the categories numeric, numeric-edited, and alphanumeric-edited are
considered class and category alphanumeric.
For example:
MOVE whole-name(1:25) TO last-name
This example transfers the first 25 characters in the variable whole-name to
the variable last-name.
Range Errors
An out-of-range reference modification component, such as a
leftmost-character-position of zero, causes system message MCH0603. This is
the same message that signals errors in subscript ranges and character-string
boundaries.
Restrictions on Reference Modification
The INDICATORS phrase does not support reference modification, and the same is
generally true of record-names.
The following statements do not support reference modification:
INSPECT
Extended ACCEPT
Extended DISPLAY
In addition, you cannot reference modify: identifier-3 of the STRING statement.
identifier-1 of the UNSTRING statement. identifier-1 of the USE FOR DEBUGGING
statement. identifier-3 of the STRING statement.
For the START statement, you can reference modify the last occurrence of
data-name-1 only.
ΓòÉΓòÉΓòÉ 1.94. ADDRESS Menu ΓòÉΓòÉΓòÉ
Select which occurrence of ADDRESS you want to display:
CALL STATEMENT Format 1 (CALL ON OVERFLOW)
CALL STATEMENT Format 2 (CALL ON EXCEPTION)
SET STATEMENT Format 5 (Pointer Data Item)
ΓòÉΓòÉΓòÉ 1.95. AFTER Menu ΓòÉΓòÉΓòÉ
Select which occurrence of AFTER you want to display:
USE AFTER EXCEPTION/ERROR PROCEDURE (USE Compiler-Directing Statement)
INSPECT Statement
PERFORM Statement Format 3 (PERFORM with UNTIL)
PERFORM Statement Format 4 (PERFORM with VARYING)
ΓòÉΓòÉΓòÉ 1.96. ASCENDING/DESCENDING Menu ΓòÉΓòÉΓòÉ
Select which occurrence of ASCENDING/DESCENDING you want to display:
ASCENDING/DESCENDING KEY Phrase (OCCURS Clause)
ASCENDING/DESCENDING KEY Phrase (MERGE Statement)
ASCENDING/DESCENDING KEY Phrase (SORT Statement)
ΓòÉΓòÉΓòÉ 1.97. ASSIGN Menu ΓòÉΓòÉΓòÉ
Select which occurrence of ASSIGN you want to display:
ASSIGN Clause (FILE-CONTROL Format 1 through Format 4)
ASSIGN Clause (FILE-CONTROL Format 5, Transaction File Entries)
ΓòÉΓòÉΓòÉ 1.98. BACKGROUND-COLOR/BACKGROUND-COLOUR Menu ΓòÉΓòÉΓòÉ
Select which occurrence of BACKGROUND-COLOR or BACKGROUND-COLOUR you want to
display:
ACCEPT Statement Format 7 (Workstation I/O)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.99. BELL/BEEP Menu ΓòÉΓòÉΓòÉ
Select which occurrence of BELL or BEEP you want to display:
ACCEPT Statement Format 7 (Workstation I/O)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.100. BEFORE Menu ΓòÉΓòÉΓòÉ
Select which occurrence of BEFORE you want to display:
INSPECT Statement
PERFORM Statement Format 3 (PERFORM with UNTIL)
PERFORM Statement Format 4 (PERFORM with VARYING)
ΓòÉΓòÉΓòÉ 1.101. BLANK Menu ΓòÉΓòÉΓòÉ
Select which occurrence of BLANK you want to display:
BLANK WHEN ZERO Clause
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.102. BLINK Menu ΓòÉΓòÉΓòÉ
Select which occurrence of BLINK you want to display:
ACCEPT Statement Format 7 (Workstation I/O)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.103. CHARACTERS Menu ΓòÉΓòÉΓòÉ
Select which occurrence of CHARACTERS you want to display:
BLOCK CONTAINS Clause (Formatfile, Database, Disk Files)
BLOCK CONTAINS Clause (Diskette Files)
BLOCK CONTAINS Clause (Tapefile Files)
BLOCK CONTAINS Clause (Printer Files)
INSPECT Statement (with TALLYING Phrase)
INSPECT Statement (with REPLACING Phrase)
INSPECT Statement (with TALLYING and REPLACING Phrases)
RECORD Clause
ΓòÉΓòÉΓòÉ 1.104. COLLATING Menu ΓòÉΓòÉΓòÉ
Select which occurrence of COLLATING you want to display:
PROGRAM COLLATING SEQUENCE Clause (OBJECT-COMPUTER Paragraph)
COLLATING SEQUENCE Phrase (MERGE Statement)
COLLATING SEQUENCE Phrase (SORT Statement)
ΓòÉΓòÉΓòÉ 1.105. COLUMN/COL Menu ΓòÉΓòÉΓòÉ
Select which occurrence of COLUMN or COL you want to display:
ACCEPT Statement Format 7 (Workstation I/O)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.106. COMMITMENT Menu ΓòÉΓòÉΓòÉ
Select which occurrence of COMMITMENT you want to display:
COMMITMENT CONTROL Clause (I-O-CONTROL Format 1, Sequential Files)
COMMITMENT CONTROL Clause (I-O-CONTROL Format 2, Indexed and Relative Files)
ΓòÉΓòÉΓòÉ 1.107. CORRESPONDING/CORR Menu ΓòÉΓòÉΓòÉ
Select which occurrence of CORRESPONDING or CORR you want to display:
ADD Statement Format 3 (ADD with CORRESPONDING)
MOVE Statement Format 2 (MOVE with CORRESPONDING)
SUBTRACT Statement Format 3 (SUBTRACT with CORRESPONDING)
ΓòÉΓòÉΓòÉ 1.108. CRT Menu ΓòÉΓòÉΓòÉ
Select which occurrence of CRT you want to display:
CONSOLE IS CRT Clause (SPECIAL-NAMES Paragraph)
CRT STATUS Clause (SPECIAL-NAMES Paragraph)
FROM CRT Phrase (ACCEPT Statement Format 7)
FROM CRT Phrase (DISPLAY Statement Format 3)
ΓòÉΓòÉΓòÉ 1.109. DATA Menu ΓòÉΓòÉΓòÉ
Select which occurrence of DATA you want to display:
Data Division
DATA RECORDS Clause (Formatfile, Database, Disk Files)
DATA RECORDS Clause (Diskette Files)
DATA RECORDS Clause (Tapefile Files)
DATA RECORDS Clause (Printer Files)
DATA RECORDS Clause (Sort/Merge Files)
DATA RECORDS Clause (Transaction Files)
ΓòÉΓòÉΓòÉ 1.110. DEBUGGING Menu ΓòÉΓòÉΓòÉ
Select which occurrence of DEBUGGING you want to display:
DEBUGGING Declarative
DEBUGGING MODE Clause (SOURCE-COMPUTER Paragraph)
ΓòÉΓòÉΓòÉ 1.111. DEPENDING Menu ΓòÉΓòÉΓòÉ
Select which occurrence of DEPENDING you want to display:
Conditional GO TO Statement
OCCURS DEPENDING ON Clause (Variable-Length Tables)
ΓòÉΓòÉΓòÉ 1.112. DISPLAY Menu ΓòÉΓòÉΓòÉ
Select which occurrence of DISPLAY you want to view:
USAGE IS DISPLAY (USAGE Clause)
DISPLAY Statement
ΓòÉΓòÉΓòÉ 1.113. DIVISION Menu ΓòÉΓòÉΓòÉ
Select which occurrence of DIVISION you want to display:
Data Division
Environment Division
Identification Division
Procedure Division
ΓòÉΓòÉΓòÉ 1.114. END-ACCEPT Menu ΓòÉΓòÉΓòÉ
Select which occurrence of END-ACCEPT you want to display:
ACCEPT Statement Format 5 (PIP Data Area)
ACCEPT Statement Format 7 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.115. END-OF-PAGE/EOP Menu ΓòÉΓòÉΓòÉ
Select which occurrence of END-OF-PAGE or EOP you want to display:
WRITE Statement Format 1 (Sequential Files)
WRITE Statement Format 3 (Formatfile)
ΓòÉΓòÉΓòÉ 1.116. EXCEPTION Menu ΓòÉΓòÉΓòÉ
Select which occurrence of EXCEPTION you want to display:
CALL Statement Format 2 (CALL ON EXCEPTION)
USE AFTER EXCEPTION/ERROR PROCEDURE (USE Compiler-Directing Statement)
ΓòÉΓòÉΓòÉ 1.117. EXIT Menu ΓòÉΓòÉΓòÉ
Select which occurrence of EXIT you want to display:
EXIT Statement
EXIT PROGRAM Statement
ΓòÉΓòÉΓòÉ 1.118. EXTERNALLY-DESCRIBED-KEY Menu ΓòÉΓòÉΓòÉ
Select which occurrence of EXTERNALLY-DESCRIBED-KEY you want to display:
EXTERNALLY-DESCRIBED-KEY (FILE-CONTROL Format 2, Indexed File Entries)
START Statement
ΓòÉΓòÉΓòÉ 1.119. FILE Menu ΓòÉΓòÉΓòÉ
Select which occurrence of FILE you want to display:
FILE SECTION
FILE-CONTROL Paragraph
MULTIPLE FILE TAPE Clause (I-O-CONTROL Paragraph, Sequential Files)
ΓòÉΓòÉΓòÉ 1.120. FOREGROUND-COLOR/FOREGROUND-COLOUR Menu ΓòÉΓòÉΓòÉ
Select which occurrence of FOREGROUND-COLOR or FOREGROUND-COLOUR you want to
display:
ACCEPT Statement Format 7 (Workstation I/O)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.121. FORMAT Menu ΓòÉΓòÉΓòÉ
Select which occurrence of FORMAT you want to display:
DELETE Statement
READ Statement Format 1 (Sequential Retrieval using Sequential Access)
READ Statement Format 2 (Sequential Retrieval using Dynamic Access)
READ Statement Format 3 (Random Retrieval)
READ Statement Format 4 (TRANSACTION Nonsubfile)
READ Statement Format 5 (TRANSACTION Subfile)
REWRITE Statement Format 1
REWRITE Statement Format 2 (TRANSACTION Subfile)
START Statement
WRITE Statement Format 2 (Indexed and Relative Files)
WRITE Statement Format 3 (Formatfile)
WRITE Statement Format 4 (TRANSACTION Nonsubfile)
WRITE Statement Format 5 (TRANSACTION Subfile)
ΓòÉΓòÉΓòÉ 1.122. HIGHLIGHT Menu ΓòÉΓòÉΓòÉ
Select which occurrence of HIGHLIGHT you want to display:
ACCEPT Statement Format 7 (Workstation I/O)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.123. INDEXED Menu ΓòÉΓòÉΓòÉ
Select which occurrence of INDEXED you want to display:
INDEXED BY Phrase (OCCURS Clause)
ORGANIZATION IS INDEXED Clause (Indexed File Entries)
INDEXED BY Phrase (Data Description Entry Format 4, Boolean Data)
ΓòÉΓòÉΓòÉ 1.124. INDIC/INDICATOR/INDICATORS Menu ΓòÉΓòÉΓòÉ
Select which occurrence of INDIC, INDICATOR, or INDICATORS you want to display:
INDICATOR Clause (Data Description Entry Format 4, Boolean Data)
INDICATOR Clause (READ Statement Format 4, TRANSACTION Nonsubfile)
INDICATOR Clause (READ Statement Format 5, TRANSACTION Subfile)
INDICATOR Clause (REWRITE Statement Format 2, TRANSACTION Subfile)
INDICATOR Clause (WRITE Statement Format 3, Formatfile)
INDICATOR Clause (WRITE Statement Format 4, TRANSACTION Nonsubfile)
INDICATOR Clause (WRITE Statement Format 5, TRANSACTION Subfile)
INDICATOR Attribute (COPY Statement Format 2, DDS Translate)
ΓòÉΓòÉΓòÉ 1.125. INVALID Menu ΓòÉΓòÉΓòÉ
Select which occurrence of INVALID you want to display:
INVALID KEY Phrase (DELETE Statement)
INVALID KEY Phrase (READ Statement, Random Retrieval)
INVALID KEY Phrase (READ Statement, TRANSACTION Subfile)
INVALID KEY Phrase (REWRITE Statement)
INVALID KEY Phrase (REWRITE Statement, TRANSACTION Subfile)
INVALID KEY Phrase (START Statement)
INVALID KEY Phrase (WRITE Statement, Indexed and Relative Files)
INVALID KEY Phrase (WRITE Statement, TRANSACTION Subfile)
ΓòÉΓòÉΓòÉ 1.126. KEY Menu ΓòÉΓòÉΓòÉ
Select which occurrence of KEY you want to display:
RECORD KEY Clause (Indexed File Entries)
RELATIVE KEY Clause (Relative File Entries)
RELATIVE KEY Clause (Transaction File Entries)
ASCENDING/DESCENDING KEY Phrase (OCCURS Clause)
ASCENDING/DESCENDING KEY Phrase (MERGE Statement)
ASCENDING/DESCENDING KEY Phrase (SORT Statement)
INVALID KEY Phrase (DELETE Statement)
INVALID KEY Phrase (READ Statement, Random Retrieval)
INVALID KEY Phrase (READ Statement, TRANSACTION Subfile)
INVALID KEY Phrase (REWRITE Statement)
INVALID KEY Phrase (REWRITE Statement, TRANSACTION Subfile)
INVALID KEY Phrase (START Statement)
INVALID KEY Phrase (WRITE Statement, Indexed and Relative Files)
INVALID KEY Phrase (WRITE Statement, TRANSACTION Subfile)
ΓòÉΓòÉΓòÉ 1.127. LABEL Menu ΓòÉΓòÉΓòÉ
Select which occurrence of LABEL you want to display:
LABEL RECORDS Clause (Formatfile, Database, Disk Files)
LABEL RECORDS Clause (Diskette Files)
LABEL RECORDS Clause (Tapefile Files)
LABEL RECORDS Clause (Printer Files)
LABEL RECORDS Clause (Transaction Files)
ΓòÉΓòÉΓòÉ 1.128. LIKE Menu ΓòÉΓòÉΓòÉ
Select which occurrence of LIKE you want to display:
LIKE Clause (Data Description Entry Format 1, All Data Division Sections)
LIKE Clause (Data Description Entry Format 4, Boolean Data)
ΓòÉΓòÉΓòÉ 1.129. NULL Menu ΓòÉΓòÉΓòÉ
Select which occurrence of NULL you want to display:
NULL Value Clause
SET Statement Format 5 (Pointer Data Item)
ΓòÉΓòÉΓòÉ 1.130. ORGANIZATION Menu ΓòÉΓòÉΓòÉ
Select which occurrence of ORGANIZATION you want to display:
ORGANIZATION IS INDEXED (Indexed File Entries)
ORGANIZATION IS RELATIVE (Relative File Entries)
ORGANIZATION IS SEQUENTIAL (Sequential File Entries)
ORGANIZATION IS TRANSACTION (Transaction File Entries)
ΓòÉΓòÉΓòÉ 1.131. PROCEDURE Menu ΓòÉΓòÉΓòÉ
Select which occurrence of PROCEDURE you want to display:
Procedure Division
USE Compiler-Directing Statement
MERGE Statement
SORT Statement
ΓòÉΓòÉΓòÉ 1.132. PROGRAM Menu ΓòÉΓòÉΓòÉ
Select which occurrence of PROGRAM you want to display:
EXIT PROGRAM Statement
PROGRAM COLLATING SEQUENCE Clause (OBJECT-COMPUTER Paragraph)
ΓòÉΓòÉΓòÉ 1.133. RANDOM Menu ΓòÉΓòÉΓòÉ
Select which occurrence of RANDOM you want to display:
ACCESS IS RANDOM (Indexed File Entries)
ACCESS IS RANDOM (Relative File Entries)
ΓòÉΓòÉΓòÉ 1.134. RECORD Menu ΓòÉΓòÉΓòÉ
Select which occurrence of RECORD you want to display:
RECORD Clause
RECORD KEY Clause (Indexed File Entries)
SAME RECORD AREA Clause (Sequential Files)
SAME RECORD AREA Clause (Indexed and Relative Files)
SAME RECORD AREA Clause (Sort/Merge Files)
DELETE Statement
READ Statement
RETURN Statement
ΓòÉΓòÉΓòÉ 1.135. RECORDS Menu ΓòÉΓòÉΓòÉ
Select which occurrence of RECORDS you want to display:
BLOCK CONTAINS Clause (Formatfile, Database, Disk Files)
BLOCK CONTAINS Clause (Diskette Files)
BLOCK CONTAINS Clause (Tapefile Files)
BLOCK CONTAINS Clause (Printer Files)
DATA RECORDS Clause (Formatfile, Database, Disk Files)
DATA RECORDS Clause (Diskette Files)
DATA RECORDS Clause (Tapefile Files)
DATA RECORDS Clause (Printer Files)
DATA RECORDS Clause (Sort/Merge Files)
DATA RECORDS Clause (Transaction Files)
LABEL RECORDS Clause (Formatfile, Database, Disk Files)
LABEL RECORDS Clause (Diskette Files)
LABEL RECORDS Clause (Tapefile Files)
LABEL RECORDS Clause (Printer Files)
LABEL RECORDS Clause (Transaction Files)
ΓòÉΓòÉΓòÉ 1.136. REMAINDER Menu ΓòÉΓòÉΓòÉ
Select which occurrence of REMAINDER you want to display:
DIVIDE Statement Format 4 (DIVIDE INTO, GIVING, with REMAINDER)
DIVIDE Statement Format 5 (DIVIDE BY, GIVING, with REMAINDER)
ΓòÉΓòÉΓòÉ 1.137. REPLACING Menu ΓòÉΓòÉΓòÉ
Select which occurrence of REPLACING you want to display:
COPY Compiler-Directing Statement
INITIALIZE Statement
INSPECT Statement Format 2
INSPECT Statement Format 3
ΓòÉΓòÉΓòÉ 1.138. RERUN Menu ΓòÉΓòÉΓòÉ
Select which occurrence of RERUN you want to display:
RERUN Clause (I-O-CONTROL Format 1, Sequential Files)
RERUN Clause (I-O-CONTROL Format 2, Indexed and Relative Files)
ΓòÉΓòÉΓòÉ 1.139. REVERSE-VIDEO Menu ΓòÉΓòÉΓòÉ
Select which occurrence of REVERSE-VIDEO you want to display:
ACCEPT Statement Format 7 (Workstation I/O)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.140. REWIND Menu ΓòÉΓòÉΓòÉ
Select which occurrence of REWIND you want to display:
NO REWIND Clause (CLOSE Statement Format 1, Sequential Files)
NO REWIND Clause (OPEN Statement Format 1, Sequential Files)
ΓòÉΓòÉΓòÉ 1.141. SAME Menu ΓòÉΓòÉΓòÉ
Select which occurrence of SAME you want to display:
SAME AREA Clause (Sequential Files)
SAME AREA Clause (Indexed and Relative Files)
SAME AREA Clause (Sort/Merge Files)
SAME RECORD AREA Clause (Sequential Files)
SAME RECORD AREA Clause (Indexed and Relative Files)
SAME RECORD AREA Clause (Sort/Merge Files)
SAME SORT AREA Clause (Sort/Merge Files)
SAME SORT-MERGE AREA Clause (Sort/Merge Files)
ΓòÉΓòÉΓòÉ 1.142. SECTION Menu ΓòÉΓòÉΓòÉ
Select which occurrence of SECTION you want to display:
Configuration Section
File Section
Input-Output Section
Linkage Section
Working-Storage Section
Procedure Division Format 1
ΓòÉΓòÉΓòÉ 1.143. SEQUENTIAL Menu ΓòÉΓòÉΓòÉ
Select which occurrence of SEQUENTIAL you want to display:
ACCESS IS SEQUENTIAL (Sequential File Entries)
ACCESS IS SEQUENTIAL (Indexed File Entries)
ACCESS IS SEQUENTIAL (Relative File Entries)
ACCESS IS SEQUENTIAL (Transaction File Entries)
ORGANIZATION IS SEQUENTIAL (Sequential File Entries)
ΓòÉΓòÉΓòÉ 1.144. SIZE Menu ΓòÉΓòÉΓòÉ
Select which occurrence of SIZE you want to display:
ACCEPT Statement Format 7 (Workstation I/O)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.145. SORT Menu ΓòÉΓòÉΓòÉ
Select which occurrence of SORT you want to display:
SAME SORT AREA Clause (Sort/Merge Files)
SORT Statement
ΓòÉΓòÉΓòÉ 1.146. SUBFILE Menu ΓòÉΓòÉΓòÉ
Select which occurrence of END-ACCEPT you want to display:
READ Statement Format 5 (TRANSACTION Subfile)
REWRITE Statement Format 2 (TRANSACTION Subfile)
WRITE Statement Format 5 (TRANSACTION Subfile)
ΓòÉΓòÉΓòÉ 1.147. TALLYING Menu ΓòÉΓòÉΓòÉ
Select which occurrence of TALLYING you want to display:
INSPECT Statement Format 1 (INSPECT TALLYING)
INSPECT Statement Format 3 (INSPECT TALLYING, REPLACING)
UNSTRING Statement
ΓòÉΓòÉΓòÉ 1.148. TERMINAL Menu ΓòÉΓòÉΓòÉ
Select which occurrence of TERMINAL you want to display:
READ Statement Format 4 (TRANSACTION Nonsubfile)
READ Statement Format 5 (TRANSACTION Subfile)
REWRITE Statement Format 2 (TRANSACTION Subfile)
WRITE Statement Format 4 (TRANSACTION Nonsubfile)
WRITE Statement Format 5 (TRANSACTION Subfile)
ΓòÉΓòÉΓòÉ 1.149. THROUGH/THRU Menu ΓòÉΓòÉΓòÉ
Select which occurrence of THROUGH or THRU you want to display:
ALPHABET Clause (SPECIAL-NAMES Paragraph)
RENAMES Clause
Condition-Name VALUE Clause
EVALUATE Statement
MERGE Statement
PERFORM Statement
SORT Statement
ΓòÉΓòÉΓòÉ 1.150. UNDERLINE Menu ΓòÉΓòÉΓòÉ
Select which occurrence of UNDERLINE you want to display:
ACCEPT Statement Format 7 (Workstation I/O)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.151. UPON Menu ΓòÉΓòÉΓòÉ
Select which occurrence of UPON you want to display:
DISPLAY Statement Format 1 (Data Transfer)
DISPLAY Statement Format 3 (Workstation I/O)
ΓòÉΓòÉΓòÉ 1.152. USAGE Menu ΓòÉΓòÉΓòÉ
Select which occurrence of USAGE you want to display:
USAGE Clause (Data Description Entry Format 1, All Data Division Sections)
USAGE Clause (Data Description Entry Format 4, Boolean Data)
ΓòÉΓòÉΓòÉ 1.153. USING Menu ΓòÉΓòÉΓòÉ
Select which occurrence of USING you want to display:
USING Phrase (Procedure Division Header)
CALL Statement Format 1 (CALL ON OVERFLOW)
CALL Statement Format 2 (CALL ON EXCEPTION)
MERGE Statement
SORT Statement
ΓòÉΓòÉΓòÉ 1.154. VALUE Menu ΓòÉΓòÉΓòÉ
Select which occurrence of VALUE you want to display:
VALUE Clause
VALUE OF Clause (Formatfile, Database, Disk Files)
VALUE OF Clause (Diskette Files)
VALUE OF Clause (Tapefile Files)
VALUE OF Clause (Printer Files)
ΓòÉΓòÉΓòÉ 1.155. WHEN Menu ΓòÉΓòÉΓòÉ
Select which occurrence of WHEN you want to display:
BLANK WHEN ZERO Clause (Data Description Entry Format 1, All Data Division
Sections)
EVALUATE Statement
ΓòÉΓòÉΓòÉ 1.156. No Help Available ΓòÉΓòÉΓòÉ
Help is not directly available from this language element. You can either:
Press Alt+F4 to return to your edit session, and select a related major
keyword, such as a statement keyword or clause keyword, or
Select "Help" from the action bar and then select "Help index" to get a list
of COBOL topics.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The PROGRAM-ID paragraph specifies the name by which the program is known to
the system. It is required and must be the first paragraph in the
Identification Division.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Use AUTHOR to specify the name of the author of the program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Use INSTALLATION to specify the name of the company or location.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Use DATE-WRITTEN to specify the date that the program was written.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Use DATE-COMPILED to specify the date that the program was compiled.
The paragraph name DATE-COMPILED and any comment-entry associated with it
appear in the output program listing with the current date inserted:
DATE-COMPILED. 04/29/92.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Use SECURITY to specify the level of confidentiality of the program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The comment-entry in any of the optional paragraphs may be any combination of
characters from the character set of the computer. The comment-entry should
be written in Area B on one or more lines.
Comment-entries serve only as documentation; they do not affect the meaning
of the program. A hyphen in the indicator area (column 7) is not permitted
in comment-entries.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Computer-name represents a system-name. For example: IBM-AS400.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
MEMORY SIZE is the amount of storage needed to run the object program. The
MEMORY SIZE clause is syntax-checked, but has no effect on the execution of the
program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You can express integer in words, characters, or modules.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Alphabet-name represents the collating sequence.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The segment-number is an integer ranging from 1 through 49.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Environment-name-2 is a 1-byte User Programmable Status Indicator (UPSI)
switch, defined as UPSI-0 through UPSI-7, or as SYSTEM-SHUTDOWN.
UPSI-0 through UPSI-7 represent eight 1-byte program switches. They are COBOL
names that identify program switches defined outside the COBOL program at
object time. Their contents are considered alphanumeric. A value of zero is
off; a value of one is on.
SYSTEM-SHUTDOWN is an internal switch that is set to ON status when the system
operator puts the system in a shutdown-pending state or when the job is
canceled in a controlled manner. The associated ON or OFF condition-names can
be referenced anywhere a condition-name is valid. The program cannot alter
their status.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Mnemonic-name-1 and mnemonic-name-2 follow the rules of formation for
user-defined names. You can use mnemonic-name-1 in ACCEPT, DISPLAY, and WRITE
statements. You can use mnemonic-name-2 only in the SET statement.
Mnemonic-name-2 can be used to qualify cond-1 or cond-2 names.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify ON STATUS IS or OFF STATUS IS, UPSI switches process special
conditions within a program, such as year-beginning or year-ending processing.
For example, at the beginning of the Procedure Division, an UPSI switch can be
tested; if it is ON, the special branch is taken.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You can specify assignment-name-1 or literal-1 as a user-defined word or a
nonnumeric literal. Any assignment-name or literal after the first is
syntax-checked, but has no effect on the execution of the program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
STANDARD-1 specifies the ASCII character set.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
STANDARD-2 specifies the International Reference Version of the ISO 7-bit code
defined in the International Standard 646, 7-bit Coded Character Set for
Information Processing Interchange.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
NATIVE specifies the native character code set. If you omit the alphabet-name
clause, EBCDIC is assumed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
EBCDIC specifies the EBCDIC character set.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
NLSSORT specifies that the Sort sequence (SRTSEQ) and Language identifier
(LANGID) specifications in the compiler options (or implied defaults) are used
to determine the character code set used for all nonnumeric comparisons.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the ALSO phrase, EBCDIC characters specified as literal-1,
literal-3, etc., are assigned to the same position in this collating
sequence.
Each nonnumeric literal associated with a THROUGH or ALSO phrase must be 1
character in length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
CLASS class-name-1 IS provides a means for relating a name to the specified set
of characters listed in that clause. Class-name-1 can be referenced only in a
class condition. The characters specified by the values of the literals in
this clause define the exclusive set of characters of which this class-name-1
consists.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the THROUGH phrase, the contiguous EBCDIC characters beginning
with the character specified by literal-1 and ending with the character
specified by literal-2 are assigned successively ascending positions in this
collating sequence. This sequence may be either ascending or descending within
the original EBCDIC sequence.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The CURRENCY SIGN IS clause specifies the currency symbol to be used in the
PICTURE clause.
When you omit the CURRENCY SIGN clause, you can use only the dollar sign ($)
as the PICTURE symbol for the currency sign.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
DECIMAL-POINT IS COMMA exchanges the functions of the period and the comma in
PICTURE character strings and in numeric literals.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The CONSOLE IS CRT clause treats any ACCEPT or DISPLAY statement without
format-specific phrases (such as LOCAL-DATA or PIP-DATA) as an extended ACCEPT
or DISPLAY statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The CURSOR IS data-name-1 clause specifies the data item that will contain the
cursor address used by the ACCEPT statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The CRT STATUS IS data-name-2 clause specifies a data item into which a status
value returns after an extended ACCEPT statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
data-name-2
Data-name-2 must be a 6-byte alphanumeric field or a 6-byte unsigned zoned
integer, and it must be described in the WORKING-STORAGE SECTION of the
program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The SELECT clause chooses a file in the COBOL program to be associated with an
external medium.
When file-name specifies a sort or a merge file, only the ASSIGN clause may
follow the SELECT clause.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You may specify SELECT OPTIONAL only for files opened in the input, I-O, or
extend mode.
You must specify SELECT OPTIONAL for those input files that are not necessarily
present each time the object program is executed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name must be an FD or SD entry in the Data Division. File-name must
conform to the rules for a COBOL user-defined name, must contain at least one
alphabetic character, and must be unique within this program.
When file-name specifies a sort or a merge file, only the ASSIGN clause may
follow the SELECT clause.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Device specifies the type of device that the file will use. The compiler checks
whether the file is described and used in a consistent manner.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Device specifies the type of device that the file will use. For TRANSACTION
files device must be WORKSTATION.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Attribute can be SI, which indicates that a separate indicator area is
specified in the DDS for a FORMATFILE or WORKSTATION file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The attribute -SI specifies the file level option for a separate indicator
area. If you code -SI, then -file-name must refer to a file that has the file
level keyword INDARA specified in its DDS.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
-file-name is a 1- through 10-character external name of the display file or
ICF file specified on the create device file commands CRTDSPF or CRTICFF.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The RESERVE clause reserves input-output areas. It is syntax-checked, but is
treated as documentation.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ORGANIZATION clause identifies the logical structure of the file. The
logical structure is established at the time the file is created and cannot
subsequently be changed.
If you omit the ORGANIZATION clause, the compiler assumes ORGANIZATION IS
SEQUENTIAL.
For database files, the ORGANIZATION clause indicates the current program usage
of the file in the program. Therefore, the same database file can use
SEQUENTIAL, INDEXED (assuming a keyed sequence access path exists), or RELATIVE
in the ORGANIZATION clause. This is true regardless of what other programs that
use this file specify.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the ORGANIZATION IS INDEXED clause, the position of each
logical record in the file is determined by the key sequence access path
created with the file and maintained by the system. The access path is based on
an embedded key within the file's records.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the ORGANIZATION IS RELATIVE clause, the position of each
logical record in the file is determined by its relative record number within
the arrival sequence access path.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ORGANIZATION IS TRANSACTION clause signifies interaction between a COBOL
program and either a workstation user or another system.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ACCESS MODE clause defines the manner in which the records of the file are
made available for processing. If you do not specify the ACCESS MODE clause,
sequential access is assumed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Sequential-Access Mode allows the reading and writing of records in a serial
manner; the order of reference is determined implicitly by the position of a
record in the file.
In Format 1 (Sequential File Entries), records in the file are accessed in
the sequence established when the file is created or extended. Format 1
supports only sequential access.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Sequential-Access Mode allows the reading and writing of records in a serial
manner; the order of reference is determined implicitly by the position of a
record in the file.
In Format 2 (Indexed File Entries), records in the files are accessed in the
sequence of ascending record key values according to the collating sequence
of the file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify ACCESS IS SEQUENTIAL, the format name contained in the
format name field of the control area specifies which record was accessed.
When you specify ACCESS IS SEQUENTIAL for a TRANSACTION file, do not specify
the RELATIVE KEY data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Random-Access Mode allows the reading and writing of records in a
programmer-specified manner; the control of successive references to the file
is expressed by specifically defined, user-supplied keys.
In Format 2 (Indexed File Entries), the value placed in a record key data
item specifies the record to be accessed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Random-Access Mode allows the reading and writing of records in a
programmer-specified manner; the control of successive references to the file
is expressed by specifically defined, user-supplied keys.
In Format 3 (Relative File Entries), the value placed in a relative key data
item specifies the record to be accessed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Dynamic-Access Mode allows a specific input-output to determine the access
mode. Therefore, records may be processed sequentially or randomly.
In Format 2 (Indexed File Entries), records in the file may be accessed
sequentially or randomly, depending on the form of the specific input-output
request.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Dynamic-Access Mode allows a specific input-output request to determine the
access mode. Therefore, records may be processed sequentially and/or
randomly.
In Format 3 (Relative File Entries), records in the file may be accessed
sequentially or randomly, depending on the form of the specific input-output
request.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Dynamic-Access Mode allows a specific input-output request to determine the
access mode. Therefore, records may be processed sequentially or randomly.
Random accessing of a TRANSACTION file is only valid if you are performing
subfile processing. For subfile processing, you must specify ACCESS IS
DYNAMIC.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The RELATIVE KEY clause identifies a data-name that specifies the relative
record number for a specific logical record within a relative file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The RELATIVE KEY clause specifies the relative record number for a specific
record in a subfile.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-3 is the RELATIVE KEY data item and you must define it as an unsigned
integer. It cannot be scaled. You must not define the data item in a record
description entry associated with the TRANSACTION file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The RECORD KEY clause specifies the data item within the record that is the
record key for an indexed file. Each record in the file must have a unique
record key value.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Define data-name-4 as an unsigned integer data item whose description does not
contain the PICTURE symbol P. Do not define data-name-4 in a record
description entry associated with this relative file. That is, the RELATIVE KEY
is not a part of the record.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The FILE STATUS clause monitors the execution of each input-output operation on
the file. When you specify the FILE STATUS clause, the system moves a value
into the status key data item after each input-output request that explicitly
or implicitly refers to this file. The value indicates the status of execution
of the statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You can define the status key data item in the Data Division as either:
- A 2-character alphanumeric item.
- A 2-character numeric data item, with explicit or implicit USAGE IS
DISPLAY. It is treated as an alphanumeric item.
You cannot define data-name-1 in the File Section.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The CONTROL-AREA clause specifies device-dependent and system-dependent
information used to control input/output operations for TRANSACTION files.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The RERUN clause specifies that checkpoint records are to be taken. Subject
to the restrictions given with each phrase, you can specify more than one
RERUN clause.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The MULTIPLE FILE TAPE clause specifies that two or more files share the same
physical reel of tape.
This clause is syntax-checked, but it has no effect on the running of the
program. The function is provided by the system through the CRTTAPF, CHGTAPF,
and OVRTAPF CL commands.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Assignment-name-1 can be any user defined word.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A checkpoint record is to be written for every integer-1 record in
file-name-2 that is processed.
When you specify multiple integer-1 RECORDS phrases, no two of them may
specify the same file-name-2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The SAME AREA clause specifies that two or more files, that do not represent
sort or merge files, are to use the same main storage area during processing.
The files named in a SAME AREA clause need not have the same organization or
access.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You must specify file-name-3 and file-name-4 in the FILE-CONTROL paragraph of
the same program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You must specify file-name-3 and file-name-4 in the FILE-CONTROL paragraph of
the same program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The SAME SORT-MERGE AREA clause is equivalent to the SAME SORT AREA clause. The
SAME SORT-MERGE AREA clause is syntax-checked, but has no effect on the
execution of the program.
When you specify the SAME SORT-MERGE AREA clause, at least one file-name
specified must name a sort or merge file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The SAME SORT AREA clause is equivalent to the SAME SORT-MERGE AREA clause.
The SAME SORT AREA clause is syntax-checked, but has no effect on the execution
of the program.
When you specify the SAME SORT AREA clause, at least one file-name specified
must name a sort file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-2 must be a sequentially organized file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A file description entry represents the highest level of organization in the
File Section. It provides information about the physical structure and
identification of a file, and gives the record names associated with that file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A record description entry is a data description entry (here used to refer to
both data and record description entries) that specifies the characteristics
of a data item.
In the File Section, a record description entry is a set of data description
entries that describe the particular records contained within a file.
You can specify more than one record description entry; each is an
alternative description of the same record storage area.
Data areas described in the File Section are not available for processing
unless the file containing the data area is open.
You can also specify the record description entry for a file by using the
Format 2 COPY statement (DD, DDR, DDS, DDSR option). This allows the field
descriptions for a file to be exactly as defined in DDS. Also, programs are
easier to write because you maintain the record format description in one
place.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A record description entry is a data description entry (here used to refer to
both data and record description entries) that specifies the characteristics
of a data item.
Data entries in the Working-Storage Section that bear a definite hierarchic
relationship to one another must be grouped into records structured by level
number.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A data item description entry is a data description entry (here used to refer
to both data and record description entries) that specifies the
characteristics of a data item.
Data item description entries are independent items in the Working-Storage
Section that bear no hierarchic relationship to one another and need not be
grouped into records, provided that they do not need to be further
subdivided. Instead, they are classified and defined as independent
elementary items. Each is defined in a separate data item description entry
that begins with either the level number 77 or 01.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A record description entry is a data description entry (here used to refer to
both data and record description entries) that specifies the characteristics
of a data item.
Record description entries and data item description entries in the Linkage
Section provide names and descriptions, but storage within the program is not
reserved because the data area exists elsewhere.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A data-item-description entry is a data description entry (here used to refer
to both data and record description entries) that specifies the
characteristics of a data item.
Record description entries and data item description entries in the Linkage
Section provide names and descriptions, but storage within the program is not
reserved because the data area exists elsewhere.
The ADDRESS OF special register exists for each record (01 or 77) in the
Linkage Section, except for those records that redefine each other. In such
cases, the ADDRESS OF special register is similarly redefined. The ADDRESS
OF special register is implicitly defined USAGE IS POINTER.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1 identifies an alternative grouping of data items.
You cannot use data-name-1 as a qualifier; it can be qualified only by the
names of level indicator entries or level-01 entries.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name explicitly identifies the data being described. If you specify a
data-name, it identifies a data item used in the program. The data-name must
be the first word following the level-number.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
FILLER is a data item that is not explicitly referred to in a program. If you
specify FILLER (an optional keyword), it must be the first word following the
level-number.
If you omit the data-name or the keyword FILLER, the data item being described
is treated as though FILLER had been specified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-2 represents the exact number of occurrences. Integer-2 must be between
1 and 3 000 000 bytes.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-2 must be the name of the subject entry, or the name of an entry
subordinate to the subject entry.
If data-name-2 names the subject entry, that entire entry becomes the
ASCENDING/DESCENDING KEY, and is the only key that may be specified for this
table element.
If data-name-2 does not name the subject entry, then data-name-2:
Must be subordinate to the subject of the table entry itself
Must not be subordinate to, or follow, any other entry that contains an
OCCURS clause
Must not contain an OCCURS clause.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INDEXED BY phrase specifies the indexes that can be used with this table.
The INDEXED BY phrase is required if you use indexing to refer to this table
element.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Index-name-1 must follow the rules for the formation of user-defined words. At
least 1 character must be alphabetic.
Each index-name specifies an index to be created by the compiler for use by the
program. These index-names are not data-names and are not identified elsewhere
in the COBOL program. Instead, they can be regarded as private special
registers for the use of this object program only. As such, they are not data,
or part of any data hierarchy. Each index-name must be unique.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-1 represents the minimum number of occurrences. Integer-1 must be
greater than or equal to zero and less than integer-2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-2 represents the maximum number of occurrences. Integer-2 must be no
more than 32 767.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The OCCURS DEPENDING ON clause specifies variable-length tables.
The object of the OCCURS DEPENDING ON clause must not occupy any storage
position within the range of any table, that is, any storage position from the
first character position in the table through the last character position in
the table.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1 specifies the object of the OCCURS DEPENDING ON clause, that is,
the data item whose current value represents the current number of occurrences
of the subject item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1, FILLER identifies an alternate description for the same area and
is the redefining item or the REDEFINES subject.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-2 is the redefined item or the REDEFINES object.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
FILLER identifies an alternate description for the same area and is the
redefining item or the REDEFINES subject.
Specifying FILLER does not affect the running of the program; the program runs
as though nothing were specified.
When you specify the REDEFINES clause, it must immediately follow data-name or
FILLER, if either is specified. If you do not specify data-name or FILLER, the
REDEFINES clause must immediately follow the level-number.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1 identifies an alternative grouping of data items.
A level-66 entry cannot rename a level-01, level-77, level-88, or another
level-66 entry.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-2 and data-name-3 identify the original grouping of elementary data
items; that is, they must name elementary or group items within the associated
level-01 entry and must not be the same data-name. Both data-names may be
qualified.
The OCCURS clause must not be specified in the data entries for data-name-2 and
data-name-3, or for any group entry to which they are subordinate.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name refers to an elementary item, a group item, or an index-name.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer specifies the difference in length between the new and existing items.
If a blank or a + precedes the integer, the new item is longer. If a -
precedes the integer, the new item is shorter.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The LEFT phrase specifies that the elementary item is to be positioned so that
it will begin at the left character position of the natural boundary in which
the elementary item is placed.
When specified, the LEFT phrase is syntax checked, but has no effect on the
execution of the program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The RIGHT phrase specifies that the elementary item is to be positioned so that
it will terminate at the right character position of the natural boundary in
which it has been placed.
When specified, the RIGHT phrase is syntax-checked, but has no effect on the
execution of the program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Specify BINARY for binary data items. Such items have a decimal equivalent
consisting of the decimal digits 0 through 9, plus a sign. Negative numbers are
represented as the two's complement of the positive number with the same
absolute value.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Specify the PACKED-DECIMAL clause for internal decimal items. Such items appear
in storage in packed decimal format. There are 2 digits for each character
position, except for the trailing character position, which is occupied by the
low-order digit and the sign. Such an item may contain any of the digits 0
through 9, plus a sign, representing a value not exceeding 18 decimal digits.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Specify the COMPUTATIONAL phrase for internal decimal items. Such an item
appears in storage as 2 digits per byte, with the sign contained in the 4
rightmost bits of the rightmost byte. An internal decimal item can contain any
of the digits 0 through 9 plus a sign. If the PICTURE of an internal decimal
item does not contain an S, the sign is occupied by a bit configuration that is
interpreted as positive.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
COMPUTATIONAL-3 or COMP-3 (internal decimal) is the equivalent of
PACKED-DECIMAL.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
COMPUTATIONAL-4 or COMP-4 (binary) is the equivalent of BINARY.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
DISPLAY specifies that the data item is stored in character form, 1 character
for each 8-bit byte. USAGE IS DISPLAY is valid for items that are:
Alphabetic
Alphanumeric
Alphanumeric-edited
Numeric-edited
Boolean
External decimal (numeric)
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A data item defined with the INDEX phrase is an index data item.
An index data item is a 4-byte elementary item (not necessarily connected with
any table) that you can use to save index-name values for future reference. You
can use the SET statement to assign an index-name value to an index data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A data item defined with the POINTER phrase is a pointer data item.
A pointer data item is a 4-byte elementary item that may be used to accomplish
limited base addressing. Pointer data items may be compared for equality or
moved to other pointer data items.
You may only use a pointer data item:
In the USING phrase of a CALL statement or the Procedure Division header
In Format 5 of a SET statement
In a relation condition.
The POINTER phrase may be specified for data items with any level number except
level 88.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A condition-name is a user-specified name that associates a single value,
multiple values, and/or ranges of values with a conditional variable.
A conditional variable is a data item that can assume one or more values that
can in turn be associated with a condition-name.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify literal-1 alone, the condition-name is associated with a
single value.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify THROUGH literal-2, the condition-name is associated with at
least one range of values, and literal-1 must be less than literal-2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1 explicitly identifies the data being described. If you specify
data-name-1, it identifies a data item used in the program. If specified,
data-name-1 must be the first word following the level-number.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
FILLER is a data item that is not explicitly referred to in a program. If you
specify FILLER (an optional keyword), it must be the first word following the
level-number.
If you omit data-name-1 or the keyword FILLER, the data item being described is
treated as though FILLER had been specified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A PICTURE containing a single 1 defines an elementary Boolean data-name.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A single 1 is a character position that contains a Boolean value of B"1" or
B"0". Usage must be explicitly or implicitly defined as DISPLAY.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
USAGE must be defined implicitly or explicitly as DISPLAY.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-4 specifies the object of the OCCURS DEPENDING ON clause, that is,
the data item whose current value represents the current number of occurrences
of the subject item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If indicator fields are in a separate indicator area, the INDICATOR clause
associates an indicator defined in DDS with a Boolean data item.
If indicator fields are in the record area, the INDICATOR clause is
syntax-checked, but is treated as documentation.
You must specify the INDICATOR clause at an elementary level only. INDICATOR,
INDICATORS, and INDIC are equivalent.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-3 must be a value of 1 through 99.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The VALUE clause specifies the initial content of a Boolean data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The allowable values for Boolean literals are B"0", B"1", and ZERO.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For a STANDARD file, labels conforming to system specifications exist.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For an OMITTED file, no labels exist.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The CODE-SET clause specifies the character code used to represent data on
the external media. When you specify the CODE-SET clause, an alphabet-name
identifies the character code convention used to represent data on the
input-output device.
The CODE-SET clause also specifies the algorithm for converting the character
codes on the input-output medium from/to the internal EBCDIC character set.
When you specify the CODE-SET clause for a file, all data in this file must
have USAGE DISPLAY, and, if signed numeric data is present, it must be
described with the SIGN IS SEPARATE clause.
You can specify the CODE-SET clause for all files with sequential
organization.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You must define alphabet-name-1 in the SPECIAL-NAMES paragraph as:
STANDARD-1 (for ASCII-encoded files)
STANDARD-2 (for ISO 7-bit encoded files)
NATIVE (for EBCDIC-encoded files).
When you specify NATIVE, the CODE-SET clause is syntax-checked, but it has no
effect on the execution of the program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The BLOCK CONTAINS clause specifies the size of the physical records.
If the records in ther file are not blocked, you may omit the BLOCK CONTAINS
clause. Thus, you can omit this clause when each physical record contains only
one complete logical record.
For diskette files, this clause is syntax-checked only.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-1, integer-2 must be nonzero unsigned integers. The value of integer-2
only specifies the number CHARACTERS or RECORDS.
Integer-2 specifies the exact character size of the physical record, and must
include any control bytes or padding contained in the physical record.
(Logical records do not include padding.)
If integer-2 is zero, the system default blocking factor applies.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The CHARACTERS phrase specifies the number of character positions required to
store the physical record, independent of the USAGE the characters have within
the data record.
The CHARACTERS phrase is the default. You must specify CHARACTERS when the
physical record contains padding.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The RECORDS phrase specifies the number of logical records contained in each
physical record.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Format 1 of the RECORD CONTAINS clause specifies the number of character
positions for fixed-length records. Integer-3 must be an unsigned integer that
specifies the number of character positions contained in each record in the
file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Format 2 of the RECORD CONTAINS clause specifies the number of character
positions for either fixed- or variable-length records. Integer-4, integer-5
must be unsigned integers. Integer-4 specifies the size of the smallest data
record, and integer-5 specifies the size of the largest data record.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Format 1 (with integer-4 only) of the RECORD CONTAINS clause specifies the
number of character positions for fixed-length records. Integer-4 must be an
unsigned integer that specifies the number of character positions contained in
each record in the file.
Format 2 (with both integer-3 and integer-4) of the RECORD CONTAINS clause
specifies the number of character positions for either fixed- or
variable-length records. Integer-3, integer-4 must be unsigned integers.
Integer-3 specifies the size of the smallest data record, and integer-4
specifies the size of the largest data record.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The LABEL RECORDS clause indicates the presence or absence of labels.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The VALUE OF clause describes an item in the label records associated with this
file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1 should be qualified when necessary but cannot be subscripted. You
must describe it in the Working-Storage Section but not with the USAGE IS INDEX
clause.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 may be numeric or nonnumeric, or a figurative constant of category
numeric or nonnumeric.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The DATA RECORDS clause is syntax-checked, but it is only documentation for the
names of data records associated with this file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-2 represents the names of record description entries associated with
this file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
All integers must be unsigned, and all data-names must be described as unsigned
integer data items.
Data-name-3, integer-6 represent the number of lines that can be written and/or
spaced on this logical page. The area of the page that these lines represent is
called the page body. The value must be greater than zero.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-7 or the value of the data item in data-name-4 specifies the first line
number of the footing area within the page body. The footing line number must
be greater than zero, but not greater than the last line of the page body. The
footing area extends between those two lines.
All integers must be unsigned integer data items.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-8 or the value of the data item in data-name-5 specifies the number of
lines in the top margin of the logical page. The value can be zero.
All integers must be unsigned integer data items.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-9 or the value of the data item in data-name-6 specifies the number of
lines in the bottom margin of the logical page. The value can be zero.
All integers must be unsigned integer data items.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The LINAGE clause specifies the depth of a logical page in terms of number of
lines. It also may specify both the line number at which the footing area
begins and the top and bottom margins of the logical page. (The logical page
and the physical page may not be the same size).
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-3 must be an unsigned integer that specifies the number of character
positions contained in each record in the file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-4, integer-5 must be unsigned integers. Integer-4 specifies the size of
the smallest data record, and integer-5 specifies the size of the largest data
record.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You cannot use data-name-1 as a qualifier.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The CODE-SET clause specifies the character code used to represent data on a
magnetic tape file. When you specify CODE-SET, an alphabet-name identifies the
character code convention used to represent data on the input-output device.
The CODE-SET clause is valid only for magnetic tape files.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name must follow the level indicator (FD or SD), and must be the same as
that specified in the associated SELECT clause. File-name must adhere to the
rules of formation for a user-defined word; at least one character must be
alphabetic. File-name must be unique within this program.
One or more record description entries must follow file-name. When you specify
more than one record description entry, each entry implies a redefinition of
the same storage area.
The clauses that follow file-name are optional; they may appear in any order.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1 is a user-defined word that names a data item described in a data
description entry. When you use it in the general formats, data-name-1
represents a word that must not be reference-modified, subscripted, or
qualified unless specifically permitted by the rules for the format.
Data items defined in the Linkage Section of the called program may be
referenced within the Procedure Division of that program if, and only if,
they satisfy any of the following conditions:
- They are operands of the USING phrase of the Procedure Division header.
- They are defined with a REDEFINES or RENAMES clause, the object of which
satisfies the above conditions.
- They are items subordinate to any item that satisfies the condition in the
rules above.
- They are condition-names or index-names associated with data items that
satisfies the above conditions.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A user defined word that identifies a section. A referenced section-name,
because it cannot be qualified, must be unique within the program in which it
is defined.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A section-header optionally followed by one or more paragraphs.
Section-header: A section-name followed by the keyword SECTION, optionally
followed by a segment-number, followed by a separator period.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Segment-number is an integer varying in value from 1 through 49.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A user-defined word that identifies a paragraph. A paragraph-name, because
it can be qualified, need not be unique. Paragraph-name must begin in Area
A.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
End each Declarative Section with another section-name followed by a USE
sentence, or with the keywords END DECLARATIVES.
END DECLARATIVES must begin in Area A and must be followed by a separator
period. No other text may appear on the same line.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name is a user-defined word that names a data item described in a data
description entry. When you use it in the general formats, data-name
represents a word that must not be reference-modified, subscripted or qualified
unless specifically permitted by the rules for the format.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Paragraph-name is a user-defined word that identifies a paragraph. A
paragraph-name, because it can be qualified, need not be unique.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier is the receiving data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Mnemonic-name must be associated in the SPECIAL-NAMES paragraph with an
input/output device: a workstation (REQUESTOR), or a system operator's message
queue (CONSOLE or SYSTEM-CONSOLE).
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Environment-name may be specified in place of mnemonic-name. Valid
environment-names are CONSOLE and SYSIN.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
DATE has the implicit PICTURE 9(6).
The sequence of data elements (from left to right) is:
2 digits for year of century
2 digits for month of year
2 digits for day of month
Thus 25 December 1991 is expressed as:
911225
The conceptual data items DATE, DAY, and TIME implicitly have USAGE DISPLAY.
Since they are conceptual items, they cannot be described in the COBOL program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
DAY has the implicit PICTURE 9(5).
The sequence of data elements (from left to right) is:
2 digits for year of century
3 digits for day of year
Thus 25 December 1991 is expressed as:
91359
The conceptual data items DATE, DAY, and TIME implicitly have USAGE DISPLAY.
Since they are conceptual items, they cannot be described in the COBOL program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
TIME has the implicit PICTURE 9(8).
The sequence of data elements (from left to right) is:
2 digits for hour of day
2 digits for minute of hour
2 digits for second of minute
2 digits for hundredths of second
Thus 2:41 P.M. is expressed as:
14410000
The conceptual data items DATE, DAY, and TIME implicitly have USAGE DISPLAY.
Since they are conceptual items, they cannot be described in the COBOL program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier is any fixed-length group item or an elementary alphabetic,
alphanumeric, or external decimal item. The file must be defined in an FD
entry, and must be open prior to the execution of the ACCEPT statement. If the
file is not open, the contents of identifier remain unchanged.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Mnemonic-name must be associated with an environment-name of OPEN-FEEDBACK or
I-O-FEEDBACK in the SPECIAL-NAMES paragraph.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name, in the FOR phrase, specifies the file from which the feedback
information comes. When you do not specify the FOR phrase, the feedback
information is from the last file opened or used in an input or output
operation.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 is the receiving data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Mnemonic-name must be associated with an environment-name of LOCAL-DATA in the
SPECIAL-NAMES paragraph.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the FOR phrase, it is syntax checked during compilation but
treated as a comment during execution.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The value of literal or identifier-2 indicates the program device associated
with the local data area.
If you specify literal, it must be nonnumeric and 10 characters or less in
length. If you specify identifier-2, it must refer to an alphanumeric data
item, 10 characters or less in length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Mnemonic-name must be associated with an environment-name of PIP-DATA in the
SPECIAL-NAMES paragraph.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Any imperative statement specified in the ON EXCEPTION phrase is processed if
the PIP data area does not exist (the job is not a prestart job).
In the absence of the ON EXCEPTION phrase, a run-time message is issued if the
PIP data area does not exist.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Any imperative statement specified in the NOT ON EXCEPTION phrase is processed
if the PIP data area exists (the job is a prestart job).
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Mnemonic-name must be associated with an environment-name of ATTRIBUTE-DATA in
the SPECIAL-NAMES paragraph.
You can only use the ATTRIBUTE-DATA mnemonic name to obtain information about
a program device acquired by a TRANSACTION file. Attribute data does not
provide information about the status of a completed or attempted I-O operation.
Use the Format 3 ACCEPT statement with the I-O-FEEDBACK or OPEN-FEEDBACK
mnemonic names to obtain information about I-O operations.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you omit both FOR phrases:
The default TRANSACTION file is being used, and the ACCEPT statement uses the
program device from which a READ, WRITE, REWRITE, or ACCEPT (Attribute Data)
operation on the default file was most recently performed.
If the only prior operation on the file was an OPEN, the ACCEPT statement
uses the program device implicitly acquired by the file when the file was
opened.
A program device must have been acquired in order to use this format of the
ACCEPT statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 or the contents of identifier-2 indicates the program device name for
which attribute data is made available.
If you specify literal-1, it must be nonnumeric and 10 characters or less in
length. The contents of identifier-2, if specified, must be an alphanumeric
data item 10 characters or less in length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-1 is the TRANSACTION file with which the interactive device is
associated.
If file-name-1 is not specified, the default file for the ACCEPT statement is
the first TRANSACTION file specified in a SELECT clause of the FILE-CONTROL
paragraph.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 is a data item whose value may be updated.
Fields accepted or displayed require an attribute byte before and after the
field. For this reason, you cannot use line 1 and column 1 for data because
that position is required for the first display attribute. The lowest position
that you can use on the screen for data is line 1, column 2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The AT phrase indicates the absolute address on the screen at which the ACCEPT
operation is to start. If you do not specify the AT phrase, the ACCEPT
operation starts at line 1, column 2. The AT phrase does not indicate the
starting position of the initial display attribute.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The LINE phrase specifies the line number at which the screen item starts on
the screen. The LINE and COLUMN phrases can appear in any order.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 and integer-1 must be unsigned numeric integers with a value
greater than or equal to zero. If the value for LINE or COLUMN is negative,
the absolute value is taken. Identifier-2 or integer-1 is moved into a PIC
9(3) number.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The COLUMN phrase specifies the column number at which the screen item starts
on the screen. The LINE and COLUMN phrases can appear in any order.
COL is an abbreviation for COLUMN.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 must be a PIC 9(4) or a PIC 9(6) field. Integer-2 must be a 4- or
6-byte numeric field. If identifier-3 or integer-2 is 4 digits long, the first
2 digits specify the line, and the second 2 digits specify the column. If
identifier-3 or integer-2 is 6 digits long, the first 3 digits specify the
line, and the second 3 digits specify the column.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The FROM CRT phrase indicates that the ACCEPT statement is extended.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The MODE IS BLOCK phrase indicates that the identifier is treated as an
elementary item; even if it is a group item, it is accepted as one item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The WITH phrase allows you to specify options for the ACCEPT operation. If you
specify more than one item prior to this phrase, only the item immediately
before the phrase is affected by it.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When a field has been filled by operator input, the AUTO phrase automatically
steps the cursor to the next input field, rather than waiting for a terminating
character to be entered. If the field is the last in a group, AUTO-SKIP acts as
if the ENTER key had been pressed. You can use AUTO and AUTO-SKIP
interchangeably.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the BELL phrase, an audible alarm sounds each time the item
containing this phrase is accepted.
You can use BELL and BEEP interchangeably.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the BLINK phrase, the screen item blinks when it appears on the
screen.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the FULL phrase, the operator must either leave the screen item
completely empty or fill it entirely with data. The FIELD-EXIT, FIELD+, and
FIELD- keys are not allowed. Any attempt to use the delete key on the data
within the input field, followed by the enter key, is also not allowed. The
FULL phrase can be satisfied by data that is initially displayed.
If this phrase is specified at a group level, it applies to all suitable
subordinate elementary items.
The FULL phrase is effective during the execution of any ACCEPT statement.
You can use FULL and LENGTH-CHECK interchangeably.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the HIGHLIGHT phrase, the screen item is in high-intensity mode
when it appears on the screen.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Use the REQUIRED phrase to ensure that the field does not remain empty.
For alphanumeric items, this means that the field must contain at least one
character other then a space or a hexadecimal zero. For numeric items, the
field must contain a value other than zero.
If a field remains empty when this phrase is specified, a run-time message will
be issued which requires the operator to press the reset key and then re-enter
the data.
You can use REQUIRED and EMPTY-CHECK interchangeably.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the REVERSE-VIDEO phrase, the screen item is displayed in
reverse image.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The SECURE phrase prevents operator-keyed data from appearing on the screen.
You may specify this phrase on a group screen item, in which case it applies to
all suitable elementary items which are subordinate to that item. When you
specify the SECURE phrase, only spaces and the cursor appear on the screen.
You can use SECURE and NO-ECHO interchangeably.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the UNDERLINE phrase, the screen item is underlined when it
appears on the screen.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the RIGHT-JUSTIFY phrase, operator-keyed characters are moved on
the screen to the rightmost character positions of the field. Trailing spaces
and trailing hexadecimal zeros are removed.
This phrase affects only non-edited data items. It takes effect upon display
of the initial data in the data item and also upon termination of the ACCEPT
operation. This is the only way in which numeric data is handled.
If you defined the data item with the JUSTIFIED RIGHT clause in the DATA
DIVISION, the data item is treated as if you had specified the RIGHT-JUSTIFY
phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The SPACE-FILL phrase pertains to non-edited data items, and converts trailing
hexadecimal zeros to spaces. The items appear on the screen with
zero-suppression in all character positions. This takes effect upon display of
initial data in the data item and again when the ACCEPT operation into the data
item terminates. This phrase has no affect on edited fields.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the TRAILING-SIGN phrase, the operational sign appears in the
rightmost character position of the field. This takes effect upon display of
initial data in the data item and also upon termination of the ACCEPT
operation. This phrase affects only signed, non-edited numeric data items. If
you do not specify this phrase, the sign precedes the number.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the UPDATE phrase, the current contents of the data item are
displayed before the operator is prompted to key in any new data. The initial
data is then treated as though it were operator-keyed. If you do not specify
the UPDATE phrase, and if the SECURE phrase was not coded, the initial data
will be displayed.
UPDATE is in effect by default unless you code the SECURE phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the ZERO-FILL phrase, non-edited items appear on the screen with
no zero-suppression. For left-justified data, trailing spaces and trailing
hexadecimal zeros are converted to zeros. For right-justified data, leading
spaces are converted to zeros. This takes effect upon display of initial data
in the data item and again when the ACCEPT operation into the data item
terminates. It has no affect on edited fields.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
This phrase is syntax checked but is treated as documentation by the compiler.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the ON EXCEPTION phrase, imperative-statement-1 is executed if
the ACCEPT operation finishes with anything other than a normal completion
(that is, if CRT Status Key 1 is other than zero.
Using the ON EXCEPTION phrase does not prevent the generation of a run-time
message for such conditions as workstation boundaries or out-of-screen ranges.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the NOT ON EXCEPTION phrase, imperative-statement-2 is executed
if the ACCEPT operation finishes with a normal completion.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The literal or the contents of the identifier specify the program device to be
acquired by the specified file.
If you specify the literal, it must be nonnumeric and 10 characters in length.
If you specify the identifier, it must be an alphnumeric data item 10
characters or less in length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name must be the name of a file with an organization of TRANSACTION, and
the file must be open when the ACQUIRE statement runs.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In Format 1, identifiers must name elementary numeric items.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 must be a numeric literal.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In Format 2, identifiers must name an elementary numeric item, except when
following the word GIVING. Each identifier following the word GIVING must
name an elementary numeric or numeric-edited item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal must be numeric.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the GIVING phrase, all subsequent identifiers must name an
elementary numeric or numeric-edited item. Any data items following the word
GIVING are not included in the composite of operands.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The CORRESPONDING phrase (CORR) allows ADD, SUBTRACT, and MOVE operations to be
performed on elementary data items of the same name if the group items to which
they belong are specified. Both identifiers following the keyword CORRESPONDING
must name group items.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In Format 3, identifiers must name a group item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-1 must name a Procedure Division paragraph that contains only
one sentence: a GO TO statement without the DEPENDING ON phrase.
The ALTER statement modifies the GO TO statement in the paragraph named by
procedure-name-1. Subsequent executions of the modified GO TO statements
transfer control to procedure-name-2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-2 must name a Procedure Division section or paragraph.
The ALTER statement modifies the GO TO statement in the paragraph named by
procedure-name-1. Subsequent executions of the modified GO TO statements
transfer control to procedure-name-2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 must be an alphanumeric data item. Its contents must follow the
rules for formation of a program-name. The first 10 characters of identifier-1
are used to associate the calling program with the called subprogram.
If you specify identifier-1, the call is classified as a dynamic call because
the PROGRAM-ID is resolved at run time each time a call is made.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 must be nonnumeric, uppercase, and must follow the rules for
formation of a program-name. The first 10 characters of the literal are used to
associate the calling program with the called subprogram. The literal must
specify the program-name of the called subprogram.
If you specify literal-1, the call is classified as a static call because the
PROGRAM-ID is determined at compile time.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The USING phrase makes data items defined in a calling program available to a
called subprogram.
Include the USING phrase in the CALL statement only if there is a USING phrase
in the Procedure Division header of the called subprogram. The number of
operands in each USING phrase must be identical.
The order of appearance of USING identifiers in both the calling program and
the called subprogram determines the relationship of single sets of data
available to both programs. The relationship is positional and not by name.
Corresponding identifiers must contain the same number of characters, although
their data descriptions may be different.
Each USING identifier names data items available to the calling program that
may be referred to in the called program. A given identifier may appear more
than once. These items are defined in any Data Division section.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You must define identifier-2 as a level-01, level-77, or elementary data item
in the File Section, Working-Storage Section or Linkage Section.
It can be:
A data item of any level in the Data Division
A pointer data item (an item defined implicitly or explicitly as USAGE IS
POINTER).
You can specify up to 30 occurrences of this identifier.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The value of a parameter passed through the BY REFERENCE phrase is evaluated
when the CALL statement is executed. The value is assigned to the
corresponding parameter of the called subprogram. The number of characters in
each parameter must be equal, however the data descriptions need not be the
same.
When a COBOL/400 parameter is passed BY REFERENCE, a pointer in the original
data item is passed to the called subprogram. Thus, by changing a parameter in
the called subprogram, the data item in the calling program is changed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The value of a parameter passed through the BY CONTENT phrase is evaluated when
the CALL statement is executed. The value is assigned to the corresponding
parameter of the called subprogram. The number of characters in each parameter
must be equal, however the data descriptions need not be the same.
For each COBOL/400 item passed BY CONTENT, a copy of the item is made in the
calling program, and a pointer to this copy is passed to the called subprogram.
Thus, any changes made to the parameter in the called subprogram, will not be
reflected in the data item of the calling program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ADDRESS OF special register exists for each record ( 01 or 77) in the
Linkage Section, except for those records that redefine each other. In such
cases, the ADDRESS OF special register is similarly redefined.
ADDRESS OF special register is implicitly defined USAGE IS POINTER.
When a pointer data item is passed in a CALL statement, the item is treated as
all other USING items. That is, a pointer to the pointer data item (or copy of
the pointer data item) is passed to the called subprogram.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
LENGTH OF creates an implicit special register whose contents equal the current
length, in bytes, of the data item referenced by the identifier.
In the Procedure Division, you can use the LENGTH OF special register anywhere
a numeric data item having the same definition as the implied definition of the
LENGTH OF special register is used. It is implicitly defined USAGE IS BINARY,
PICTURE 9(9).
You can use the LENGTH OF special register in the BY CONTENT phrase of the CALL
statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Specify literal-2 as any of the following:
A nonnumeric literal
A figurative constant
A Boolean literal
A numeric literal
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the ON OVERFLOW phrase in the CALL statement, control is
transferred to imperative-statement-1 when the called subprogram cannot be made
available.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-1 must appear in an FD entry. It passes a pointer data item that
refers to a File Information Block (FIB).
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
An exception condition occurs when the called subprogram cannot be made
available. This occurs in one of two ways:
1. If you specify the ON EXCEPTION phrase in the CALL statement, control is
transferred to imperative-statement-1. Execution then continues according
to the rules for each statement specified in imperative-statement-1.
If a procedure branching or conditional statement that causes explicit
transfer of control is executed, control is transferred in accordance with
the rules for that statement. Otherwise, upon completion of the execution
of imperative-statement-1, control is transferred to the end of the CALL
statement and the NOT ON EXCEPTION phrase, if specified, is ignored.
2. If the ON EXCEPTION phrase is not specified in the CALL statement, the NOT
ON EXCEPTION phrase, if specified, is ignored.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the NOT ON EXCEPTION phrase in the CALL statement and the called
subprogram can be made available (that is, no exception condition exists),
control is transferred to the called subprogram. After control returns from the
called subprogram, the ON EXCEPTION phrase, if specified, is ignored and
control is transferred to the end of the CALL statement or, if the NOT ON
EXCEPTION phrase is specified, to imperative-statement-2.
If control is transferred to imperative-statement-2, execution continues
according to the rules for each statement specified in imperative-statement-2.
If a procedure branching or conditional statement that causes explicit transfer
of control is executed, control is transferred in accordance with the rules for
that statement. Otherwise, upon completion of the execution of
imperative-statement-2, control is transferred to the end of the CALL
statement.
If you specify this phrase and the ON OVERFLOW phrase, an error occurs.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Routine-name is the name of the graphics routine you want to use.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1 specifies the parameters necessary to use certain graphics
routines. The number of parameters that you must specify varies, depending on
which routines you select. When you select a graphics routine, make sure each
parameter is the correct size and data type as required by that routine.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 or literal-1 specify the name of the subprogram to be canceled. It
must be nonnumeric. The contents must conform to the rules for formation of a
program-name.
The first 10 characters of the literal or of the contents of the identifier
identify the connection between the calling program and the called subprogram.
Each literal or contents of the identifier specified in the CANCEL statement
must be the same as the literal or contents of the identifier specified in an
associated CALL statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-1 designates the file upon which the CLOSE statement is to operate.
If you specify more than one file-name, the files need not have the same
organization or access.
File-name-1 must not be a sort or merge file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Specify the REEL/UNIT phrases for multivolume or single volume tape files.
The system always rewinds and unloads the tape when you specify REEL/UNIT on
the CLOSE statement.
REEL and UNIT are interchangeable.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The FOR REMOVAL phrase is applicable only to tape files. The current volume is
rewound and unloaded. The system is notified that the volume is logically
removed from the run unit. However, the volume can be accessed again after a
CLOSE operation without the REEL/UNIT phrase, and an OPEN operation for this
file.
The system always rewinds and unloads the tape when you specify REEL/UNIT on
the CLOSE statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The WITH NO REWIND phrase is applicable only to tape files.
The current volume is left in its present position. The reel is not rewound.
The system always rewinds and unloads the tape when you specify REEL/UNIT on
the CLOSE statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The WITH LOCK phrase ensures that the file cannot be reopened during this
processing of the program. The record area associated with the file-name is no
longer available after a successful CLOSE operation.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 must name elementary numeric or elementary numeric-edited items.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You must define file-name in an FD entry in the Data Division. It must be the
name of an indexed or relative file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Use the FORMAT phrase to specify the value containing the name of the record
format to use for this I-O operation. The system uses this to specify or
select which record format must be operated on.
A value of all blanks is treated as though you did not specify the FORMAT
phrase. If the value is not valid for the file, a FILE STATUS of 9K is returned
and an EXCEPTION/ERROR procedure is invoked, if applicable, for the file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 must be a character-string of ten characters or less, and it must
be the name of one of the following:
A Working-Storage Section entry
A Linkage Section entry
A record-description entry for a previously opened file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 must be an uppercase character-string of ten characters or less.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 may be any figurative constant. When you specify a figurative
constant, only a single occurrence of that figurative constant is displayed.
Each numeric literal must be an unsigned integer. Signed noninteger numeric
literals are allowed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The UPON phrase specifies the output device to be used for the DISPLAY
statement. The logical record length depends on the device:
The job log = 120 characters
The workstation = 58 characters
The system operator's message queue = 58 characters
When you omit the UPON phrase, the DISPLAY statement sends output to the
REQUESTOR (workstation).
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Mnemonic-name must be associated in the SPECIAL-NAMES paragraph with an
input/output device: a workstation (REQUESTOR), or a system operator's message
queue (CONSOLE or SYSTEM-CONSOLE).
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Environment-name may be specified in place of mnemonic-name. Valid
environment-names are CONSOLE and SYSOUT.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The DISPLAY statement's literal operands, or the contents of the DISPLAY
statement's identifier operands, are written to the system-defined local data
area of the job containing the program that issues the DISPLAY.
The data is written to the local data area according to the rules for the MOVE
statement for a group move without the CORRESPONDING phrase, and without
padding on the right with spaces.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Mnemonic-name must be associated with an environment-name of LOCAL-DATA in the
SPECIAL-NAMES paragraph.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the FOR phrase, it is syntax checked during compilation but
treated as a comment during execution.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The value of literal-2 or identifier-2 indicates the program device name of the
device that is writing data to the local data area. There is only one local
data area for each job, and all devices in a job access the same local data
area.
If you specify literal-2, it must be nonnumeric and 10 characters or less in
length. If you specify identifier-2, it must refer to an alphanumeric data
item, 10 characters or less in length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The AT phrase indicates the absolute address on the screen at which the DISPLAY
operation is to start. If you do not specify the AT phrase, the DISPLAY
operation starts at line 1, column 2. The AT phrase does not indicate the
starting position of the leading attribute.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 and integer-1 must be unsigned numeric integers with a value
greater than or equal to zero. If the value for LINE or COLUMN is negative,
the absolute value is taken.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 must be a PIC 9(4) or a PIC 9(6) field. Integer-2 must be a 4- or
6-byte numeric field. If identifier-3 or integer-2 is 4 digits long, the first
2 digits specify the line, and the second 2 digits specify the column. If
identifier-3 or integer-2 is 6 digits long, the first 3 digits specify the
line, and the second 3 digits specify the column.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The UPON CRT/CRT-UNDER phrase indicates that the DISPLAY statement is extended.
CRT-UNDER also underlines the displayed item preceding the UPON CRT-UNDER
phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The MODE IS BLOCK phrase indicates that the identifier is treated as an
elementary item; even if it is a group item, it is displayed as one item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The WITH phrase allows you to specify options for the DISPLAY operation. If
you specify more than one item prior to this phrase, only the item immediately
before the phrase is affected by it.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the BELL phrase, an audible alarm sounds each time the item
containing this phrase is displayed.
You can use BELL and BEEP interchangeably.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
BLANK is effective each time the screen item containing the clause displays.
BLANK LINE erases from the current cursor position to the end of the current
line. BLANK SCREEN erases the entire screen and places the cursor at line 1.
The erasing is done before the item is displayed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The SIZE phrase specifies the size of the data item on the screen. You can use
this phrase with elementary data items only.
The SIZE phrase has no effect if the size you specify is zero. In this case,
the length of the field is used to display the data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-4 must be an unsigned numeric integer, and must not be subject to an
OCCURS clause. Integer-3 must be unsigned.
If identifier-4 has a sign, the compiler uses the absolute value, and issues a
warning message.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 and identifier-2 must name an elementary numeric item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal must be a numeric literal.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 must name an elementary numeric or numeric-edited item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 and identifier-4 must name an elementary numeric or numeric-edited
item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The quotient used to calculate the remainder is in an intermediate field. The
value of the intermediate field is truncated rather than rounded.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The result of subtracting the product of the quotient and the divisor from the
dividend is stored in identifier-4. If identifier-3, the quotient, is a
numeric-edited item, the quotient used to calculate the remainder is an
intermediate field that contains the unedited quotient.
Any subscripts for identifier-4 in the REMAINDER phrase are evaluated after the
result of the divide operation is stored in identifier-3 of the GIVING phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If a size error occurs in the quotient, no remainder calculation is meaningful.
Therefore, the contents of the quotient field (identifier-3) and the remainder
field (identifier-4) are unchanged.
If a size error occurs in the remainder, the contents of the remainder field
(identifier-4) are unchanged.
In either of these cases, you must analyze the results to determine which
situation has actually occurred.
Click here for more information about SIZE ERROR/NOT SIZE ERROR phrases.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Use literal or the contents of the identifier to indicate the program device
name of the device to be dropped. If you specify literal, it must be
nonnumeric and 10 characters or less in length. If you specify identifier, it
must refer to an alphanumeric data item, 10 characters or less in length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name must refer to a file with an organization of TRANSACTION, and the
file must be open in order to be used in the DROP statement. If no DROP
statement is issued, program devices attached to a TRANSACTION file are
implicitly released when that file is finally closed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Language-name has no defined meaning. It must follow the rules for formation
of a user-defined word. At least one character must be alphabetic.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Routine-name must follow the rules for formation of a user-defined word and at
least one character must be alphabetic.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You can interpret operands before the WHEN phrase in one of two ways, depending
on how you specify them:
Individually, they are called selection subjects.
Collectively they are called a set of selection subjects.
You can interpret operands in the WHEN phrase in one of two ways, depending on
how you specify them:
Individually, they are called selection objects.
Collectively they are called a set of selection objects.
Each selection object within a set of selection objects must correspond to the
selection subject having the same ordinal position within the set of selection
subjects, according to the following rules:
Identifiers, literals, or arithmetic expressions appearing within a selection
object must be valid operands for comparison to the corresponding operand in
the set of selection subjects.
Where identifiers are permitted, they can reference items whose usage is
implicitly or explicitly defined as POINTER.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ALSO phrase separates selection subjects within a set of selection subjects
and separates selection objects within a set of selection objects.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Each selection object within a set of selection objects must correspond to the
selection subject having the same ordinal position within the set of selection
subjects, according to the following rules:
Condition-1, condition-2, or the word TRUE or FALSE appearing as a selection
object must correspond to a conditional expression or the word TRUE or FALSE
in the set of selection subjects.
Condition-1, and condition-2 may be any form of a conditional expression.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Each selection object within a set of selection objects must correspond to the
selection subject having the same ordinal position within the set of selection
subjects, according to the following rule:
The word ANY may correspond to a selection subject of any type.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Two operands connected by a THROUGH phrase must be of the same class. The two
operands thus connected constitute a single selection object, and the number of
selection objects within each set of selection objects must be equal to the
number of selection subjects.
Each selection object within a set of selection objects must correspond to the
selection subject having the same ordinal position within the set of selection
subjects, according to the following rule:
Identifiers, literals, or arithmetic expressions appearing within a selection
object must be valid operands for comparison to the corresponding operand in
the set of selection subjects.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
After the comparison operation is completed, execution of the EVALUATE
statement proceeds as follows:
If a WHEN phrase is selected, execution continues with the first
imperative-statement-1 following the selected WHEN phrase. Note that
multiple WHEN statements are allowed for a single imperative-statement-1.
If no WHEN phrase is selected and a WHEN OTHER phrase is specified, execution
continues with imperative-statement-2.
If no WHEN phrase is selected and no WHEN OTHER phrase is specified,
execution continues with the next executable statement following the scope
delimiter.
The scope of execution of the EVALUATE statement is terminated when execution
reaches the end of the scope of the selected WHEN phrase or WHEN OTHER
phrase, or when no WHEN phrase is selected and no WHEN OTHER phrase is
specified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name must name a procedure or a section in the Procedure Division.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-1 must be a procedure or a section in the same Procedure
Division as GO TO.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Condition may be any simple or complex condition.
There are five simple conditions, which have a truth value of either true or
false:
Class condition
Condition-name condition
Relation condition
Sign condition
Switch-status condition
A complex condition is formed by combining simple conditions, combined
conditions, and/or complex conditions with logical operators, or negating these
conditions with logical negation.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Statement-1 and statement-2 can be an imperative statement, a conditional
statement, or an imperative statement followed by a conditional statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
NEXT SENTENCE can be specified with END-IF.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You can omit the ELSE NEXT SENTENCE phrase if it immediately precedes a
separator period that ends the IF statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 or literal-1 is the sending area.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 is the inspected item and must be an elementary or group item with
USAGE DISPLAY.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2, the count field, must be an elementary numeric data item defined
without the symbol P in its PICTURE character-string.
You must initialize identifier-2 before the INSPECT statement is performed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify CHARACTERS, the count field is increased by 1 for each character
(including the space character) in the inspected item. Thus, execution of the
INSPECT TALLYING statement increases the value in the count field by the number
of characters in the inspected item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-4 or literal-2 is the delimiter. It is not counted or replaced.
Instead, it serves as the boundary for the counting and/or replacing of the
inspected item.
If identifier-4 or literal-2 is a figurative constant, it is considered to be 1
character in length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify ALL, the count field is increased by 1 for each nonoverlapping
occurrence in the inspected item, of this tallying operand, beginning at the
leftmost character position and continuing to the rightmost.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify LEADING, the count field is increased by 1 for each contiguous
nonoverlapping occurrence in the inspected item of this tallying operand,
provided that the leftmost such occurrence is at the point where comparison
began in the first comparison cycle for which this tallying operand is eligible
to participate.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 is the tallying operand.
Identifier-3 must be an elementary data item with USAGE DISPLAY.
When the tallying operand is a figurative constant, it is considered to be a
1-character nonnumeric literal.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 is the tallying field.
Literal-1 must be nonnumeric and may be any figurative constant that does not
begin with the word ALL. If literal-1 is a figurative constant, it refers to
an implicit 1 character data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
With the REPLACING phrase, the subject field and the substitution field must be
the same length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify CHARACTERS, the substitution field must be 1 character in
length. Each character in the inspected field is replaced by the substitution
field, beginning at the leftmost character and continuing to the rightmost.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-5 is the substitution field. The subject field and the substitution
field must be the same length.
Identifier-5 must be an elementary data item with USAGE DISPLAY.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-3 is the substitution field. The subject field and the substitution
field must be the same length.
Literal-3 must be nonnumeric and may be any figurative constant that does not
begin with the word ALL.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify ALL, each nonoverlapping occurrence of the subject field in the
inspected item is replaced by the substitution field, beginning at the leftmost
character and continuing to the rightmost.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify LEADING, each contiguous nonoverlapping occurrence of the
subject field in the inspected item is replaced by the substitution field,
provided that the leftmost such occurrence is at the point where comparison
began in the first comparison cycle for which this substitution field is
eligible to participate.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify FIRST, the leftmost occurrence of the subject field in the
inspected item is replaced by the substitution field.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 is in the subject field when you specify the REPLACING phrase.
Identifier-3 must be an elementary data item with USAGE DISPLAY.
The subject field and the substitution field must be the same length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 is in the subject field when you specify the REPLACING phrase.
Literal-1 must be nonnumeric and may be any figurative constant that does not
refer to the word ALL. If literal-1 is a figurative constant, it refers to an
implicit 1 character data item.
The subject field and the substitution field must be the same length.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-1 is the name given in the SD entry that describes the records to be
merged. No file-name can be repeated in the MERGE statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ASCENDING/DESCENDING phrase specifies that records are to be processed in
an ascending or descending sequence (depending on the phrase specified), based
on the identified merge keys.
When you specify ASCENDING, the sequence is from the lowest key value to the
highest key value.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ASCENDING/DESCENDING phrase specifies that records are to be processed in
an ascending or descending sequence (depending on the phrase specified), based
on the identified merge keys.
When you specify DESCENDING, the sequence is from the highest key value to the
lowest key value.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The COLLATING SEQUENCE phrase specifies the collating sequence to be used in
nonnumeric comparisons for the KEY data items in this merge operation.
If you omit COLLATING SEQUENCE, the PROGRAM COLLATING SEQUENCE clause (if
specified) in the OBJECT-COMPUTER paragraph specifies the collating sequence to
be used. When you omit both the COLLATING SEQUENCE phrase and the PROGRAM
COLLATING SEQUENCE clause, the EBCDIC collating sequence is used.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the USING phrase, all the records in file-name-2 and
file-name-3 (the input files) are transferred to file-name-1 during the MERGE
operation. When the MERGE statement is executed, these files must not be open;
the compiler generates code that opens, reads, and closes the input files
automatically.
All input files must have sequential, relative, or indexed organization and be
described in FD entries in the Data Division. Their record descriptions must
describe records of the same size as the record described in the merge file.
If the elementary items that make up these records are not identical, input
records must have an equal number of character positions as the merge record.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The OUTPUT PROCEDURE phrase specifies the procedure-names of a procedure that
is to select or modify output records from the merge operation. The OUTPUT
PROCEDURE must not contain any SORT or MERGE statements.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-1 specifies the first (or only) section or paragraph in the
OUTPUT PROCEDURE.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-2 identifies the last section or paragraph of the OUTPUT
PROCEDURE.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the GIVING phrase, all the merged records in file-name-1 are
automatically transferred to the output files (file-name-4). At the start of
the execution of the MERGE statement, the file referenced by file-name-4 must
not be open.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-4 represents the output files.
When you specify the GIVING phrase, all the merged records in file-name-1 are
automatically transferred to the output files (file-name-4).
If file-name-1 is a logical database file, the records are added to the end of
the file.
If file-name-4 references an INDEXED file, then the associated KEY data-name
for that file must have an ASCENDING KEY phrase in the MERGE statement. This
same data-name must occupy the identical character positions in its record as
the data item associated with the prime record key for the file.
If file-name-4 references an RELATIVE file, the relative key data item for the
first record returned contains the value '1' ; for the record returned, the
value '2', and so on. After execution of the MERGE statement, the content of
the relative kay data item indicates the last record returned to the file.
All output files must have a sequential, relative or indexed organization.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 or literal-1 is the sending item.
When you specify Format 1, all identifiers may be either group or elementary
items.
Any length evaluation, subscripting , or reference modification associated with
the sending item is evaluated only once, immediately before data is moved into
the first of the receiving items. (Click here for information about reference
modification.)
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 represents the receiving item. When you specify Format 1, all
identifiers may be either group or elementary items.
Any length evaluation, subscripting , or reference modification associated with
a receiving item is evaluated immediately before data is moved into it. (Click
here for information about reference modification.)
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify CORRESPONDING, selected items in identifier-1 are moved to
identifier-2. The results of moving items in identifier-1 to identifier-2 are
the same as if a separate MOVE statement referenced each pair of corresponding
identifiers.
A pointer data item can be part of a group that is referenced in a MOVE
CORRESPONDING statement. However, the pointer data item will not move.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
CORR is an abbreviation for, and equivalent to, CORRESPONDING.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In Format 2, identifier-1 and identifier-2 must be group items.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 and identifier-2 must name an elementary numeric item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 must be numeric.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-2 must be numeric.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 must name an elementary numeric or numeric-edited item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INPUT phrase permits opening the file for input operations. The file
position indicator is set to the first record in the file. If no records exist
in the file, the file position indicator is set so that processing of the first
sequential READ statement results in an AT END condition.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-1, file-name-2, file-name-3, and file-name-4, each designate a file
upon which OPEN is to operate. If you specify more than one file, the files do
not need to have the same organization or access. Each file-name must be
defined in an FD entry in the Data Division, and must not name a sort or merge
file. The FD entry must be equivalent to the information supplied when the file
was defined.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify REVERSED, the OPEN operation positions the sequential tapefile
at the last record in the file. When you read from an input file that is
REVERSED, data records are read sequentially from the last record to the first
record.
You can use the REVERSED phrase only for sequential tapefiles opened in input
mode.
The REVERSED phrase is an obsolete element and will be deleted from the next
revision of the ANSI Standard.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Normally, the OPEN statement for a tapefile repositions the file so that it is
read or written from the beginning. The NO REWIND phrase indicates that the
OPEN operation will not reposition the tapefile.
The system keeps track of the current position on the tape and automatically
positions the tape to the proper place. When you process a multifile tape
volume, specify the NO REWIND phrase on all CLOSE statements. When the next
file on the volume is opened, the system determines which direction the tape
should be moved to most efficiently get to the desired file.
You can use the NO REWIND phrase for sequential tapefiles opened in input mode
or output mode.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the OUTPUT phrase, the file is opened to allow only output
operations. When the file is successfully opened, it contains no records.
If you open a physical file in output mode, all of the records in the file are
cleared.
If you open a logical file for OUTPUT, no records are cleared. The file is
treated as though you had specified the EXTEND phrase. To clear a logical
file, you must clear all of the members on which the logical file is based.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the I-O phrase, the file is opened to allow both input and
output operations. The file position indicator is set to the first record in
the file. If no records exist in the file, the file position indicator is set
so that processing of the first sequential READ statement results in an AT END
condition.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the EXTEND phrase, the sequential file is opened to allow you
to add records immediately following the last record in the file.
When you create a sequential file, you can open the file in extend mode.
The EXTEND phrase is not allowed for files for which the LINAGE clause has been
specified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name designates a file upon which OPEN is to operate. If you specify more
than one file, the files do not need to have the same organization or access.
Each file-name must be defined in an FD entry in the Data Division, and must
not name a sort or merge file. The FD entry must be equivalent to the
information supplied when the file was defined.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-1, procedure-name-2 must name a section or paragraph in the
Procedure Division.
When you specify both procedure-name-1 and procedure-name-2, if either is a
procedure-name in a declarative procedure, both must be procedure-names in the
same declarative procedure.
If you specify procedure-name-1, you must not specify imperative-statement and
the END-PERFORM phrase.
If you omit procedure-name-1, you must specify imperative-statement and the
END-PERFORM phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Imperative-statement represents the statements to be executed for an in-line
PERFORM statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 must name an integer item. If it is zero or negative when the
PERFORM statement is initiated, control passes to the statement following the
PERFORM statement.
After the PERFORM statement has been initiated, any change to identifier-1 has
no effect in varying the number of times the procedures are initiated.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-1 must be a positive signed integer.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Condition-1 may be any type of condition (simple, complex, class...). If the
condition is true when the PERFORM statement is initiated, the specified
procedures are not executed.
Any subscripting associated with the operands specified in condition-1 is
evaluated each time the condition is tested.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If the TEST BEFORE phrase is specified or assumed, the condition is tested
before any statements are executed (corresponds to DO WHILE).
If the condition is true, control is transferred to the next executable
statement following the end of the PERFORM statement. If you do not specify the
TEST BEFORE or the TEST AFTER phrase, the TEST BEFORE phrase is assumed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If the TEST AFTER phrase is specified, the statements to be performed are
executed at least once before the condition is tested (corresponds to DO
UNTIL).
If the condition is true, control is transferred to the next executable
statement following the end of the PERFORM statement. If you do not specify the
TEST BEFORE or the TEST AFTER phrase, the TEST BEFORE phrase is assumed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify TEST BEFORE, all specified conditions are tested before the
first execution, and the statements to be performed are executed only when all
specified tests fail.
If you do not specify the TEST BEFORE or the TEST AFTER phrase, the TEST BEFORE
phrase is assumed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify TEST AFTER, the statements to be performed are executed at
least once, before any condition is tested.
If you do not specify the TEST BEFORE or the TEST AFTER phrase, the TEST BEFORE
phrase is assumed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 thru 7 must name an integer data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 thru 4 must represent a numeric literal.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Condition-1 and condition-2 may be any conditional expression. If the condition
is true at the time the PERFORM statement is initiated, the specified
procedures are not executed.
After the conditions specified in the UNTIL phrase are satisfied, control is
passed to the next executable statement following the PERFORM statement.
If any of the operands specified in condition-1 or condition-2 is subscripted,
the subscript is evaluated each time the condition is tested.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name must be defined in a Data Division FD entry, and must not name a sort
or merge file. If more than one record-description entry is associated with
file-name, these records automatically share the same storage area. That is,
they are implicitly redefined.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the INTO phrase, the current record moves from the input area
to the identifier area according to the rules for the MOVE statement without
the CORRESPONDING phrase. Any subscripting, indexing, or reference
modification associated with the identifier is evaluated after the record has
been read and immediately before it is transferred to the identifier. (Click
here for information about reference modification.)
You can specify the INTO phrase if:
Only one record description is subordinate to the file description entry, or,
All record-names associated with file-name, and the data item referenced by
identifier-1, describe a group item, a numeric-edited item, or an elementary
alphanumeric item.
You cannot specify the INTO phrase when the file contains records of various
sizes, as indicated by their record descriptions. The storage area associated
with the identifier and the record area associated with the file-name cannot be
the same storage area.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 refers to a data item described as a group item, a numeric-edited
item, or an elementary alphanumeric item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The NO LOCK phrase prevents the READ operation from obtaining record locks on
files that you open in I-O (update) mode. A READ statement with this phrase
also releases records that have been locked by a previous READ operation.
If you use this phrase for a file that is not open in I-O mode, you receive an
error message.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The value specified in the FORMAT phrase contains the name of the record format
to use for this I-O operation. The system uses this to specify or select which
record format to operate on.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 or identifier-2 specifies the name of the record format to be read.
If you specify literal-1 it must be nonnumeric, uppercase, and 10 characters or
less in length. If you specify identifier-2, it must refer to an alphanumeric
data item, 10 characters or less in length. If identifier-2 contains blanks,
the READ statement runs as if the FORMAT phrase were omitted.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The AT END phrase serves to explicitly delimit the scope of the READ statement.
The imperative statement is executed when the AT END condition is detected.
Any EXCEPTION/ERROR procedure for the file is not run. If the AT END phrase is
not specified, any EXCEPTION/ERROR procedure for the file is run. Return from
that procedure is to the next executable statement following the end of the
READ statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The NOT AT END phrase transfers control to the imperative statement upon
successful completion of the READ operation. The imperative statement
specifies procedures that will be performed when the AT END condition does not
exist.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For a dynamic access READ NEXT statement, the file position indicator is
positioned to point to the next record in the file. That record is then made
available.
This applies to sequential retrieval from disk and database files, with either
relative or indexed organization.
If you omit NEXT, a random access read is done.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For a dynamic access READ FIRST statement, the file position indicator is
positioned to point to the first record in the file. That record is then made
available.
This applies to sequential retrieval from a database file with indexed
organization.
If you omit FIRST, a random access read is done.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For a dynamic access READ LAST statement, the file position indicator is
positioned to point to the last record in the file. That record is then made
available.
This applies to sequential retrieval from a database file with indexed
organization.
If you omit LAST, a random access read is done.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For a dynamic access READ PRIOR statement, the file position indicator is
positioned to point to the previous existing record in the file. That record
is then made available.
This applies to sequential retrieval from a database file with indexed
organization.
If you omit PRIOR, a random access read is done.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The KEY IS phrase may be specified only for indexed files.
The KEY IS phrase is syntax checked only and has no effect on the operation of
the READ statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1 must identify a record key associated with file-name. Data--name-1
may be qualified but it may not be subscripted.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INVALID KEY phrase must be specified for files for which there is not an
appropriate EXCEPTION/ERROR procedure.
Click here for further information about the invalid key condition.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
After successful completion of a READ statement with the NOT INVALID KEY
phrase, control transfers to the imperative statement associated with the
phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The TERMINAL phrase specifies the program device from which the data record is
made available. The program device must have been acquired before the READ
operation. For a single device file, the TERMINAL phrase can be omitted. The
program device is assumed to be that single device. If the TERMINAL phrase is
omitted for a READ of a TRANSACTION file that has acquired multiple program
devices, the default program device is used.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-2 or identifier-3 specifies the program device name. If you specify
literal-2, it must be nonnumeric and 10 characters or less in length. If you
specify identifier-3, it must refer to an alphanumeric data item 10 characters
or less in length. If identifier-3 contains blanks, the READ statement executes
as if the TERMINAL phrase had been omitted.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INDICATOR phrase specifies which indicators are to be read. When a data
record is read, indicators can be read with it. The indicators can be used to
pass information about the data record and how it was entered into the program.
INDICATOR, INDICATORS, and INDIC are equivalent.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-4 must be either an elementary Boolean data item specified without
the OCCURS clause, or a group item that has elementary Boolean data items
subordinate to it.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the NO DATA phrase, the READ statement will determine whether
data is immediately available. If data is available, the data is returned in
the record area. If no data is immediately available, imperative-statement-1
is executed. The NO DATA phrase prevents the READ statement from waiting for
data to become available.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the SUBFILE phrase, it indicates that all formats referenced
by the statement are subfiles. When you do not specify SUBFILE in a TRANSACTION
I/O statement, it indicates that none of the formats referenced by the
statement are subfiles.
When SUBFILE is specified, a RELATIVE KEY data item must be defined for the
file. Its value is referenced, and sometimes changed, by the I/O operation.
When SUBFILE is not specified, the RELATIVE KEY data item associated with the
file, if specified, is not referenced or changed by the I/O operation.
You can specify the SUBFILE phrase only for display files.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the FORMAT phrase, literal-1 or the contents of identifier-2
must specify a format which is active for the appropriate program device. The
READ statement reads a data record of the specified format.
When a format-name is not specified, the format used is the last record format
written to the display device that contains input fields, input/output fields,
or hidden fields. If no such format exists for the display file, the format
used is the record format of the last WRITE operation to the display device.
To ensure correct results, always specify the FORMAT phrase for multiple format
files.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The TERMINAL phrase specifies the program device from which the data record is
made available. The program device must have been acquired before the READ
operation. For a single device file, the TERMINAL phrase can be omitted. The
program device is assumed to be that single device. If the TERMINAL phrase is
omitted for a READ of a TRANSACTION file that has acquired multiple program
devices, the default program device is used.
If the TERMINAL phrase is omitted for a file that has multiple devices acquired
for it, a record is read from the subfile associated with the default program
device.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INVALID KEY phrase should be specified if the NEXT MODIFIED phrase is not
specified and there is no applicable USE procedure specified for the file name.
If the RELATIVE KEY data item contains a value that does not correspond to a
relative record number for the subfile at the time of the execution of the READ
statement, the INVALID KEY condition exists and the execution of the READ
statement is unsuccessful.
Click here for further information about the invalid key condition.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The AT END phrase serves to explicitly delimit the scope of the READ statement.
Specify the AT END phrase when you use the NEXT MODIFIED phrase and no
applicable USE procedure is specified for the file name. If the AT END phrase
and a USE procedure are both specified for a file, and the AT END condition
arises, control transfers to the AT END imperative statement and the USE
procedure is not executed.
If you specify NEXT MODIFIED and there is no user-modified record in the
subfile, the AT END condition exists, and the READ operation is unsuccessful.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Record-name-1 must specify the name of a logical record in a sort-merge file
description entry (SD). Record-name-1 may be qualified.
Record-name-1 and identifier-1 must not refer to the same storage area.
If the RELEASE statement is executed without a specified SD entry for
file-name-1 in a SAME RECORD AREA clause, the information in record-name-1 is
no longer available.
If the SD entry is specified in a SAME RECORD AREA clause, record-name-1 is
still available as a record of the other files named in that clause.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
FROM identifier-1 makes the RELEASE statement equivalent to the execution of
the following two statements:
MOVE identifier-1 TO record-name-1
RELEASE record-name-1
The MOVE is performed according to the rules for the MOVE statement without the
CORRESPONDING phrase.
Identifier-1 and record-name-1 must not refer to the same storage area.
After the RELEASE statement has successfully executed, the information is still
available in identifier-1.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-1 must be described in a Data Division SD entry. If it has more than
one record description, these records automatically share the same storage; the
area is implicitly redefined. After execution of the RETURN statement, only the
contents of the current record are available; if any data items lie beyond the
length of the current record, their contents are undefined.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The imperative-statement specified on the AT END phrase executes after all
records have been returned from file-name-1. No more RETURN statements may be
executed as part of the current output procedure.
If an at end condition does not occur during the execution of a RETURN
statement, then after the record is made available and after executing any
implicit move resulting from the presence of an INTO phrase, control is
transferred to the imperative statement specified by the NOT AT END phrase.
Otherwise, control is passed to the end of the RETURN statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Record-name-1 must be the name of a logical record in a Data Division FD entry.
It must have the same number of character positions as the record being
replaced. Record-name-1 may be qualified but it must not be subscripted,
indexed, or reference modified.
Identifier-1 and record-name-1 must not refer to the same storage area.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
FROM identifier-1 makes the REWRITE statement equivalent to:
MOVE identifier TO record-name
REWRITE record-name
The MOVE is performed according to the rules for the MOVE statement without the
CORRESPONDING phrase.
Identifier-1 and record-name-1 must not refer to the same storage area.
After the REWRITE statement has successfully executed, the logical record is no
longer available in record-name-1, but is still available in identifier-1.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The value specified in the FORMAT phrase contains the name of the record format
to use for this I-O operation. The system uses this to specify or select which
record format to operate on. The FORMAT phrase is optional when processing a
file that has one record format.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 or identifier-2 specifies the name of the record format to use for
the rewrite operation. If you specify literal-1 it must be uppercase and 10
characters or less in length. If you specify identifier-2, it must be a
character-string of 10 characters or less, and it must name one of the
following:
A Working-Storage Section entry
A Linkage Section entry
A record-description entry for a previously opened file.
A value of all blanks is treated as though the FORMAT phrase were not
specified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When an INVALID KEY condition exists, the updating operation does not take
place. The data in record-name is unaffected.
An INVALID KEY condition exists when any one of the following conditions is
true:
The access mode is sequential, and the prime RECORD KEY of the record to be
replaced does not equal the prime RECORD KEY of the last-retrieved record
from the file.
The access mode is dynamic or random, and the prime RECORD KEY of the record
to be replaced does not equal the prime RECORD KEY of any record in the file.
The access mode is dynamic or random, and the file does not contain the
record specified in the RELATIVE KEY data item.
You must not specify the INVALID KEY phrase for a file with sequential
organization. You can specify an EXCEPTION/ERROR procedure.
Click here for further information about the invalid key condition.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
After successful completion of a REWRITE statement with the NOT INVALID KEY
phrase, control transfers to the imperative statement associated with the
phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The number of character positions in the record referenced by record-name-1
must be equal to the number of character positions in the record being
replaced. The record replaced in the subfile is that record accessed by the
previous read operation.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Multiple data records, each with a different format, can be concurrently active
for a TRANSACTION file. If you specify the FORMAT phrase, it must specify a
valid format name that is defined to the system, and the I-O operation must be
performed on a data record of the same format.
The record format specified in the FORMAT phrase must be the record format
accessed on the previous read operation.
Literal-1 or the contents of identifier-2 must be the name of the subfile
format accessed on the previous READ.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The TERMINAL phrase indicates which program device's subfile is to have a
record rewritten. If the TERMINAL phrase is specified, literal-2 or
identifier-3 must refer to a workstation that has been acquired by the
TRANSACTION file. The program device specified by the TERMINAL phrase must
have been acquired, either explicitly or implicitly, and must have a subfile
associated with the device.
If you omit the TERMINAL phrase from a TRANSACTION file that has acquired
multiple program devices, the subfile used is the subfile associated with the
last program device from which a READ of the TRANSACTION file was attempted.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-2 or identifier-3 must be a valid program device name. If you specify
literal-2, it must be nonnumeric and 10 characters or less in length. If you
specify identifier-3, it must refer to an alphanumeric data item 10 characters
or less in length.
If literal-2 or identifier-3 contains blanks, the TERMINAL phrase has no
effect.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INDICATOR phrase specifies which indicators are to be rewritten. When a
data record is rewritten, indicators can be rewritten with it. The indicators
can be rewritten with a data record to control how the data record is
displayed. INDICATOR, INDICATORS, and INDIC are equivalent.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INVALID KEY condition exists at the time of the rewrite operation, if the
RELATIVE KEY data item contains a value that does not correspond to the
relative record number of the record from the previous read operation.
The INVALID KEY phrase should be specified for files for which an appropriate
USE procedure is not specified. Undesirable results may occur if the INVALID
KEY phrase is not specified, and no USE procedure is specified.
Click here for further information about the invalid key condition.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 can be a data item subordinate to a data item that contains an
OCCURS clause; that is, it can be a part of a multi-dimensional table. In this
case, the data description entry must specify an INDEXED BY phrase for each
dimension of the table.
Identifier-1 must refer to all occurrences within the table element; that is,
it must not be subscripted or reference modified.
Identifier-1 can be an index data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 can be a data item subordinate to a data item that contains an
OCCURS clause; that is, it can be a part of a two- to seven-dimensional table.
In this case, the data description entry must specify an INDEXED BY phrase for
each dimension of the table.
Before the search takes place, the values of all indexes should be set for
higher dimensions of the table to define a specific table of identifier-1
elements.
Identifier-1 must refer to all occurrences within the table element; that is,
it must not be subscripted or indexed.
Identifier-1 cannot be a pointer data item.
The Data Division description of identifier-1 must contain an OCCURS clause
with the INDEXED BY option. It must contain the KEY IS phrase in its OCCURS
clause.
In the WHEN phrase, if you specify an ASCENDING/DESCENDING KEY data item,
explicitly or implicitly, you must also specify all preceding
ASCENDING/DESCENDING KEY data-names for identifier-1.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 must be either an index data item or an elementary integer item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If Index-name-1 is an index for identifier-1, this index is used for the
search. Otherwise, the first (or only) index name is used. If index-name-1 is
an index for another table element, then the first (or only) index-name for
identifier-1 is used for the search. The occurrence number represented by
index-name-1 is increased by the same amount as the search index-name and at
the same time.
When you omit the VARYING index-name-1 phrase, the first (or only) index-name
for identifier-1 is used for the search.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The at end condition exists when the search operation terminates without
satisfying the condition specified in any of the associated WHEN phrases.
If the at end condition exists and the AT END phrase is specified,
imperative-statement-1 is executed, and control passes to the end of the SEARCH
statement, unless imperative-statement-1 ends with a GO TO statement.
If the at end condition exists and the AT END phrase is omitted, control passes
to the next statement after the SEARCH statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
After imperative-statement-2 is executed, control passes to the end of the
SEARCH statement, unless imperative-statement-2 ends with a GO TO statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Condition-1 may be any conditional expression.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the END-SEARCH phrase, you must not specify the NEXT SENTENCE
phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1, data-name-2 must specify an ASCENDING/DESCENDING KEY data item in
the identifier-1 table element and must be indexed by the first identifier-1
index-name, along with other indexes or literals, as required. Data-name-1,
data-name-2 may be qualified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 and identifier-4 must not be POINTER data items. They must not be
ASCENDING/DESCENDING KEY data items for identifier-1 or an item that is indexed
by the first index-name for identifier-1.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In Format 2 of the SEARCH statement, arithmetic-expression-1 or
arithmetic-expression-2 may be any arithmetic expression, with the following
restriction: no identifier in the arithmetic expression may be an
ASCENDING/DESCENDING KEY data item for identifier-1 or an item that is indexed
by the first index-name for identifier-1.
Click here for a description of arithmetic expressions.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Each condition-name specified must have only a single value, and each must be
associated with an ASCENDING/DESCENDING KEY identifier for this table element.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The explicit scope terminator serves to delimit the scope of a statement. It
permits the conditional form of the statement to be nested within another
conditional statement. The explicit scope terminator may also be used with the
imperative form of the statement.
The scope of a SEARCH statement may be terminated by any of the following:
An END-SEARCH phrase at the same level of nesting
A separator period
An ELSE or END-IF phrase associated with a previous IF statement.
If you specify the END-SEARCH phrase, you must not specify the NEXT SENTENCE
phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
NULL/NULLS is the sending field. It sets the receiving field to contain the
value of an invalid address.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 and index-name-1 are the receiving fields and must name either
index data items or elementary numeric integer items.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Index-name-2 is the sending field.
The value before the SET statement is executed must correspond to the
occurrence number of its associated table.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 is the sending field and must name either an index data item or an
elementary numeric integer item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-1 is the sending field. It must be a positive integer.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 is the sending field and must name an elementary integer data
item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Integer-2 is the sending field and must be an integer.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Index-name-3 is the receiving field. The index-name value, both before and
after the SET statement has been executed, must correspond to the occurrence
numbers in an associated table.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You must associate mnemonic-name with an external switch, the status of which
can be altered.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You must associate condition-name-1 with a conditional variable. If more than
one literal is specified in the VALUE clause of condition-name-1, its
associated condition variable is set equal to the first literal.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You must describe identifier-4, the receiving fields, as USAGE IS POINTER.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-6, the sending field, may not contain an address within the
program's own Working Storage or File Section. It must be described as USAGE IS
POINTER.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
ADDRESS OF identifier-7, the sending field, contains the address of the
identifier, not the content of the identifier. It can be subscripted,
reference modified, or both. (Click here for information about reference
modification.) Identifier-7 must name an item in the Linkage Section of any
level except 66 or 88.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
ADDRESS OF identifier-5, the receiving field, must be level-01 or level-77
items defined in the Linkage Section. The addresses of these items are set to
the value of the operand specified in the TO phrase.
Identifier-5 cannot be subscripted or reference modified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-1 is the name given in the SD entry that describes the records to be
sorted.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The COLLATING SEQUENCE phrase specifies the collating sequence to be used in
nonnumeric comparisons for the KEY data items in this sorting operation.
If you omit the COLLATING SEQUENCE phrase, the PROGRAM COLLATING SEQUENCE
clause (if specified) in the OBJECT-COMPUTER paragraph specifies the collating
sequence to be used. When you omit both the COLLATING SEQUENCE phrase and the
COLLATING SEQUENCE clause, the EBCDIC collating sequence is used.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the USING phrase, all the records in file-name-2 (the input
files) are transferred automatically to file-name-1.
All input files must specify sequential or dynamic access mode, and must be
described in FD entries in the Data Division. At the time the SORT statement
is executed, these files must not be open.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-1 specifies the first (or only) section or paragraph in the
INPUT PROCEDURE.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-2 identifies the last section or paragraph of the INPUT
PROCEDURE.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The OUTPUT PROCEDURE phrase specifies the name of a procedure that is to select
or modify output records from the sorting operation.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the DUPLICATES phrase, and the contents of all the key elements
associated with one record are equal to the corresponding key elements in one
or more other records, the order of these records is as follows:
The order of the associated input files as specified in SORT. Within a given
file the order is that in which the records are accessed from that file,
The order in which an input procedure releases these records, when an input
procedure is specified.
If you do not specify the DUPLICATES phrase, the order of these records is
undefined.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ASCENDING/DESCENDING KEY phrase specifies that records are to be processed
in ascending or descending sequence (depending on the phrase specified), based
on the specified sort keys.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the GIVING phrase is specified, all the sorted records in file-name-1 are
automatically transferred to the output files (file-name-3,...).
File-name-3 represents the output files. All output files must specify
sequential or dynamic access mode and must be described in FD entries in the
Data Division. The output files must be indexed, relative or sequential files.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-3 specifies the first (or only) section or paragraph in the
OUTPUT PROCEDURE phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Procedure-name-4 identifies the last section or paragraph of the OUTPUT
PROCEDURE.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INPUT PROCEDURE phrase specifies the name of a procedure that is to select
or modify input records before the sorting operation begins.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name must name a file with sequential or dynamic access (not a sort file)
and be defined in an FD entry in the Data Division.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the KEY phrase, the file position indicator is positioned at
the logical record in the file whose key field satisfies the comparison.
When you do not specify the KEY phrase, KEY IS EQUAL (to the prime record key)
is implied, and the file position indicator is positioned at the logical record
in the file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
EXTERNALLY-DESCRIBED-KEY indicates that the complete key field in the record
area should be used in the comparison. You must specify RECORD KEY IS
EXTERNALLY-DESCRIBED-KEY in the FILE-CONTROL paragraph for the file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For indexed files data-name-1 can be:
The RECORD KEY itself
An alphanumeric data item within a record description for the file whose
leftmost character position corresponds to the leftmost character position of
the key field in the record area. This data item must be less than or equal
to the length of the record key for the file.
For relative files data-name-1 must specify the RELATIVE KEY. When you do not
specify the KEY phrase, KEY IS EQUAL (to the prime record key) is implied.
Data-name-1 can be qualified or reference modified; it cannot be subscripted.
(Click here for information about reference modification.)
You can specify multiple data-names, however, all data-names following the
initial data-name are syntax-checked only.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 or identifier-1 specifies the name of the record format to use for
the start operation. If you specify literal-1 it must be uppercase and 10
characters or less in length. If you specify identifier-1, it must be a
character-string of 10 characters or less, and it must name one of the
following:
A Working-Storage Section entry
A Linkage Section entry
A record-description entry for a previously opened file.
A value of all blanks is treated as though the FORMAT phrase were not
specified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If the comparison is not satisfied by any record in the file, an invalid key
condition exists; the value of the file position indicator is undefined, and
the INVALID KEY imperative-statement, if specified, is processed.
The INVALID KEY phrase must be specified for files in which an appropriate USE
procedure is not specified, or if no EXCEPTION/ERROR procedure is explicity or
implicitly specified.
Click here for further information about the invalid key condition.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
After successful completion of a START statement with the NOT INVALID KEY
phrase, control transfers to the imperative statement associated with the
phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The NO LOCK phrase allows a START statement to be performed on a file without a
record lock being applied to the file on which the START statement is
performed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify STOP RUN, execution of the run unit terminates, and control
returns to the system. If a STOP RUN appears in a sequence of imperative
statements, it must be the last or only statement in the sequence. The STOP
RUN statement closes all files.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal may be numeric or nonnumeric. It may be any figurative constant,
except ALL literal. If literal is numeric, it must be an unsigned integer.
When you specify STOP literal, the literal is communicated to the system
operator, for batch jobs, and to the workstation, for interactive jobs.
Program execution is suspended. The program resumes only after operator
intervention.
STOP literal is an obsolete element and is to be deleted from the next revision
of the ANSI Standard.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 represents the sending field or fields. Identifier-1 must have,
explicitly or implicitly, USAGE DISPLAY.
When the sending field or any of the delimiters is an elementary numeric item,
it must be described as an integer, and its PICTURE character-string must not
contain the symbol P.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 represents the sending fields. Literal-1 must be a nonnumeric
literal; it may be any figurative constant except the ALL literal. When you
specify a figurative constant, it is considered a 1-character nonnumeric
literal.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
DELIMITED BY sets the limits of the string.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 delimits the data to be transferred.
Identifier-2 must have, explicitly or implicitly, USAGE DISPLAY.
If identifier-1 or identifier-2 occupies the same storage area as identifier-3
or identifier-4, undefined results will occur, even if the identifiers are
defined by the same data description entry.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-2 is a delimiter; that is, a character that delimits the data to be
transferred. Literal-2 must be a nonnumeric literal; it may be any figurative
constant except the ALL literal. When you specify a figurative constant, it is
considered a 1-character nonnumeric literal.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
SIZE transfers the complete sending area.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 represents the receiving field. It must not represent an edited
data item, and must not be described with the JUSTIFIED clause or be reference
modified.
Identifier-3 must have, explicitly or implicitly, USAGE DISPLAY.
If identifier-3 and identifier-4 occupy the same storage area, undefined
results will occur, even if the identifiers are defined by the same data
description entry.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-4 represents the pointer field, which points to a character position
in the receiving field.
It must be an elementary integer item large enough to contain a value equal to
the length of the receiving area plus 1. The pointer field must not contain
the symbol P in its PICTURE character-string.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Imperative-statement-1 is executed when the pointer value, explicit or
implicit, is less than 1 or exceeds a value equal to the length of the
receiving field. When this condition occurs, an overflow condition exists, and
no more data is transferred.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If at the time of execution of the STRING statement, conditions that would
cause an overflow condition are not encountered, then after completion of the
transfer of data, the ON OVERFLOW phrase, if specified, is ignored. Control is
then transferred to the end of the STRING statement, or if the NOT ON OVERFLOW
phrase is specified, to imperative-statement-2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In Format 1, identifier must name an elementary numeric item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In all formats, literal must be numeric.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In Format 2, identifier must name an elementary numeric item, unless the
identifier follows the word GIVING, in which case it must name a numeric or
numeric-edited elementary item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In Format 3, identifier must name a group item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-1 represents the sending field. Data is transferred from this field
to the receiving fields. Identifier-1 must be an alphanumeric data item; it
cannot be reference modified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The DELIMITED BY phrase specifies delimiters within the data that controls the
data transfer. If you do not specify the DELIMITED BY phrase, do not specify
either the DELIMITER IN or the COUNT IN phrase.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 and identifier-3 each represent one delimiter and each must be an
alphanumeric data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Each literal-1 and literal-2 must be nonnumeric literals.
Each may be any figurative constant except the ALL literal. When you specify a
figurative constant, it is considered to be a 1-character nonnumeric literal.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ALL literal treats one or more contiguous occurrences of any delimiters as
if they were only one occurrence, and this one occurrence is moved to the
delimiter receiving field, if specified. The delimiting characters in the
sending field are treated as an elementary alphanumeric item and are moved into
the current delimiter receiving field, according to the rules of the MOVE
statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-4 represents the data receiving fields. Each field must have USAGE
DISPLAY. You can define these fields as alphabetic, alphanumeric, or numeric.
Numeric items cannot have the symbol P in their picture string.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
DELIMITER IN represents the delimiter receiving fields.
Unless you specify DELIMITED BY, you must not specify DELIMITER IN.
Identifier-5 must be alphanumeric and must not be defined as
alphanumeric-edited or numeric-edited.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-6 is the data-count field for each data transfer. Each field holds
the count of examined characters in the sending field. It is terminated by the
delimiters or the end of the sending field, for the move to this receiving
field. The delimiters are not included in this count.
Unless you specify DELIMITED BY, you must not specify COUNT IN.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
In the POINTER phrase, identifier-7 contains a value that indicates a relative
position in the sending field. When you specify the POINTER phrase, you must
initialize this field before beginning to execute the UNSTRING statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
With the TALLYING phrase, identifier-8 represents the field-count field.
Identifier-8 is increased by the number of data receiving fields acted upon
when executing the UNSTRING statement. When you specify identifier-8, you must
initialize this field before the UNSTRING statement is executed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ON OVERFLOW imperative-statement-1 phrase is executed when:
The pointer value (explicit or implicit) is less than 1.
The pointer value (explicit or implicit) exceeds a value equal to the length
of the sending field.
All data receiving fields have been acted upon, and the sending field still
contains unexamined characters.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If at the time of execution of the UNSTRING statement, conditions that would
cause an overflow condition are not encountered, then after completion of the
transfer of data, the ON OVERFLOW phrase, if specified, is ignored. Control is
then transferred to the end of the UNSTRING statement, or if the NOT ON
OVERFLOW phrase is specified, to imperative-statement-2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Record-name-1 must be defined in a Data Division FD entry. Record-name-1 may be
qualified, but must not be associated with a sort or merge file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
FROM identifier-1 makes the WRITE statement equivalent to the execution of the
following two statements:
MOVE identifier-1 TO record-name-1
WRITE record-name-1
The MOVE is performed according to the rules for the MOVE statement without the
CORRESPONDING phrase.
Identifier-1 must be the name of a Working-Storage Section or Linkage Section
entry, or a record description for another previously opened file.
Identifier-1 must be an alphanumeric or numeric-edited item. Data is
transferred from this field to the receiving fields.
Identifier-1 and record-name-1 must not refer to the same storage area.
After the WRITE statement has successfully executed, the information is still
available in identifier-1, even though it may not be in record-name-1.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ADVANCING phrase controls the positioning of the output record on the page.
If you omit this phrase, AFTER ADVANCING 1 LINE is assumed.
When you specify:
BEFORE ADVANCING, the line is printed before the page is advanced.
AFTER ADVANCING, the page is advanced before the line is printed.
Identifier-2, the page is advanced the number of lines equal to the current
value in identifier-2.
Integer-1, the page is advanced the number of lines equal to the value of
integer-1.
Mnemonic-name-1, a system-specific action takes place.
PAGE, the record is printed on the logical page BEFORE or AFTER (depending on
the phrase used) the device is positioned to the next logical page. If PAGE
has no meaning for the device used, then BEFORE or AFTER (depending on the
phrase specified) ADVANCING 1 LINE is provided.
If the FD entry contains a LINAGE clause, the repositioning is to the first
printable line of the next page, as specified in that clause. If you omit
the LINAGE clause, the repositioning is to line 1 of the next succeeding
page.
Integer-1 or the value in identifier-2 may be zero.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If the END-OF-PAGE condition does not exist after the processing of a WRITE
statement with the NOT AT END-OF-PAGE phrase, control transfers to
imperative-statement-2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-2 must be an integer data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify END-OF-PAGE, and the logical end of the printed page is
reached during execution of the WRITE statement, the END-OF-PAGE imperative
statement is executed. When END-OF-PAGE is specified, the FD entry for this
file must contain a LINAGE clause. The logical end of the printed page is
specified in the associated LINAGE clause.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-1 or identifier-1 specifies the name of the record format to use for
the write operation. If you specify literal-1 it must be uppercase and 10
characters or less in length. If you specify identifier-1, it must be a
character-string of 10 characters or less, and it must name one of the
following:
A Working-Storage Section entry
A Linkage Section entry
A record-description entry for a previously opened file.
A value of all blanks is treated as though the FORMAT phrase were not
specified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify the NOT INVALID KEY phrase and a valid key condition exists at
the end of the execution of the WRITE statement, control passes to the
imperative statement associated with this phrase.
Click here for further information about the invalid key condition.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INDICATOR phrase specifies which indicators are to be written. When a data
record is written, indicators can be written with it. The indicators can be
used to pass information about the data record and how it was entered into the
program. INDICATOR, INDICATORS, and INDIC are equivalent.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-3 must be either an elementary Boolean data item specified without
the OCCURS clause, or a group item that has elementary Boolean data items
subordinate to it.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The TERMINAL phrase specifies the program devices to which the output record is
sent. If only a single program device file was acquired by the TRANSACTION
file, the TERMINAL phrase can be omitted. That program device is always used
for the WRITE. If the TERMINAL phrase is omitted for a WRITE operation to a
TRANSACTION file that has acquired multiple program devices, the default
program device is used.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The contents of literal-2 or identifier-3 must be the name of a program device
previously acquired, either implicitly or explicitly, by the file. If you
specify literal-2, it must be nonnumeric and 10 characters or less in length.
If you specify identifier-3, it must refer to an alphanumeric data item 10
characters or less in length. A value of blanks is treated as if the TERMINAL
phrase were omitted.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-4 must be an elementary numeric item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal-3 must be a numeric literal.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
All identifiers and literals must represent positive integer values. The roll
starting line number (identifier-5 or literal-4) must not exceed the ending
line number (identifier-6 or literal-5).
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
All identifiers and literals must represent positive integer values.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-8 must be either an elementary Boolean data item specified without
the OCCURS clause, or a group item that has elementary Boolean data items
subordinate to it.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify the SUBFILE phrase, it indicates that all formats referenced
by the statement are subfiles.
When you specify SUBFILE, the RELATIVE KEY clause must have been specified on
the SELECT clause for the file being written. The record written to the
subfile is the record in the subfile identified by the format name that has a
relative record number equal to the value of the RELATIVE KEY data item.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The TERMINAL phrase specifies which program device's subfile is to have a
record written to it. If you specify the TERMINAL phrase, literal-2 or
identifier-3 must refer to a workstation associated with the TRANSACTION file.
If literal-2 or identifier-3 contains blanks, the TERMINAL phrase is treated as
if it was not specified. The workstation specified by the TERMINAL phrase must
have been acquired either explicitly or implicitly.
If you omit the TERMINAL phrase, the subfile used is the subfile associated
with the default program device.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The contents of literal-2 or identifier-3 must be the name of a work station
previously acquired, either implicitly or explicitly, by the file. If you
specify literal-2, it must be nonnumeric and 10 characters or less in length.
If you specify identifier-3, it must refer to an alphanumeric data item 10
characters or less in length. A value of blanks is treated as if the TERMINAL
phrase were omitted.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Identifier-4 must be either an elementary Boolean data item specified without
the OCCURS clause, or a group item that has elementary Boolean data items
subordinate to it.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INVALID KEY condition exists if a record is already in the subfile with
that record number, or if the relative record number specified is greater than
the maximum allowable subfile record number.
The INVALID KEY phrase should be specified in the WRITE SUBFILE statement for
all files for which an appropriate USE procedure is not specified.
Click here for further information about the invalid key condition.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The NOT INVALID KEY phrase allows you to specify procedures that will be
performed when an invalid key condition does not exist for the WRITE statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Start the characters *CONTROL or *CBL in any column beginning with column 8,
followed by at least one space or comma and one or more option keywords. The
option keywords must be separated by one or more spaces or commas. This
statement must be the only statement on the line, and continuation is not
allowed. The statement can end with a period.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The input source program lines are printed from the point at which you specify
*CONTROL SOURCE.
If you specify *NOSOURCE as a compiler option, printing of the source is always
suppressed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Specify NOSOURCE in order to suppress the printing of the source listing.
If you specified *SOURCE as a compiler option, printing of the source listing
is suppressed when the *CONTROL NOSOURCE statement is encountered.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
You can use the LIST, NOLIST, MAP, NOMAP options for compatibility only.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Each COPY statement must be preceded by a space and ended with a separator
period.
A COPY statement may appear in the source program anywhere a character string
or a separator may appear. However, a COPY statement must not be specified
within a COPY statement. The resulting text must not contain a COPY statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Text-name must follow the rules for formation of a program-name. The first 10
characters of text-name are used as the member name; these first 10 characters
must, therefore, be unique within one file.
If text-name is not qualified, QLBLSRC is assumed as the file name. If the
file name is not qualified by a library name, it is assumed to reside in a
library in the library list.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Library-name must follow the rules for formation of a program-name. The first
10 characters of library-name are used as the identifying name; these first 10
characters must be unique within the system.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name must follow the rules for formation of a program-name.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The SUPPRESS phrase causes a COPY statement to suppress the listing of copied
statements. For its duration, this type of COPY statement overrides any
*CONTROL or *CBL statement.
If the copied member contains *CONTROL or *CBL statements, the last one runs
once the COPY member has been processed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Use the DD option to reference alias (alternate) names. The specification of
an alias name in DDS allows a data name of up to 30 characters to be included
in the COBOL program.
When you use the DD option, any alias names present replace the corresponding
DDS field names. All underscores in the alias names are translated into
hyphens before any replacing occurs.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The format-name is the name of the DDS record format definition that is to be
translated into COBOL data description entries. The format-name must follow
the rules for formation of any AS/400 name.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
If you specify ALL-FORMATS without the indicator attribute, each record format
is generated as a redefinition of a 05 elementary item defined as either:
The size of the largest record format in the file, if the COPY statement
appears in the FILE SECTION.
The size of the largest record format that will be generated, if the COPY
statement appears outside of the FILE SECTION.
When the indicator attribute is specified, no redefinition takes place.
Instead, each of the formats generates a separate data structure.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The DDR option does everything that the DD option does. It also replaces the
characters which are not valid for COBOL: @, #, $, and _ in a field name (or
alias name, if applicable), with the corresponding valid COBOL characters A, N,
D, and - . As well, it removes underscores from the end of a field name.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The DDS option copies in the internal DDS format field names.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The DDSR option does everything the DDS option does. It also copies the
internal DDS format field names, replacing the characters which are not valid
for COBOL: @, #, $, and _ , with the valid COBOL characters A, N, D, and - ,
respectively. This option also removes any underscores from the ends of the
field names.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
I, O, and I-O represent the usage attributes for the data description entries
generated by the COPY statement. If you do not specify either -I or -O, I-O is
assumed.
If the file is a database file, a single I-O format is generated. Subfile
records with only output or input/output fields, and no field indicators
specified, generate I-O formats.
For all other file types the description generated varies as follows:
If you specify -I, the generated data description entries contain either:
- The input and input/output fields for a nonsubfile format
- The input, output, and input/output fields for a subfile format.
If you specify -O, the generated data description entries contain the output
and input/output fields.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The INDICATOR attribute specifies whether or not data description entries are
generated for indicators. If the INDICATOR attribute is specified, data
description entries are generated for indicators, but not for data fields.
INDICATOR, INDICATORS, and INDIC are equivalent.
The data description entries that are generated are determined by which one of
the usage attributes (I, O, I-O) is specified or assumed in the COPY statement.
If you specify I-INDICATOR, data description entries for input (response)
indicators are generated for indicators used in the input record area.
If you specify O-INDICATOR, data description entries for output (option)
indicators are generated for indicators used in the output record area.
If you specify I-O-INDICATOR, or it is assumed, separate data description
entries for both input and output (response and option) indicators are
generated for indicators used in the input and output record areas.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
SKIP1 specifies that a single blank line is to be inserted in the source
listing.
You may write SKIP1 anywhere in either Area A or Area B, and you may end it
with a separator period. It must be the only statement on the line.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
SKIP2 specifies that two blank lines are to be inserted in the source listing.
You may write SKIP2 anywhere in either Area A or Area B, and you may end it
with a separator period. It must be the only statement on the line.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
SKIP3 specifies that three blank lines are to be inserted in the source
listing.
You may write SKIP3 anywhere in either Area A or Area B, and you may end it
with a separator period. It must be the only statement on the line.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The TITLE statement may appear anywhere in any of the divisions. The word
TITLE may begin in either Area A or Area B. The TITLE statement may not be
continued on another line. No other statement may appear on the same line as
the TITLE statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Literal must be nonnumeric and may be followed by a separator period. Literal
must not be a figurative constant.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
File-name-1 is valid for all files. When you specify file-name-1, the procedure
is run only for the files named. No file-name can refer to a sort or merge
file. For any given file, only one EXCEPTION/ERROR procedure may be specified;
thus, file-name specification must not cause simultaneous requests for
execution of more than one EXECUTION/ERROR procedure.
The file-name phrase is also valid for TRANSACTION files.
A USE AFTER EXCEPTION/ERROR declarative statement specifying the name of a file
takes precedence over a declarative statement specifying the open mode of the
file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
INPUT is valid for all files. When you specify INPUT, the procedure is run for
all files opened in INPUT mode that get an error.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
OUTPUT is valid for all files. When you specify OUTPUT, the procedure is run
for all files opened in OUTPUT mode that get an error.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
I-O is valid for all direct-access files. When you specify I-O, the procedure
is run for all files opened in I-O mode that get an error.
The I-O phrase is also valid for TRANSACTION files.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
EXTEND is valid only for files with sequential organization and sequential
access mode. When you specify EXTEND, the procedure is run for all files opened
in EXTEND mode that get an error.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify file-name-1, that debugging section is executed:
After the execution of any CLOSE, DELETE, OPEN, or START statement that
references file-name-1.
After execution of a READ file-name-1 where the AT END phrase or the INVALID
KEY phrase was not run.
Any given file-name may appear in only one USE FOR DEBUGGING sentence, and only
once in that sentence.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When you specify procedure-name-1, that degugging section is executed:
Before each running of the named procedure.
After running an ALTER statement referring to the named procedure.
Except for the USE FOR DEBUGGING sentence itself, statements within a debugging
declarative section can only refer to procedure names defined in a different
USE procedure through the PERFORM statement. Procedure names within debugging
declarative sections must not appear in USE FOR DEBUGGING sentences.
Any given procedure-name may appear in only one USE FOR DEBUGGING sentence, and
only once in that sentence.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The ALL PROCEDURES phrase can be specified only once in a program. When ALL
PROCEDURES is specified in a USE FOR DEBUGGING sentence, individual
procedure-names must not be specified in any USE FOR DEBUGGING sentence.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
GENLVL specifies the severity level that determines if a program object is
created. The severity level corresponds to the severity level of the messages
produced during compilation of the program. If the severity level of error
messages is greater than the value you specify, a program object is not
created. For example, if you specify 19 for this parameter, a program object is
not created if the severity level of any of the messages is 20 or greater.
You can specify a one or two-digit number, 0 through 29. If errors occur with
a severity level greater than this level, no program object is created. The
default value for GENLVL is 29.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
GEN indicates that the compiler creates a program object after the source
program is compiled. GEN is the default value.
NOGEN indicates that the compiler does not create a program object after the
source program is compiled. You might specify this option if you want only
error listings at this time.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
NOMAP indicates that the compiler does not list the Data Division map. NOMAP
is the default value.
MAP indicates that the compiler lists the Data Division map.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
NONUMBER indicates that the source-file sequence numbers are used for
reference numbers. NONUMBER is the default value.
NUMBER indicates that the user-supplied sequence numbers (columns 1 through
6) are used for reference numbers.
LINENUMBER indicates that the sequence numbers created by the compiler are
used for reference numbers. This option combines program source code and
source code introduced by COPY statements into one consecutively numbered
sequence. Use this option if you specify FIPS (Federal Information
Processing Standards) flagging or SAA flagging.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
NOSECLVL indicates that second-level message text is not listed for this
compilation. NOSECLVL is the default value.
SECLVL indicates that second-level message text is listed for this
compilation, along with the first-level message text.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
NOOPTIONS indicates that options in effect are not listed for this
compilation. NOOPTIONS is the default value.
OPTIONS indicates that options in effect are listed for this compilation.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
QUOTE indicates that the delimiter quotation mark (") is used for nonnumeric
literals and Boolean literals. This also specifies that the value of the
figurative constant QUOTE has the EBCDIC value of a quotation mark. QUOTE is
the default value.
APOST indicates that the delimiter apostrophe (') is used for nonnumeric
literals and Boolean literals. This also specifies that the value of the
figurative constant QUOTE has the EBCDIC value of an apostrophe.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
NOSEQUENCE indicates that the reference numbers are not checked for sequence
errors. NOSEQUENCE is the default value.
SEQUENCE indicates that the reference numbers are checked for sequence
errors. Sequence errors do not occur if the LINENUMBER option is specified.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
SOURCE or SRC indicates that the compiler produces a source listing,
consisting of the COBOL source input and all compilation-time error messages.
SOURCE or SRC are the default values.
NOSOURCE or NOSRC indicates that the compiler does not produce the source
part of the listing. If you do not require a source listing, you should use
this option because compilation may take less time.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
NOVBSUM indicates that verb-usage counts are not printed. NOVBSUM is the
default value.
VBSUM indicates that verb-usage counts are printed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
NOXREF indicates the compiler does not produce a cross-reference listing for
the source program. NOXREF is the default value.
XREF indicates that the compiler produces a cross-reference listing for the
source program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the COBOL source is compiled:
PRTCORR indicates that the compiler inserts comment lines in the compiler
listing indicating which elementary items were included as a result of the
use of the CORRESPONDING phrase. PRTCORR is the default value.
NOPRTCORR indicates that the compiler does not insert comment lines in the
compiler listing when the CORRESPONDING phrase is used.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
NOINZDLT indicates that relative files with sequential access are not
initialized with deleted records during the CLOSE operation if the files were
opened for OUTPUT. That is, the record boundary is determined by the number
of records written at OPEN OUTPUT time. Subsequent OPEN operations allow
access only up to the record boundary. NOINZDLT is the default value.
INZDLT indicates that relative files with sequential access are initialized
with deleted records during the CLOSE operation if the files were opened for
OUTPUT. Active records in the files are not affected. That is, the record
boundary is defined as the file size for subsequent OPEN operations.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
NOLIST indicates that no IRP (intermediate representation of program),
associated hexadecimal code, or error messages are listed. NOLIST is the
default value.
LIST indicates that the IRP, its associated hexadecimal code, and any error
messages are listed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
STDERR indicates that standard error handling is used. STDERR is the default
value.
NOSTDERR indicates that the error handling method of Version 1, Releases 1
and 2, is used.
See the chapter on error handling in the COBOL/400 User's Guide for more
information about error handling.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
NODDSFILLER indicates that if no matching fields are found by a COPY DDS
statement, no field descriptions are created. NODDSFILLER is the default
value.
DDSFILLER indicates that when no matching fields are found by a COPY DDS
statement, a single character FILLER field description, "07 FILLER PIC X", is
always created.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
NOSYNC indicates that the SYNCHRONIZED clause is syntax checked. NOSYNC is
the default value.
SYNC indicates that the SYNCHRONIZED clause causes the alignment of an
elementary item on a natural boundary in storage.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
NOCRTF indicates that files that are unavailable at the time of an OPEN
operation are not created dynamically. NOCRTF is the default value.
CRTF indicates that files that are unavailable at the time of an OPEN
operation are created dynamically.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
NODUPKEYCHK does not check for duplicate keys for INDEXED files. NODUPKEYCHK
is the default value.
DUPKEYCHK checks for duplicate keys for INDEXED files.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
NOEXTACCDSP indicates that the compiler does not allow extended ACCEPT or
extended DISPLAY statements. NOEXTACCDSP is the default value.
EXTACCDSP indicates that the compiler allows extended ACCEPT and extended
DISPLAY statements.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
NOBLK indicates that the compiler allows blocking only of SEQUENTIAL access
files with no START statement.
If a BLOCK CONTAINS clause is specified, the BLOCK CONTAINS clause is
ignored, except for tape files. NOBLK is the default value.
BLK indicates that the compiler allows blocking from DYNAMIC access files and
SEQUENTIAL access files with a START statement, when used with BLOCK CONTAINS
clause. Blocking is not allowed for RELATIVE files opened for output
operations.
The BLOCK CONTAINS clause controls the number of records to be blocked.
When no BLOCK CONTAINS clause is specified, the compiler allows blocking only
of SEQUENTIAL access files with no START statement. The operating system
determines the number of records to be blocked.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
STDINZ indicates that the compiler initializes data items to system defaults,
provided that the items are not subject to a VALUE clause. STDINZ is the
default value.
NOSTDINZ indicates that for those items with no VALUE clause, the compiler
does not initialize data items to system defaults.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
FS21DUPKY indicates that the compiler reports a file status of 21 when
processing an indexed file with duplicate keys in random or dynamic access
mode, if the value of the key is changed between the mandatory READ statement
and a following REWRITE or DELETE statement. FS21DUPKY is the default value.
NOFS21DUPKY indicates that the compiler does not report a file status of 21
when processing an indexed file with duplicate keys in random or dynamic
access mode. A REWRITE statement can change the key of a record.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
RANGE indicates that, at run-time, the system verifies that subscripts are
within the correct ranges, but does not verify index ranges. It also checks
for reference modification and compiler-generated substring operations.
RANGE is the default value. (Click here for information about reference
modification.)
NORANGE indicates that the system does not verify ranges at run-time.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
When the program object is created:
UNREF includes unreferenced data items in the compiled program. UNREF is the
default value.
NOUNREF does not include unreferenced data items in the compiled program.
This reduces the number of ODT (object definition table) entries used,
allowing a larger program to be compiled. The unreferenced data items still
appear in the cross-reference listings produced through the *XREF option.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
NOVARCHAR indicates that variable-length fields are ignored, and are declared
as FILLER fields. NOVARCHAR is the default value.
VARCHAR indicates that variable-length fields are declared as fixed-length
group items, and are accessible to the program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
NODATETIME indicates that date, time, and timestamp data types are ignored,
and are declared as FILLER fields. NODATETIME is the default value.
DATETIME indicates that date, time, and timestamp data types are declared as
fixed-length character fields, and are accessible to the program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
NOCVTGRAPHIC indicates that DBCS-graphic data types are ignored, and are
declared as FILLER fields. NOCVTGRAPHIC is the default value.
CVTGRAPHIC indicates that fixed-length DBCS-graphic data types are declared
as fixed-length alphanumeric fields, and are accessible to the program.
When the VARCHAR option is also in use, variable-length DBCS-graphic data
types are declared as fixed-length group items, and are accessible to the
program.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For FIPS flagging:
NOFIPS indicates that the source program is not FIPS flagged. NOFIPS is the
default value.
MINIMUM indicates FIPS flag for minimum subset and higher.
INTERMEDIATE indicates FIPS flag for intermediate subset and higher.
HIGH indicates FIPS flag for high subset.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For FIPS flagging:
NOSEG indicates that optional module SEGMENTATION is not FIPS flagged. NOSEG
is the default value.
SEG1 performs FIPS flagging for optional module SEGMENTATION level 1 and
higher.
SEG2 performs FIPS flagging for optional module SEGMENTATION level 2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For FIPS flagging:
NODEB indicates that optional module DEBUG is not FIPS flagged. NODEB is the
default value.
DEB1 performs FIPS flagging for optional module DEBUG level 1 and higher.
DEB2 performs FIPS flagging for optional module DEBUG level 2.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For FIPS flagging:
NOOBSOLETE indicates that obsolete language elements are not flagged.
NOOBSOLETE is the default value.
OBSOLETE indicates that obsolete language elements are flagged.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
To specify if you want flagging of COBOL/400 functions that are not supported
by SAA COBOL:
NOSAAFLAG indicates that SAA COBOL flagging is not performed. NOSAAFLAG is
the default value.
SAAFLAG indicates that SAA COBOL flagging is performed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
FLAG(nn) specifies the minimum severity level of messages to be printed.
0 indicates that all messages are printed. This is the default value.
severity-level (a one or two-digit number) indicates the minimum severity
level of messages that are printed. Messages that have severity levels of
the specified value or higher are listed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For file status 9M:
NOFS9MTO0M indicates that file status 9M is not changed to file status 0M.
This is the default value.
FS9MTO0M indicates that file status 9M is changed to file status 0M.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The GRAPHIC option of the PROCESS statement is available for processing DBCS
characters in DBCS literals. This option is for DBCS systems only.
NOGRAPHIC indicates that DBCS characters in DBCS/SBCS (mixed) literals are
processed. This is the default value.
GRAPHIC indicates that DBCS characters in DBCS literals are processed.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
For file status 9A:
NOFS9ATO0A indicates that file status 9A is not changed to file status 0A.
This is the default value.
FS9ATO0A indicates that file status 9A is changed to file status 0A.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
This explicit scope terminator serves to delimit the scope of a statement. It
permits the conditional form of the statement to be nested within another
conditional statement. You can also use the explicit scope terminator with the
imperative form of the statement.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Data-name-1 must refer to a non-Boolean data item whose implicit or explicit
usage is DISPLAY. Data-name-1 can be qualified or subscripted.
Each character of a data item referenced by data-name-1 is assigned an ordinal
number incrementing by one from the leftmost position to the rightmost
position. The leftmost position is assigned the ordinal number of one. If the
data description entry for data-name-1 contains a SIGN IS SEPARATE clause, the
sign position is assigned an ordinal number within that data item.
If the data item referenced by data-name-1 is described as numeric,
numeric-edited, or alphanumeric-edited, it is operated upon for purposes of
reference modification as if it were redefined as an alphanumeric data item of
the same size as the data item referenced by data-name-1.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Leftmost-character-position must be a numeric literal or an arithmetic
expression. The evaluation of the leftmost-character-position must result in a
positive nonzero integer that is less than or equal to the number of characters
in the data item referenced by data-name-1.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Length must be a numeric literal or an arithmetic expression.
The evaluation of length must result in an integer that is greater than zero,
and less than 32 768. If length is not specified, the unique data item created
extends from and includes the character identified by
leftmost-character-position up to and including the rightmost character of the
data item referenced by data-name-1.
Note: If the result of an arithmetic expression is something other than an
integer, truncation occurs, resulting in an integer.