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


Modifying the DD Processing Subroutine

Change this subroutine to increment the DD statement counter by one each time a DD statement is encountered and count the number of DD statement cartridge UNIT parameters and increment the count by one.

  1. Code this statement to count the number of DD statements in the submitted JCL. This variable is incremented by one each time a DD statement is processed.
  2. Code this 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