Data set (IBM mainframe): Difference between revisions

Content deleted Content added
m Partitioned Datasets: text is OS/360 - changed cat to IBM Mainframe computer operating systems
Deleted comparisons that were unnecesary (at best) and sometimes incorrect. For example, "found in smaller computers such as Unix,"
Line 1:
The term '''data set''' or '''dataset''' is used to refer to [[computer file|file]]s on an [[IBM]] [[mainframe computer]], typically stored on [[Direct access storage device|DASD]] or [[magnetic tape]]. They are [[record-oriented file]]s. The term pertains to the IBM mainframe operating systems starting with [[OS/360]], and continued to be used through later systems based on that heritage, [[MVS]] system, [[OS/390]], and [[z/OS]].
 
Unlike files on [[Unix|UNIX]] systems, theyDatasets are not unstructured streams of [[byte]]s but rather are organized in various logical record and block structures determined by the DSORG (data set organization) and RECFM (record format) parameters of the DCB (Data Control Block). The [[Data Control Block|DCB]] is a data structure used to access datasets. These parameters may also be specified in the Job Control Language [[Job Control Language|JCL]] DD statements that are used to allocate them.
 
== Dataset Organization ==
Line 11:
Regardless of organization, the physical structure of each record is essentially the same, and is uniform throughout the dataset. This is specified in the DCB RECFM parameter. RECFM=F means that the records are of fixed length, specified via the LRECL parameter, and RECFM=V specifies a variable-length record. Variable-length records are prefixed by a "Record Descriptor word" containing the integer length of the record in bytes. Records of format FB and VB are fixed-blocked, and variable-blocked, respectively. This means that multiple logical records are grouped together into a single physical block on tape or disk. The BLKSIZE parameter specifies the maximum length of the block. RECFM could also specify "FBS" meaning Fixed-blocked-standard, meaning the all blocks except the last one were required to be full-length. RECFM=VBS, means Variable-blocked-spanned, meaning that a logical record could be spanned across two or more blocks, with flags in the RDW indicating whether a record segment is continued into the next block and/or was continued from the previous one.
 
This mechanism eliminates the need for using any "delimiter" byte value to separate records. The file is an abstraction of a collection of records, in contrast to thean unstructured "stream" of bytes found in systems found in smaller computers such as Unix, Windows, or MacOS. This allows data to be of any type, including binary integers, floating point, or characters, without introducing a false end-of-record condition.
 
== Partitioned Datasets ==