CBFORMAT subcommand — format a control block

Use the CBFORMAT subcommand to format and display a control block or data area that is defined in the exit data table. CBFORMAT can also be used to test and run user-written formatting routines and control block models. Control blocks and data areas scanned, mapped, and formatted lists the control blocks and data areas that CBFORMAT formats.

The maximum size of the control block or data area is 64 kilobytes.

After successful processing, CBFORMAT sets X, the current address, to the starting address of the data area being formatted. If a data area has no IPCS formatting support, IPCS issues message BLS17004I, which identifies the requested control block or data area name specified with the STRUCTURE parameter.

You can use the CBFORMAT subcommand to format literal data as if it was a valid instance of a control block. IBM® does not recommend this use unless:
  • The control block involved remains valid when removed from its original setting.
  • You recognize that it is inappropriate, for example, to ask the service to format a symbolic literal as a task control block (TCB) and then to use the formatted TCB for diagnosis.
  • Syntax
      { CBFORMAT | CBF }
    
                    data-descr
                    [ EXIT | NOEXIT ]
                    [ FORMAT(name [level]) ]
                    [ MODEL(name) ]
                    [ VIEW(fieldlist) ]
    -------- SETDEF-Defined Parameters -------------------------
    Note: You can override the following SETDEF parameters.
    See SETDEF subcommand — set defaults.
                    [ FLAG(severity) ]
                    [ PRINT | NOPRINT ]
                    [ TERMINAL | NOTERMINAL ]
                    [ TEST | NOTEST ]               
  • Parameters
    data-descr
    Specifies the data description parameter, which consists of five parts:
    • An address (required)
    • Address processing parameters (optional)
    • An attribute parameter (see the following note)
    • Array parameters (optional)
    • A remark parameter (optional)
    See Data description parameter for the use and syntax of the data description parameter.
    Note: The STRUCTURE(cbname) attribute parameter is required, except with FORMAT and MODEL. All other attribute parameters are optional.
    EXIT or NOEXIT
    EXIT processes all formatting exits defined in the exit data table for a given control block, after the control block has formatted successfully. NOEXIT requests no formatting exits, and is the default.
    FORMAT(name[level])
    FORMAT identifies the user-written formatter program to be used to format the data. See z/OS MVS IPCS Customization for details about formatting exits.

    The level option can be one of the following:

    HBB3310
    It causes a BLSRESSY to be passed in ABITS(31) format.
    HBB7703
    It causes a BLSRESSY to be passed in ABITS(64) format. If level is omitted, the default is HBB7703 for compatibility with CBFORMAT.
    Note: FORMAT is intended for use during program development of new formatter support. It does not require use of the STRUCTURE(cbname) attribute parameter.
    MODEL(name)
    Identifies the user-written control block model to be used to format the data. z/OS MVS IPCS Customization describes how to use formatting models.
    Note:
    1. MODEL is intended for use during control block model development of new formatter support. It does not require use of the STRUCTURE(cbname) attribute parameter.
    2. MODEL does not influence how IPCS resolves the data description. If a MODEL is used in resolution, it is the one that would have been used to support formatting STRUCTURE(cbname) except for this override.
    3. When MODEL(name) supplies a control block length, the length is compared with the default length generated by the data-descr, and the longer of the two lengths is used during formatting.
    VIEW(fieldlist)
    VIEW sets the view control field of the format parameter. Values for fieldlist can be any combination of the following options:
    hex value
    A 4-digit hexadecimal value that displays a particular field you have defined in your model.
    ALL
    Displays all the control block fields.
    DEFINED
    Displays only the defined control block fields and is the default.
    FLAGS
    Displays significant bits in the flag bytes with explanations.
    KEYFIELDS
    Displays the key fields of defined control blocks.
    LINK
    Displays the control block linkage field and uses it to display attached blocks.
    If VIEW is not specified, CBFORMAT uses a default of VIEW(DEFINED).
  • Return codes
    Code Explanation
    00 Successful completion.
    04 Attention, subcommand completed with a condition that may be of interest to you.
    08 Error, subcommand encountered an error condition that may be of interest to you.
    12 Severe error, an error condition or user request forced early end to the subcommand processing.
    16 Ending error, CBFORMAT did not recognize the control block type specified with the STRUCTURE parameter.
  • Example 1: Format the CVT.
    • Action
      COMMAND ===>  cbformat cvt structure(cvt)
    • Result

      This example formats the CVT. (No display is shown here because of the control block's size.) Note that the STRUCTURE parameter can be omitted from this example because IPCS always defines the CVT as a symbol and has STRUCTURE as part of its definition. If a symbol is defined in the IPCS symbol table and if that symbol has the STRUCTURE attribute assigned, the STRUCTURE parameter does not need to be specified.

  • Example 2: Format the CSD.
    • Action
      COMMAND ===> cbformat f632d0. structure(csd)
    • Result

      CBFORMAT generates the formatted control block with offsets, as Figure 1 shows.

      Figure 1. Example CBFORMAT command output (formatting CSD)
      CSD: 00F632D0
         +0000  CSD...... CSD       CPUJS.... 8000      CHAD..... 0000
         +0008  CPUAL.... 8000      CPUOL.... 0001      SCFL1.... 00
         +000D  SCFL2.... 00        SCFL3.... 00        SCFL4.... 00
         +0010  AXPAL.... 0000      AXPOL.... 0000      MF1CP.... 0000
         +0016  ACR...... 00        FLAGS.... 80        MAFF..... 00000000  0000000
         +0020            00000000  00000000  00000000  00000000  00000000  0000000
         +0038            00000000  00000000  00000000  00000000  00000000  0000000
         +0050            00000000  00000000  00000000  00000000  00000000  0000000
         +0068  RV044.... 0000      DDRCT.... 0000      GDCC..... 00000001
         +0070  GDINT.... 00000001  GDTOD.... 00000001  TCNT..... 00000000
         +007C  UCNT..... 00000000  MASK..... 80004000  20001000  08000400  0200010
         +0090            00800040  00200010  00080004  00020001
         +00A0  IOSID.... 00        IOML..... 02        CPUVF.... 0000
         +00A8  CMT...... 019C5708
  • Example 3: Format a captured unit control block (UCB).
    • Action
      COMMAND ===> cbformat 006f8028. structure(ucb)
    • Result

      CBFORMAT generates the formatted UCB with offsets, as Figure 2 shows. The actual UCB Common Segment Address field is useful when you input a captured UCB address and want to learn the UCB's actual address. In this example, the captured UCB provides a view of the actual UCB at address 01D0E028.

      Figure 2. Example CBFORMAT command output (formatting captured UCB)
      UCBPRFIX: 006F8020
         -0008  LOCK..... 00000000  IOQ...... 00000000
      
      UCBOB: 006F8028
         +0000  JBNR..... 00        FL5...... 00        ID....... FF
         +0003  STAT..... 00        CHAN..... 8000      FL1...... 00
         +0007  FLB...... 20        NXUCB.... 00000000  WGT...... 06
         +000D  NAME..... UCB       TBYT1.... 00        TBYT2.... 00
         +0012  DVCLS.... 41        UNTYP.... 01        FLC...... 00
         +0015  EXTP..... D0E001    CTCAL.... 00000000  CTCF1.... 00
         +001D  RV042.... 000000    CTCWA.... 00000000
      
      UCBCMXT: 006F8000
         +0000  ETI...... 19        STI...... 00        FL6...... 00
         +0003  ATI...... 2C        SNSCT.... 02        FLP1..... 00
         +0006  STLI..... 00        FL7...... 00        IEXT..... 01D55B68
         +000C  CHPRM.... 00        SATI..... 00        ASID..... 0000
         +0011  WTOID.... 000000    DDT...... 00FCCCC0  CLEXT.... 00000000
         +001C  DCTOF.... 0000
      
      UCBXPX: 01D55B68
         +0000  RSTEM.... 00        MIHKY.... 07        MIHTI.... 00
         +0003  HOTIO.... 00        IOQF..... 00000000  IOQL..... 00000000
         +000C  SIDA..... 0000      SCHNO.... 0000      PMCW1.... 0000
         +0012  MBI...... 0000      LPM...... 00        LPUM..... 00
         +0017  PIM...... 00        CHPID.... 00000000  00000000
         +0020  LEVEL.... 01        IOSF1.... 40        IOTKY.... 00
         +0023  MIHFG.... 00        LVMSK.... 00000001
      
       ACTUAL UCB COMMON SEGMENT ADDRESS 01D0E028
      
       DEVICE IS DYNAMIC
  • Example 4: Format a base UCB of a parallel access volume.
    • Action
      COMMAND ===> cbformat 00F0B808. structure(ucb)
    • Result

      CBFORMAT generates the formatted base UCB with offsets, as Figure 3 shows.. After the formatted base UCB, the report provides information about each alias UCB associated with the base UCB. The information includes the alias UCB's device number, address, and whether it is available for I/O requests. In this example, the alias UCB with device number 01BC at address 01D42448 is not available for I/O requests.

      Figure 3. Example CBFORMAT command output (formatting base UCB)
      UCBPRFIX: 00F0B800
         -0008  LOCK..... 00000000  IOQ...... 00FC1800
      
      UCBOB: 00F0B808
         +0000  JBNR..... 00        FL5...... 88        ID....... FF
         +0003  STAT..... 84        CHAN..... 01B0      FL1...... 40
         +0007  FLB...... 00        NXUCB.... 00000000  WGT...... 08
         +000D  NAME..... 1B0       TBYT1.... 30        TBYT2.... 30
         +0012  DVCLS.... 20        UNTYP.... 0E        FLC...... 00
         +0015  EXTP..... F0B7E0    VTOC..... 00010100  VOLI..... 3381B0
         +0022  STAB..... 04        DMCT..... 00        SQC...... 00
         +0025  FL4...... 00        USER..... 0000      BASE..... 00F0B608
         +002C  NEXP..... 01D41F88
      
      UCBCMXT: 00F0B7E0
         +0000  ETI...... 00        STI...... 00        FL6...... 09
         +0003  ATI...... 40        SNSCT.... 20        FLP1..... 22
         +0006  STLI..... 00        FL7...... 00        IEXT..... 01D54D38
         +000C  CHPRM.... 00        SATI..... 00        ASID..... 0000
         +0011  WTOID.... 000000    DDT...... 00FCA728  CLEXT.... 00F0B7B0
         +001C  DCTOF.... 0000
      
      UCBXPX: 01D54D38
         +0000  RSTEM.... 00        MIHKY.... 04        MIHTI.... 00
         +0003  HOTIO.... 40        IOQF..... 00000000  IOQL..... 00000000
         +000C  SIDA..... 0001      SCHNO.... 0029      PMCW1.... 289C
         +0012  MBI...... 0049      LPM...... C0        LPUM..... 40
         +0017  PIM...... C0        CHPID.... 60700000  00000000
         +0020  LEVEL.... 01        IOSF1.... 08        IOTKY.... 00
         +0023  MIHFG.... 00        LVMSK.... 00000001
      
       Actual UCB Common segment address 00F0B808
      
       Device is dynamic
      
       Base UCB of a parallel access volume
      
       Base UCB has usable alias UCB 01B4 at address 01D42188
      
       Base UCB has usable alias UCB 01B8 at address 01D422E8
      
       Base UCB has unusable alias UCB 01BC at address 01D42448
  • Example 5: Format an alias UCB of a parallel access volume.
    • Action
      COMMAND ===> cbformat 01d422e8. structure(ucb)
    • Result

      CBFORMAT generates the formatted alias UCB with offsets (Figure 4). After the formatted alias UCB, the report states whether the alias UCB is available for I/O requests and provides information about the base UCB.

      Figure 4. Example CBFORMAT command output (formatting alias UCB)
      UCBPRFIX: 01D422E0
         -0008  LOCK..... 00000000  IOQ...... 00FC1980
      
      UCBOB: 01D422E8
         +0000  JBNR..... 00        FL5...... 88        ID....... FF
         +0003  STAT..... 04        CHAN..... 01B8      FL1...... 00
         +0007  FLB...... 00        NXUCB.... 00000000  WGT...... 08
         +000D  NAME..... 1B0       TBYT1.... 30        TBYT2.... 30
         +0012  DVCLS.... 20        UNTYP.... 0E        FLC...... 00
         +0015  EXTP..... D422C1    VTOC..... 00000000  VOLI..... 00000000
         +0022  STAB..... 00        DMCT..... 00        SQC...... 00
         +0025  FL4...... 00        USER..... 0000      BASE..... 00F0B608
         +002C  NEXP..... 01D42248
      
      UCBCMXT: 01D422C0
         +0000  ETI...... 00        STI...... 00        FL6...... 09
         +0003  ATI...... 40        SNSCT.... 18        FLP1..... 22
         +0006  STLI..... 00        FL7...... 00        IEXT..... 01D550B8
         +000C  CHPRM.... 00        SATI..... 00        ASID..... 0000
         +0011  WTOID.... 000000    DDT...... 00FCA728  CLEXT.... 00F0B7B0
         +001C  DCTOF.... 0000
      
      UCBXPX: 01D550B8
         +0000  RSTEM.... 00        MIHKY.... 00        MIHTI.... 00
         +0003  HOTIO.... 40        IOQF..... 00000000  IOQL..... 00000000
         +000C  SIDA..... 0001      SCHNO.... 0034      PMCW1.... 289C
         +0012  MBI...... 0051      LPM...... C0        LPUM..... 40
         +0017  PIM...... C0        CHPID.... 60700000  00000000
         +0020  LEVEL.... 01        IOSF1.... 08        IOTKY.... 00
         +0023  MIHFG.... 00        LVMSK.... 00000001
      
       Actual UCB Common segment address 01D422E8
      
       Device is dynamic
      
       Usable alias UCB of a parallel access volume
      
       Base UCB 01B0 is at address 00F0B808