Programming Interface Information: This information is NOT intended to be used as Programming Interfaces of z/VM.

#### CHPBK

Prolog

Control Block Contents
CHPBK DSECT

Storage Layout

Cross Reference (Contains links to field and bit definitions)

#### CHPBK Prolog

     NAME       : HCPCHPBK
     DESCRIPTION: SPXTAPE Channel Program Block
     COPYRIGHT -  THIS MODULE IS "RESTRICTED MATERIALS OF IBM"
                  5654-030 (C) COPYRIGHT IBM CORP. - 1994, 1998
                  LICENSED MATERIALS - PROPERTY OF IBM
     DSECT      : CHPBK
     FUNCTION   : Work area to hold a channel program and
                  the resources needed (including an
                  IORBK) to issue an SPXTAPE tape I/O
                  request and handle the completion or
                  recovery procedures.
     LOCATED BY :
                  Routines:
                  HCPSPYWT - to set up the I/O operation
                  HCPSPYWI - interrupt processing
                  HCPSPZRT - to set up the I/O operation
                  HCPSPZRI - interrupt processing
                  Control block fields:
                  TAPCHPQ  - head of queue in the TAPBK
                  CHPNEXT  - next in circular queue
     CREATED BY : HCPSPYWT - SPXTAPE DUMP commands
                  HCPSPZRT - SPXTAPE LOAD and SCAN commands
     DELETED BY : HCPSPYWT - SPXTAPE DUMP commands
                  HCPSPZRT - SPXTAPE LOAD and SCAN commands
     References : HCPCHPBK requires HCPIORBK COPY

#### CHPBK Control Block Content

#### CHPBK DSECT

    Hex   Dec Type/Val   Lng Label (dup)    Comments
    ---- ---- --------- ---- -------------- --------
    0000    0 Structure      CHPBK          SPXTAPE Channel Program Block
         Reserve space for the base IORBK
    0000    0 Dbl-Word     8 CHPIORBK (45)  Base IORBK region
         Lock for this IORBK and CHPBK work area
    0168  360 Dbl-Word     8 CHPLOCK (3)    Lock to serialize this block
         Commit and recovery control data. Last items in the current block used
         to update commit cursors when successfully sent to tape.
    0180  384 Signed       2 CHPCMCLR (0)   Beginning of area to be cleared
                                            before reuse for trailer
    0180  384 Address      4 CHPCURTK       Last ticket contained in current
                                            block
    0184  388 Address      4 CHPCMSSQ       Last SSQBK
    0188  392 Address      4 CHPCMCUR       Address of next Vpage slot in
                                            last SSQBK
    018C  396 Signed       4 CHPCURHD       Displacement in header of cur hdr
    0190  400 Signed       4 CHPCMXAB       Amt of XAB data associated with
                                            last tkt remaining to be written
    0194  404 Address      4 CHPLSTCW       CCW address of the last piece of
                                            data for files that completed in
                                            the current block. If = 0 then
                                            block contains no complete files
    0198  408 Signed       4 CHPLLPTR       Last offset in page list +1 used
    019C  412 Address      4 CHPLSTHD       Hdr addr for last completed file
    01A0  416 Signed       4 CHPLBLKZ       Save last block size at last
                                            complete file/tkt in this block.
         Counters, etc.
    01A4  420 Character   16 CHPTKTS        Queue of files completed in this
                                            channel program. Moved to TAPTKTQ
                                            when I/O completes OK.
                                            Single-threaded double-headed
                                            FIFO queue terminated by zero
    01A4  420 Address      4 CHPTKTSH       Head of CHPTKTS
    01A8  424 Address      4 CHPTKTST       Tail of CHPTKTS
    01AC  428 Signed       4 CHPTKTCT       Corresponding count of files on
                                            CHPTKTS
    01B0  432 Signed       4 *              Reserved
    01B4  436 Signed       4 CHPENTRY       Current entry in the header
    01B8  440 Signed       4 CHPLIMIT       After the last entry in the hdr
    01BC  444 Signed       4 CHPLINDX       Index into CCW list of buffers
    01C0  448 Signed       4 CHPOFFST       Offset into block where data
                                            should be added
    01C4  452 Signed       4 *
    01C8  456 Signed       4 CHPPOOLC       Count of pool pages (data pages)
    01CC  460 Address      4 CHPPLIST (14)  List of pages locked for this blk
              00000038       CHPPLLEN       *-CHPPLIST Length to clear
              0000000E       CHPPLMAX       14 Maximum number of entries
    0204  516 Signed       4 *              End flag for PLIST - zero = end
              00000088       CHPCMCRL       *-CHPCMCLR Length of area to be
                                            cleared before reuse for trailer
         Queue of CHPbks link field
    0208  520 Address      4 CHPNEXT        Next work area in circular queue
         Save area across GOTO I/O request
    020C  524 Signed       4 CHPSAVE (7)    Save R3-R9 across call to IOS.QS
         Channel Program and Header Block copied from TAPBK
    0228  552 Dbl-Word     8 CHPPGM (26)    Modeset + hdr + 3*8 (desc + xab +
                                            data)
    02F8  760 Dbl-Word     8 CHPHEADR (37)  Block header
         End of CHPBK definition
    0420 1056 Dbl-Word     8 CHPRESVD (12)  Round it off
              00000318       CHPLENBY       *-CHPLOCK Extra space (after
                                            IORBK)
              00000480       CHPIOBY        *-CHPBK Whole work area size in
                                            bytes
              00000090       CHPIODW        CHPIOBY/8 Same in double words
              00000002       CHPBKCNT       2 Number of work areas per drive
         Redefinition for the channel program build area
    0228  552 Dbl-Word     8 CHPMSCCW       Modeset, if applicable
    0230  560 Address      4 CHPHDCCW       Read/write header CCW
    0234  564 Address      4 CHPHCCWA       Address of the CHPHEADR
    0238  568 Address      4 CHPCCW1        First general CCW
    023C  572 Address      4 CHPCCW1A       Address section for deblocking
    0240  576 Dbl-Word     8 CHPCCWS (20)   File write CCWs - desc, XAB, data
                                            Or read CCW's - up to 8 pages
              000000B8       CHPPGMLN       *-CHPPGM Must match size defined
                                            above
         Redefinition for the tape block header section
    02F8  760 Character    4 CHPBLKID       Generally 'XHDR', could be 'TRLR'
    02FC  764 Signed       4 CHPBLKSZ       Size of this block in bytes
    0300  768 Dbl-Word     8 CHPTIME        Time stamp
         Definition of an individual entry
    0308  776 Dbl-Word     8 CHPHDENT (0)   Start of the first entry
    0308  776 Character    8 CHPOWNER       File owner
    0310  784 Signed       4 CHPFSEQ        File sequence number for drive
    0314  788 Signed       4 CHPSYSID       System spool file ID when dumped
    0318  792 Signed       2 CHPSPID        User spool file ID when dumped
    031A  794 Bitstring    1 CHPHDFLG       Flags describing file section
    031B  795 Bitstring    1 *
    031C  796 Signed       4 CHPMAPCT       Count of map pages needed for
                                            file
    0320  800 Signed       4 CHPPAGNO       Starting relative page number
    0324  804 Signed       2 CHPPAGCT       Count of data pages in block
    0326  806 Signed       2 CHPXABSZ       Size of XAB section in block
    0328  808 Signed       2 CHPTKOFF       Offset to ticket - file
                                            descriptor
    032A  810 Signed       2 CHPXAOFF       Offset to extended attributes buf
    032C  812 Signed       2 CHPDPOFF       Offset to data pages
    032E  814 Signed       2 *

#### CHPBK Storage Layout

    *** CHPBK - SPXTAPE Channel Program Block
    *
    *     +-------------------------------------------------------+
    *   0 |                                                       |
    *     =                       CHPIORBK                        =
    *     |                                                       |
    *     +-------------------------------------------------------+
    * 168 |                                                       |
    *     =                       CHPLOCK                         =
    *     |                                                       |
    *     +---------------------------+---------------------------+
    * 180 |         CHPCURTK          |         CHPCMSSQ          |
    *     +---------------------------+---------------------------+
    * 188 |         CHPCMCUR          |         CHPCURHD          |
    *     +---------------------------+---------------------------+
    * 190 |         CHPCMXAB          |         CHPLSTCW          |
    *     +---------------------------+---------------------------+
    * 198 |         CHPLLPTR          |         CHPLSTHD          |
    *     +---------------------------+---------------------------+
    * 1A0 |         CHPLBLKZ          |                           |
    *     +---------------------------+                           |
    *     |                       CHPTKTS                         |
    *     |                           +---------------------------+
    *     |                           | 1B4
    *     +---------------------------+
    *
    *** CHPBK - SPXTAPE Channel Program Block

    *** Overlay for CHPTKTS in CHPBK
    *
    *                                 +---------------------------+
    * 1A0 ...                     1A4 |         CHPTKTSH          |
    *     +---------------------------+---------------------------+
    * 1A8 |         CHPTKTST          |         CHPTKTCT          |
    *     +---------------------------+---------------------------+
    * 1B0 |///////////////////////////|         CHPENTRY          |
    *     +---------------------------+---------------------------+
    * 1B8 |         CHPLIMIT          |         CHPLINDX          |
    *     +---------------------------+---------------------------+
    * 1C0 |         CHPOFFST          |///////////////////////////|
    *     +---------------------------+---------------------------+
    * 1C8 |         CHPPOOLC          |                           |
    *     +---------------------------+                           |
    * 1D0 |                                                       |
    *     =                       CHPPLIST                        =
    *     |                           +---------------------------+
    * 200 |                           |///////////////////////////|
    *     +---------------------------+---------------------------+
    * 208 |         CHPNEXT           |                           |
    *     +---------------------------+                           |
    * 210 |                                                       |
    *     =                       CHPSAVE                         =
    *     |                                                       |
    *     +-------------------------------------------------------+
    * 228 |                                                       |
    *     =                        CHPPGM                         =
    *     |                                                       |
    *     +-------------------------------------------------------+
    * 2F8 |                                                       |
    *     =                       CHPHEADR                        =
    *     |                                                       |
    *     +-------------------------------------------------------+
    * 420 |                                                       |
    *     =                       CHPRESVD                        =
    *     |                                                       |
    *     +-------------------------------------------------------+
    * 480
    *
    *** Overlay for CHPTKTS in CHPBK

    *** Overlay for CHPPGM in CHPBK
    *
    *     +-------------------------------------------------------+
    * 228 |                       CHPMSCCW                        |
    *     +---------------------------+---------------------------+
    * 230 |         CHPHDCCW          |         CHPHCCWA          |
    *     +---------------------------+---------------------------+
    * 238 |         CHPCCW1           |         CHPCCW1A          |
    *     +---------------------------+---------------------------+
    * 240 |                                                       |
    *     =                       CHPCCWS                         =
    *     |                                                       |
    *     +-------------------------------------------------------+
    * 2E0
    *
    *** Overlay for CHPPGM in CHPBK

    *** Overlay for CHPHEADR in CHPBK
    *
    *     +---------------------------+---------------------------+
    * 2F8 |         CHPBLKID          |         CHPBLKSZ          |
    *     +---------------------------+---------------------------+
    * 300 |                       CHPTIME                         |
    *     +-------------------------------------------------------+
    * 308 |                       CHPOWNER                        |
    *     +---------------------------+---------------------------+
    * 310 |         CHPFSEQ           |         CHPSYSID          |
    *     +-------------+------+------+---------------------------+
    * 318 |  CHPSPID    |:HDFLG|//////|         CHPMAPCT          |
    *     +-------------+------+------+-------------+-------------+
    * 320 |         CHPPAGNO          |  CHPPAGCT   |  CHPXABSZ   |
    *     +-------------+-------------+-------------+-------------+
    * 328 |  CHPTKOFF   |  CHPXAOFF   |  CHPDPOFF   |/////////////|
    *     +-------------+-------------+-------------+-------------+
    * 330
    *
    *** Overlay for CHPHEADR in CHPBK

