Professional Documents
Culture Documents
Automatic Response File
Linking a Subprogram .....
Linking With Segmentation
Using a Batch File ........
Compiling a Large Program
Files Used by COBOL ........
Output Listings and Error Messages
CORY Stntenieites 2 ake i oe eS
SampleListing <4 <: 45s osc sw cee os
CHAPTER 4. IDENTIFICATION DIVISION... 4-1
Purpose es, HED
Format : 4-3
Remarks... . 43
Example . . . 4-4
AUTHOR Paragriph 4-5
“ DATE-COMPILED Paragraph . . . 4-6
DATEWRITTEN Paragraph... 47 ©}
IDENTIFICATION DIVISION Header " 4-8
INSTALLATION Paragraph 4-9
PROGRAM-ID Paragra Sesgh of
SECURITY Paragraph + Veeieeta we dim s 45.3 4-11CHAPTER 5. ENVIRONMENT DIVISION... . S-l
Purpose... s Sieur 5-3
Format. ...---- 5-3
Remarks .....-.. 5-4
Exaniple .... - + 5-4
CONFIGURATION SI 5-5
ENVIRONMENT DIVISION Header .... ~~ - 5-6
FILE-CONTROL Paragraph 2... ee ee 5-7
INPUT-OUTPUT SE‘ S-11
1-0-CONTROL Pa: 5-12
OBJECT-COMPU' Paragraph sie x a rele
SOURCE-COMPUTER Paragraph .....---- 5-14
SPECIAL-NAMES Paragraph . 2.2... 02+ +: 5-15
CHAPTER 6. DATA DIVISION 6-1
PUDONG se ow Ses i
MOnMat aed Gis sc = S
Remarks go5.0. se e Conditions:
— Level 88 conditions with value
. Series or range
— Use of logical AND/OR/NOT in
conditions
— Use of algebraic relational
symbols for equality or
inequalities (=, >, <)
— Implied subject, or both subject
and relation, in relational
conditions
— Sign test
— Nested IF statements; parentheses
in conditionsLo
Module Computer CO!
Nucleus © Verbs:
(continued) — Extensions to the functions of
ACCEPT and DISPLAY for
formatted screen handling
— Acceptance of data from enan
DATE/DAY/TIME
— STRING and UNSTRING
statements
~— COMPUTE with multiple
receiving fields
— PERFORM
VARYING. . .UNTIL
@ Identifiers:
— Mnemonic names for accept or
” display devices
~ Procedure names consisting of
digits only
— Qualification of names (in
Procedure Division statements
only)
Sequential, All of Level | plus these features of
Relative, and Level 2:
Indexed 1/0
© RESERVE clause
© Multiple operands in OPEN and
CLOSE, with individual options
per file
¢ VALUE OF FILE-ID is data name
© Sequential I/O:
— EXTEND mode for OPEN
— WRITE ADVANCING data
name lines
— LINAGE phrase }
— AT END-OF-PAGE clause
1-5Module
Sequential,
Relative, and
Indexed I/O
(continued)
Library
Communication
Interprogram
Communication
Table Handling
Sort/Merge
Debugging
Report Writer
Segmentation
Features of IBM Personal
Computer COL
e Relative and Indexed I/O:
— Dynamic access mode (with
READ NEXT)
— START (with key relations
EQUAL, GREATER, or ©
NOT LESS)
All of Level 1
1BM Personal Computer COBOL
does not provide this.
All of Level 1
All of Level | plus full Level 2
formats for SEARCH statement
IBM Personal Computer COBOL
does not provide this.
© Special extensions to ANSI-74 Q)
Standard, providing convenient
trace-style debugging.
© Conditional compilation: lines
with D in colwnn 7 are bypassed
unless WITH DEBUGGING
MODE is given in the SOURCE-
COMPUTER paragraph. ~
IBM Personal Computer COBOL
does not provide this.
_ All of Level 1Exceptions
Referring to the Nucleus and Table Handling modules,
your IBM Personal Computer COBOL includes all Level
2 features except:
e = General
— You cannot use figurative constant ALL literal
for literals greater than one character.
— You cannot qualify names allowed in the
Environment Division.
e Data Division
— OCCURS DEPENDING ON . .. is not supported.
— You cannot intermix a Level 88 item containing
a list of items with a range of items (either list
or range may be used but not both at one time).
* — Binary data items always require 2 bytes:
a — PICTURE 9(5) only allows a range of
-32768 to 32767.
— PICTUREs 9, 99, 999, and 9999 are
equivalent to PIC 9(5) for binary items.
— An error message is given when more than
five digits are specified.
— Unsigned binary data items:
— PIC 9 is equivalent to PIC $9.
— RENAMES phrase is not supported.
1-7© Procedure Division
— MOVE, ADD, and SUBTRACT do not support
CORRESPONDING.
— Multiple destinations for results of arithmetic
statements are not supported.
— Division remainders are not provided.
— INSPECT in Level 2 is not supported.
— Arithmetic expressions in conditions are not
supported.
— ALTER series of procedure names is not
supported.
— Multiple index keys are not supported.
— Special language for tape handling is not
supported.
— Level | RERUN facility is not supported.
— Interprogram communication and Library
modules are implemented to Level | only.
Summary
IBM Personal Computer COBOL is a powerful language
for business applications. It includes all of 1974 ANSI
COBOL Level | facilities and many Level 2 features.
Features of particular interest are trace style debugging
and the extensions we have incorporated in interactive
screen control, allowing special options to the ACCEPT
and DISPLAY statements to handle fully formatted
screens.
Still another extension is the COMP-3 data format _
which allows numeric data to be packed two digits to
the byte so that diskette requirements are reduced.
Note: For the remainder of this manual, we will
use the term /BM COBOL to mean IBM Personal
Computer COBOL.
aCHAPTER 2. HOW TO WRITE A COBOL
PROGRAM
Contents
ProgkatnrSirctape: 6 ne wie ow ws 8 oe
Divisions of a Program . . .
Coding Structure .....
Coding Rules)... . :
Syntax Notation ......
Character Set ©: 2. a. <
Punctuation ........
Pe Word Formation. ......... Re 6 salt
Statements, Sentences, and Names
Statements ........
Sentences
Paragraphs
MECUOUS Stet) scile are chi 2S oie aoe
Level Numbers and DataNames .. 2.2... 2-15
What-isateeourdts) sc oe 6 5 = Sard s ere 2-15
DATA NEMS veces cSt tenes este: 0 2) Pe
Data Names... 2. 5.
Qualifier Names
Condition Names
Mnemonic Names oa. 8. 4 hie 6 2 ees +2-22
Data Description Entry
Group Item Format
Elementary Item Format .......... 2-24
MONTES: 5. wiscde vi Aas sw le es we 2-26
Mifeed Sila lores emus Ss. ills aed! et Bloc ah 2-27
Nonnumeric Literals 2.2... 2... 2-27
Numericibitemis to ss hoe a as 2-28
Figurative Constants... .......... 2-29
Arithmetic Expressions 2... 2.2. ..0..04. 2-31Avitienetic Statements: