Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

Using record-oriented data transmission

Specifying record format
Defining files using record I/O
Specifying ENVIRONMENT options
CONSECUTIVE
ORGANIZATION(CONSECUTIVE)
CTLASA|CTL360
LEAVE|REREAD
Creating a data set with record I/O
Essential information
Accessing and updating a data set with record I/O
Essential information
Example of consecutive data sets

PL/I supports various types of data sets with the RECORD attribute (see Table 19). This section covers how to use consecutive data sets.

Table 16 lists the statements and options that you can use to create and access a consecutive data set using record-oriented data transmission.

Table 16. Statements and options allowed for creating and accessing consecutive data sets
File declaration1
Valid statements,2 with
Options you must specify
Other options you
can specify
SEQUENTIAL OUTPUT
BUFFERED
WRITE FILE(file-reference)
FROM(reference);
 
LOCATE based-variable
FILE(file-reference);
 
 
 
SET(pointer-reference)
SEQUENTIAL OUTPUT
WRITE FILE(file-reference)
FROM(reference);
 
SEQUENTIAL INPUT
BUFFERED
READ FILE(file-reference)
INTO(reference);
 
READ FILE(file-reference)
SET(pointer-reference);
 
READ FILE(file-reference)
IGNORE(expression);
 
SEQUENTIAL INPUT
READ FILE(file-reference)
INTO(reference);
 
READ FILE(file-reference)
IGNORE(expression);
 
SEQUENTIAL UPDATE

BUFFERED
READ FILE(file-reference)
INTO(reference);
 
READ FILE(file-reference)
SET(pointer-reference);
 
READ FILE(file-reference)
IGNORE(expression);
 
REWRITE FILE(file-reference);
 
 
 
 
 
 
 
 
 
FROM(reference)
SEQUENTIAL UPDATE
READ FILE(file-reference)
INTO(reference);
 
READ FILE(file-reference)
IGNORE(expression);
 
REWRITE FILE(file-reference)
FROM(reference);
 
Notes:
  1. The complete file declaration would include the attributes FILE, RECORD and ENVIRONMENT.
  2. The statement READ FILE (file-reference); is a valid statement and is equivalent to READ FILE(file-reference) IGNORE (1);

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)