Define Constant (DC) is used to create and initialize fields at assembly time.  The word “constant” in the title is something of a misnomer since fields created with DC are initialized with their assembled values when the program is loaded, but are subject to modification when the program begins execution.  This declarative has the following format,


                    name       DC      dTLn’constant’   


where ‘name’ is the optional field name,

          ‘d’ is a duplication factor which allows you to create consecutive copies of the field -

              a 0 duplication factor leaves the location counter unchanged,

          ‘T’ is a data type -   C  -  Character

                                        Z  -   Zoned Decimal

                                        P  -   Packed Decimal

                                        H  -   Binary Halfword

                                        F  -   Binary Fullword

                                        A  -   Address

                                        V  -   Virtual Address

                                        X  -    Hexadecimal

                                        B  -    Binary,

           ‘L’ stands for length,

           ‘n’ is the number of bytes in the field length,

           ‘constant’  is an appropriate constant of the specified type contained in apostrophes.


         The following are some sample DC’s.  For more information about a particular data type, consult the data type documentation.


                                    FIELD DEFINITION                   HEXADECIMAL CONTENTS


             A         DC      C’ABC’           C1C2C3

             B         DC      CL4’ ’           40404040

             C         DC      CL4’A’           C1404040

             D         DC     2C’AB’            C1C2C1C2

             E         DC      X’12AB’          12AB

             F         DC      P’12345          12345C

             G         DC      H’25’            0019

             H         DC      F’-3’            FFFFFFFD

             I         DC      CL3      Assembly Error - No constant

                       DC      CL30’ ’  Field name is not required

             J         DC     0CL5      0 Duplication factor

             K         DC      CL3      J And K have the same address

             L         DC      CL2      J Contains K and L