Coding Conventions; Primary, Continuation, And Secondary Lines; Continuation Characters; Keywords - IBM 5280 Programmer's Manual

Distributed data system, cobol
Hide thumbs Also See for 5280:
Table of Contents

Advertisement

Coding Conventions
Primary, Continuation, and Secondary Lines
Continuation Characters
Keywords
You can code two different types of lines for field and record statements:
A primary line, which contains the fields, both required and optional, in
columns 1-44 and, starting in column 45, the editing field, which
contains keywords, keyword parameters, and literals.
One or more continuation lines, which extend the editing field (begun on
a preceding primary or continuation line).
The primary line, or continuation line that comes before another
continuation line, must have a
+
character or a - character as the last
nonblank character. The next section explains the differences between
these characters.
Field description statements can contain, in addition to primary and
continuation lines just described above, one or more secondary lines. A
CHECK keyword (whose functions are explained later in this chapter)
containing a BY parameter, must always begin on a secondary line. The rules
for coding a secondary line are:
A secondary line must always follow a primary line or a continuation
line.
The primary or continuation line that comes before a secondary line
must not have a
+ character or a - character specified as the last
character.
A secondary line must begin with a keyword.
A secondary line can have continuation lines under the same rules
specified for primary lines.
Comment statements, which contain an asterisk (*) in column 7, can be
placed where desired between primary, secondary, and continuation lines.
If a literal, keyword, or keyword parameter doesn't fit on one line, you can
continue it on the next line by coding a plus character (+) or a minus
character ( -) as the last non blank character in the line.
A plus (+) character indicates that the compiler is to ignore any blanks before
the first nonblank character in the continuation line that follows.
A minus (-) character causes the compiler to include any blanks before the
first non blank character in the continuation line that follows. The compiler
always includes any blanks preceding the
+
or - continuation character.
Keywords represent attributes and functions. Most keywords must be
accompanied by a string of one or more parameters that further define the
attributes or function. The string of parameters must follow the keyword and
must be enclosed within a pair of parentheses.
The general syntax for a keyword and its parameter string is:
KEYWORD (parameter string)
When the parameter string contains two or more parameters, each consecutive
parameter must be separated from the preceding parameter by at least one
blank.
Chapter 2. Transaction I/0 - Screen Definition
2- 9

Advertisement

Table of Contents
loading

Table of Contents