DS instruction

The DS instruction:
Read syntax diagramSkip visual syntax diagram
                   V         |   

Is one of the following:
  • An ordinary symbol
  • A variable symbol that has been assigned a character string with a value that is valid for an ordinary symbol
  • A sequence symbol

If symbol denotes an ordinary symbol, the ordinary symbol represents the address of the first byte of the storage area reserved. If several operands are specified, the first storage area defined is addressable by the ordinary symbol. The other storage areas can be reached by relative addressing.

Is an operand of six subfields. The first five subfields describe the attributes of the symbol. The sixth subfield provides the nominal values that determine the implicit lengths; however no constants are generated.
A DS operand has this format:
Read syntax diagramSkip visual syntax diagram
   '-duplication_factor-'        '-type_extension-'   

   '-program_type-'  '-modifier-'                  

The format of the DS operand is identical to that of the DC operand; exactly the same subfields are used and are written in exactly the same sequence as they are in the DC operand. For more information about the subfields of the DC instruction, see DC instruction.

Unlike the DC instruction, the DS instruction causes no data to be assembled. Therefore, you do not have to specify the nominal value (sixth subfield) of a DS instruction operand. The DS instruction is the best way of symbolically defining storage for work areas, input and output buffers, and so on.

Although the formats are identical, there are two differences in the specification of subfields. They are:
If symbol denotes an ordinary symbol, the ordinary symbol, as with the DC instruction:

If the DS instruction is specified with more than one operand or more than one nominal value in the operand, the label addresses the area reserved for the field that corresponds to the first nominal value of the first operand. The length attribute value is equal to the length explicitly specified or implicit in the first operand.