Accounting for exec functions

When a program issues an exec function, the requesting job goes through step termination, including record generation and the invocation of the IEFACTRT exit. Then the job goes through step initialization, including invocation of the IEFUSI exit. However, the new unit of work is not a job step, but a substep. The step number is unchanged, but the substep field is incremented. SMF provides the following fields to support exec processing:
  • A “step completion” flag indicates the step is ending due to an exec request. The flag is in the Completion Section of the SMF type 30 record.

    This flag indicates that the step is not really terminating (in the normal sense) and that there is another step in the job with the same step name and number.

  • A field reporting the substep number is in the ID section of the SMF type 30 record.

    This field is used in addition to job name, job start time, and step number to put records in sequence.

  • The field SMF30EXN provides the name of the program that was run. It is specified as up to 16 characters.
    Load modules can be distinguished from z/OS® UNIX executable files in the SMF30EXN field as follows:
    • Names that are longer than 8 bytes must be z/OS UNIX executable files
    • For names that are 8 bytes or less, check the terminating character:
      • X'00'—z/OS Unix executable file (z/OS UNIX program)
      • X'40'—Load module (MVS™ program)
    SMF30EXN contains information as follows:
    • z/OS UNIX executable filename. SMF30EXN provides the name of a z/OS UNIX file that is invoked using the exec family of functions. The filename can be up to 16 characters in length.

      For z/OS UNIX executable files, SMF30EXN contains the portion of the pathname after the last slash. z/OS UNIX filenames, if not truncated, are followed by the terminating character X'00'.

      For example, if the z/OS UNIX executable file with pathname /bin/grep is invoked using an exec function, SMF30EXN contains grep followed by the terminating character X'00'.

      z/OS UNIX filenames longer than 16 bytes (including the terminating character) are truncated. For example, the name /usr/joe/somelongprogramname is recorded as somelongprogramn. Because the filename is truncated, no terminating character is recorded.

      It is recommended that you not use blanks in z/OS UNIX filenames. An z/OS UNIX file with a name padded with blanks appears in the SMF type 30 record to be an load module name.

    • Load module name. For load modules invoked using exec functions, SMF30EXN contains the unqualified name of the load module, padded with blanks, to a length of 16 characters.