#### CHPBK Cross Reference

    Symbol         Dspl Value
    -------------- ---- -----
    CHPBKCNT       0420 00000002
    CHPBLKID       02F8
    CHPBLKSZ       02FC
    CHPCCWS        0240
    CHPCCW1        0238
    CHPCCW1A       023C
    CHPCMCLR       0180
    CHPCMCRL       0204 00000088
    CHPCMCUR       0188
    CHPCMSSQ       0184
    CHPCMXAB       0190
    CHPCURHD       018C
    CHPCURTK       0180
    CHPDPOFF       032C
    CHPENTRY       01B4
    CHPFSEQ        0310
    CHPHCCWA       0234
    CHPHDCCW       0230
    CHPHDENT       0308
    CHPHDFLG       031A
    CHPHEADR       02F8
    CHPIOBY        0420 00000480
    CHPIODW        0420 00000090
    CHPIORBK       0000
    CHPLBLKZ       01A0
    CHPLENBY       0420 00000318
    CHPLIMIT       01B8
    CHPLINDX       01BC
    CHPLLPTR       0198
    CHPLOCK        0168
    CHPLSTCW       0194
    CHPLSTHD       019C
    CHPMAPCT       031C
    CHPMSCCW       0228
    CHPNEXT        0208
    CHPOFFST       01C0
    CHPOWNER       0308
    CHPPAGCT       0324
    CHPPAGNO       0320
    CHPPGM         0228
    CHPPGMLN       0240 000000B8
    CHPPLIST       01CC
    CHPPLLEN       01CC 00000038
    CHPPLMAX       01CC 0000000E
    CHPPOOLC       01C8
    CHPRESVD       0420
    CHPSAVE        020C
    CHPSPID        0318
    CHPSYSID       0314
    CHPTIME        0300
    CHPTKOFF       0328
    CHPTKTCT       01AC
    CHPTKTS        01A4
    CHPTKTSH       01A4
    CHPTKTST       01A8
    CHPXABSZ       0326
    CHPXAOFF       032A

This information is based on z/VM V4R3.0. Last updated on 30 Apr 2002 at 15:45:50 EDT.
Copyright IBM Corporation, 1990, 2002