Previous Topic: Modifying the EXEC Processing SubroutineNext Topic: Modifying the END-OF-STEP Processing Subroutine


Modifying the DD Processing Subroutine

Modify this DD processing subroutine to increment the DD statement counter. If the DD statement UNIT parameter is CART (cartridge), have the cart count statement increment the count by 1 to keep track of the number of cartridges used per step.

  1. Increment the dd_count variable by one each time a DD statement is processed.
  2. Code the IF statement to check for a value equal to CART (cartridge) in the DD statement UNIT parameter. If the parameter is equal to CART, the following statements within the DO loop are executed.
  3. Code the DO loop to increment the cartridge count by 1.
          /********************************************************************/
          /*  Data Definition Processing Subroutine                          */
          /********************************************************************/
          DD_PROCESSING:
           dd_count = (dd_count + 1)
          If (DD.UNIT = 'CART') then
           Do
           cart_count = (cart_count + 1)
           End
          Return