When you create a consecutive data set, you must open the associated file for SEQUENTIAL OUTPUT. You can use either the WRITE or LOCATE statement to write records. Table 16 shows the statements and options for creating a consecutive data set.
When creating a data set, you must identify it to the operating system in a DD statement. The following paragraphs, summarized in Table 19, tell what essential information you must include in the DD statement and discuss some of the optional information you can supply.
|
Storage device |
When required |
What you must state |
Parameters |
|---|---|---|---|
|
All |
Always |
Output device Block size1 |
UNIT= or SYSOUT= or VOLUME=REF= DCB=(BLKSIZE=... |
|
Direct access only |
Always |
Storage space required |
SPACE= |
|
Direct access |
Data set to be used by another job step but not required at end of job Data set to be kept after end of job Data set to be on particular device |
Disposition Disposition Name of data set Volume serial number |
DISP= DISP= DSNAME= VOLUME=SER= or VOLUME=REF= |
|
Notes:
1Or you could specify the
block size in your PL/I program by using the ENVIRONMENT attribute. |
|||
When you create a consecutive data set you must specify:
For files associated with the terminal device (stdout: or stderr:), PL/I uses a default record length of 120 when the RECSIZE option is not specified.