Data Control Block: Difference between revisions
imported>HamTop fix |
correction |
||
| Line 1: | Line 1: | ||
A | A '''Data Control Block''' ('''DCB''') is a description of a [[Data set (IBM mainframe)|dataset]] in IBM mainframe [[Operating system|operating system]]s, such as OS/360, [[Software:MVS|MVS]], and z/OS.<ref>{{cite web | ||
| last1 = Mainframestechhelp | |||
| title = JCL DD DCB Parameter | |||
| url = https://www.mainframestechhelp.com/tutorials/jcl/dcb-parameter.htm | |||
| website = Mainframestechhelp | |||
| access-date = 23 November 2025 | |||
| archive-url = https://web.archive.org/web/20250708173553/https://www.mainframestechhelp.com/tutorials/jcl/dcb-parameter.htm | |||
| archive-date = 8 July 2025 | |||
| date = 2025 | |||
| url-status = live | |||
}}</ref> A DCB is coded in [[Assembly language|Assembler]] programs using the DCB [[Macro (computer science)|macro instruction]] (which expands into a large number of "define constant" instructions). High-level language programmers use library routines containing DCBs. | |||
The control block acted as the [[Application programming interface]] between Logical IOCS and the application program and usually was defined within (and resided within) the application program | A DCB is one of many [[Control block|control block]]s used in these operating systems. A control block is a data area with a predefined structure, very similar to a [[C syntax|C <code>struct</code>]], but typically only related to system functions. A DCB may be compared to a FILE structure in C, but it is much more complex, offering many more options for [[Access method|access method]]s. | ||
The control block acted as the [[Application programming interface]] between Logical IOCS and the application program and usually was defined within (and resided within) the application program. The addresses of I/O subroutines were resolved during a [[Linker (computing)|linkedit]] phase after compilation or else dynamically inserted at OPEN time. | |||
The equivalent control block for IBM DOS/360, DOS/VSE and z/VSE operating systems is a "DTF" (Define the file) | The equivalent control block for IBM DOS/360, DOS/VSE and z/VSE operating systems is a "DTF" (Define the file) | ||
==Typical contents | ==Typical contents == | ||
* symbolic file name (to match a [[Job Control Language|JCL]] statement for opening the file) | * symbolic file name (to match a [[Job Control Language|JCL]] statement for opening the file) | ||
* type of access (e.g. random, sequential, indexed) | * type of access (e.g. random, sequential, indexed) | ||
| Line 17: | Line 27: | ||
==Prototype DCBs== | ==Prototype DCBs== | ||
Many of the constants and variables contained within a DCB may be left blank ( | Many of the constants and variables contained within a DCB may be left blank (these default to zero).<ref>{{cite web | ||
| last1 = IBM Corporation | |||
| title = Data Event Control Block | |||
| url = https://www.ibm.com/docs/en/zos/3.2.0?topic=sifio-data-event-control-block | |||
| website = IBM.com | |||
| access-date = 23 November 2025 | |||
| archive-url = https://web.archive.org/web/20251123163100/https://www.ibm.com/docs/en/zos/3.2.0?topic=sifio-data-event-control-block | |||
| archive-date = 23 November 2025 | |||
| language = en | |||
| date = 11 September 2025 | |||
| url-status = live | |||
}}</ref> | |||
The OPEN process | The OPEN process merges the constants and variables specified in the DD [[Job Control Language|JCL]] statement, and the dataset label for existing magnetic tape and direct-access datasets, into the DCB, replacing zero values with non-zero values. | ||
A control block called the | A control block called the Job File Control Block (JFCB ) initially holds the information extracted from the DD statement for the dataset. The results of the merge are stored in the JFCB which may also be written into the DSCB during the CLOSE process, thereby making the dataset definition permanent. | ||
An example is the BLKSIZE= variable, which | An example is the BLKSIZE= variable, which usually is specified in the DCB as zero. In the DD statement, the BLKSIZE is specified as a non-zero value and this results in a program-specified LRECL (logical record length) and a JCL-specified BLKSIZE (physical block size), with the merge of the two becoming the permanent definition of the dataset. | ||
== See also == | == See also == | ||
* Data Set Control Block (DSCB), a part of VTOC | * Data Set Control Block (DSCB), a part of VTOC | ||
* [[Record-oriented filesystem]] | * [[Record-oriented filesystem]] | ||
== References == | |||
{{Reflist}} | |||
[[Category:IBM mainframe operating systems]] | [[Category:IBM mainframe operating systems]] | ||
[[Category:IBM file systems]] | [[Category:IBM file systems]] | ||
{{Sourceattribution|Data Control Block}} | {{Sourceattribution|Data Control Block}} | ||
Latest revision as of 10:29, 24 May 2026
A Data Control Block (DCB) is a description of a dataset in IBM mainframe operating systems, such as OS/360, MVS, and z/OS.[1] A DCB is coded in Assembler programs using the DCB macro instruction (which expands into a large number of "define constant" instructions). High-level language programmers use library routines containing DCBs.
A DCB is one of many control blocks used in these operating systems. A control block is a data area with a predefined structure, very similar to a C struct, but typically only related to system functions. A DCB may be compared to a FILE structure in C, but it is much more complex, offering many more options for access methods.
The control block acted as the Application programming interface between Logical IOCS and the application program and usually was defined within (and resided within) the application program. The addresses of I/O subroutines were resolved during a linkedit phase after compilation or else dynamically inserted at OPEN time.
The equivalent control block for IBM DOS/360, DOS/VSE and z/VSE operating systems is a "DTF" (Define the file)
Typical contents
- symbolic file name (to match a JCL statement for opening the file)
- type of access (e.g. random, sequential, indexed)
- physical characteristics (blocksize, logical record length)
- number of I/O buffers to allocate for processing to permit overlap of I/O
- address of I/O operating system library subroutines (e.g. read/write)
- other variables as required by the subroutines according to type
Prototype DCBs
Many of the constants and variables contained within a DCB may be left blank (these default to zero).[2]
The OPEN process merges the constants and variables specified in the DD JCL statement, and the dataset label for existing magnetic tape and direct-access datasets, into the DCB, replacing zero values with non-zero values.
A control block called the Job File Control Block (JFCB ) initially holds the information extracted from the DD statement for the dataset. The results of the merge are stored in the JFCB which may also be written into the DSCB during the CLOSE process, thereby making the dataset definition permanent.
An example is the BLKSIZE= variable, which usually is specified in the DCB as zero. In the DD statement, the BLKSIZE is specified as a non-zero value and this results in a program-specified LRECL (logical record length) and a JCL-specified BLKSIZE (physical block size), with the merge of the two becoming the permanent definition of the dataset.
See also
- Data Set Control Block (DSCB), a part of VTOC
- Record-oriented filesystem
References
- ↑ Mainframestechhelp (2025). "JCL DD DCB Parameter". https://www.mainframestechhelp.com/tutorials/jcl/dcb-parameter.htm.
- ↑ IBM Corporation (11 September 2025). "Data Event Control Block" (in en). https://www.ibm.com/docs/en/zos/3.2.0?topic=sifio-data-event-control-block.
