COBOL copy books

COBOL copy books are distributed in CICSTS55.CPSM.SEYUCOB.

Distributed as:
Structures
Copybook names:
EYULnnnn
Note the following as you use the COBOL copy books:
  • The structure level 1 name is the resource table format name (such as, EMASSTRT).
  • The attribute names are used as subordinate level names.
  • For attributes that describe indicators, subordinate 88 levels are used. Each indicator is assigned a unique name. Hexadecimal literals are used to describe the content of the indicator setting.
  • By default,CICSPlex® SM attribute names are formed with a connecting underscore character, as in WLM_SPEC. However, earlier versions of COBOL that are supported by CICS® do not support underscores. All attribute names that contain underscores are therefore converted in the copy books to use hyphens, as in WLM-SPEC. When attribute names are passed to the API, they must contain the underscore character, not the hyphen.
  • All the resource tables use apostrophe characters as literal delimiters. When you translate or compile your program with a supplied copy book, you must specify the APOST option. Otherwise, you will receive COBOL warning messages.
  • COBOL reserves many words for its own use. Some of the CICSPlex SM resource table and attribute names conflict with these reserved words. To prevent such a conflict, any CICSPlex SM name that conflicts with a COBOL reserved word is modified by adding a suffix of -R. For example, the name of the CONNECT resource table becomes CONNECT-R and the name of the STATUS attribute becomes STATUS-R. The comment area for a name that would conflict with COBOL shows the description “-- RESERVED WORD --”. When resource table or attribute names are passed to the API, they must not include the -R suffix.
  • COBOL does not support duplicate names at different levels in the same data structure. Some of the CICSPlex SM attribute names are the same as resource table names. To prevent a duplicate name problem, any attribute name that is the same as a resource table name is modified by adding a suffix of -A. For example, the name of the DSNAME attribute becomes DSNAME-A. The name of the DSNAME resource table remains unchanged. The comment area for an attribute that has the same name as a resource table shows the description “-- RESERVED WORD --”. When attribute names are passed to the API, they must not include the -A suffix.
  • The table length field is a concatenation of the resource table format name and the constant TBL-LEN, connected by a hyphen (such as, EMASSTRT-TBL-LEN).

Mapping of the resource table data types to COBOL data types

The resource table data types are mapped into the valid set of COBOL data types. However, exact mapping is not always possible. The resource table data types are mapped as follows:

          PIC S9(0004) USAGE BINARY  - 2-byte binary numeric values
 
          PIC S9(0008) USAGE BINARY  - 4-byte binary numeric values
                                     - 4-byte intervals
 
          PIC S9(0016) USAGE BINARY  - Time stamps and 8-byte intervals
                                     - 8-byte binary numeric values
 
  PIC S9(nnnn) USAGE PACKED-DECIMAL  - Packed decimal data
 
                        PIC X(0001)  - 1-byte binary and bit indicators
 
                        PIC X(nnnn)  - Character data
                                     - Binary values greater than 8 bytes
                                     - Odd number binary values less than
                                       8 bytes

Sample COBOL copy book

This sample is a representative extract of a COBOL resource table copy book:

  * -------------------------------------------------------------*
  *   Name = EYUL2400                                            *
  *   Format Name = EMASSTRT                                     *
  *   Version = 0001                                             *
  *   Status = CPSMREL(0310)                                     *
  *   Function = Base Table Structure generator                  *
  *   Format definition for this element = EMASSTRT              *
  *   Valid Operations = None                                    *
  *   Valid Actions = None                                       *
  * -------------------------------------------------------------*
   01 EMASSTRT.
  * Notify CICS System Start Event
     02 CMASNAME       PIC X(0008).
  * CMAS Name
     02 PLEXNAME       PIC X(0008).
  * CICSPlex Name
     02 CSYSNAME       PIC X(0008).
  * CICS System Name
     02 MON-SPEC       PIC X(0008).
  * Monitor Spec Name
     02 RTA-SPEC       PIC X(0008).
  * Real Time Analysis Spec Name
     02 WLM-SPEC       PIC X(0008).
  * Work Load Manager Spec Name
     02 STATUS-R       PIC X(0001).
  * Status                              -- RESERVED WORD --
       88 LOCAL        VALUE X'80'.
  * Local MAS
       88 REMOTE       VALUE X'40'.
  * Remote MAS
     02 DYNROUTE       PIC X(0001).
  * Dynamic Routing Mode
       88 ACTIVE       VALUE X'01'.
  * Routing ACTIVE
       88 SUSPEND      VALUE X'02'.
  * Routing SUSPENDED
     02 DYNTYPE        PIC X(0003).
  * Dynamic Routing Type
       88 WLMTOR       VALUE 'TOR'.
  * Routing TOR
       88 WLMAOR       VALUE 'AOR'.
  * Routing AOR
     02 DESC           PIC X(0030).
  * Description
     02 CSYSAPPL       PIC X(0008).
  * CICS System VTAM APPLID
     02 EYU-RSV0015    PIC X(0005).
Note: VTAM® is now z/OS® Communications Server.
  * Alignment Padding
     02 MASSTART       PIC S9(0016) USAGE BINARY.
  * MAS Start STCK Value
     02 TMEZONEO       PIC X(0001).
  * Time Zone Offset
     02 TMEZONE        PIC X(0001).
  * Time Zone
     02 EYU-RSV0019    PIC X(0002).
  * Alignment Padding
     02 DAYLGHTSV      PIC S9(0008) USAGE BINARY.
  * DayLight saving in effect
     02 SYSID          PIC X(0004).
  * MAS System Id
     02 OPSYSREL       PIC X(0004).
  * MAS Op Sys Release
     02 MVSNAME        PIC X(0004).
  * MVS System Name
     02 JOBNAME        PIC X(0008).
  * MAS Job Name
     02 CECNAME        PIC X(0008).
  * CEC Name
     02 SYSPLEX        PIC X(0008).
  * SYSPlex Name
       02 EYU-RSV0257  PIC X(0004).
  * Alignment Padding
  * -------------------------------------------------------------*
  *                                                              *
  *   EMASSTRT Constants for Table                               *
  *                                                              *
  * -------------------------------------------------------------*
   01 EMASSTRT-TBL-LEN PIC S9(4) USAGE BINARY VALUE 152.