Open; Write - IBM 5280 Programmer's Manual

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

Advertisement

OPEN
WRITE
FORMAT Clause
WORKSTATION indicates the device is a 5280 data station.
n is an integer that specifies one of the three sizes of work station screens as
follows:
480 for the 480-character screen.
960 for the 960-character screen.
1920 for the 1920-character screen.
CTNotel: If you don't specify n, a screen size of 1920 characters is assumed.
CTNote 2: The screen size of the work station on which a program is to execute
must be at least the same size specified by n. Otherwise, the program will not
execute. For example, if you specify 1920, the program will execute on
systems that support 480-, 960- and 1920-character data stations; if you
specify 480, the program will execute only on stations that support
480-character data stations.
An example of the FILE-CONTROL paragraph is shown in
EJ
in figure 3.2.
Note that for transaction I/O, ORGANIZATION is always
TRANSACTION, and ACCESS is always SEQUENTIAL.
The FILE STATUS clause is explained under "I/O Error Processing" later in
this chapter. The CONTROL-AREA clause is explained under the section
"Return Information".
The OPEN statement determines the availability of the file, and, if successful,
results in the file being in an OPEN mode. You must always open the file
with the 1-0 phrase, as shown in figure 3.2 at
m.
The WRITE statement places onto the work station screen a set of data-items
in your program generated by Data Definition Statements. The statements
are copied into the program at compilation, as shown in the example in figure
3.2 at
II.
The format of the WRITE statement is as follows:
WRITE record-name
[FROM identifier-1]
[FORMAT IS literal-2]
[STARTING AT LINE literal-3]
[INDIC [IS
I
ARE]
I
[INDICATOR [IS]]
I
[INDICATORS [ARE]]
identifier-4]
CTNote: Always specify the above clauses in the order shown. The ruies and
syntax
fOf
the \VRITE statement are given in detail in the 5280 COBOL
Language Reference.
The FORMAT, STARTING AT LINE, and INDICATOR clauses are
explained in the next three sections.
The FORMAT clause designates the screen format, as defined by a set of
Data Definition Statements, that is to be written to the screen. If FORMAT
is not specified, the last specified format is written to the screen. If a series of
WRITE statements is writing the same format to the screen, you need to
specify the FORMAT clause only on the first WRITE in the series.
3- 2
IBM 5280 COBOL Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents