z/OS TSO/E Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Possible uses

z/OS TSO/E Customization
SA32-0976-00

Some possible uses of the SUBMIT exit are described below. The exit can perform several different tasks by using different control switches and return codes. For example, in one invocation, the exit may delete the current statement and also indicate to the SUBMIT command processor that it wants to add a new statement.
  • Cancel a SUBMIT request

    For example, if a user provides incorrect information on a JCL statement, you can cancel the job before it starts to execute. To cancel a job after it starts to execute, use an SMF exit. For more information about SMF exits you can use, see .

    The SUBMIT exit can check the user ID, job name, and individual JCL statements. It can decide, based on your own criteria, to cancel a SUBMIT request. If the exit cancels processing, the SUBMIT command processor does not issue a message. Therefore, before the exit cancels a request, it should display an appropriate message to the user.

    To cancel SUBMIT processing, the exit should:
    • Obtain storage for a message and supply the message text
    • Set word 2 to the address of this message. Set a control bit on in word 6, set a return code of 8, and return.

      The SUBMIT command processor displays the message and then invokes the exit again.

    • When the exit gets control again, the bit in word 6 is still on. The exit turns off the bit in word 6, sets a return code of 16, and returns.
  • Process statements in addition to the JOB statement
    By default, the exit gets control only for a JOB statement. The exit can set various control switches in word 5 to indicate to the SUBMIT command processor that it wants to process additional types of statements, such as:
    • EXEC statements
    • DD statements
    • Commands
    • JES2 and JES3 control statements.

    To process other types of statements, set the appropriate bit(s) of byte 0 in word 5. For example, if you want to process DD statements in addition to the JOB statement, set bit 2 of byte 0 in word 5.

    When the exit gets control, it checks bytes 2 and 3 of word 5 to identify the type of statement it is getting.

  • Delete the current JCL statement
    To delete the current JCL statement, the exit:
    • Sets word 1 to zero
    • Sets a return code based on the type of processing it is doing
    • Optionally, sets a bit on in word 6 (by setting this bit, the exit can determine the processing that occurred when it receives control again)
    • Returns to the SUBMIT command processor
  • Add a new statement after the current statement
    To add a new statement, the exit:
    • Sets return code 4, turns on a bit in word 6, and returns.
    • When the exit gets control again, word 1 is zero and the bit in word 6 is still on. The exit supplies the new statement, sets word 1 to the address of the new statement, turns off the bit in word 6, sets a return code of 0, and returns.
  • Change the current statement
    The exit can check the JCL statement and either change or add a parameter. Some examples of the changes or additions the exit can make on a JOB statement include:
    • Account number and accounting information
    • Programmer's name
    • Job class (CLASS=)
    • Priority (PRTY=)
    • Special job processing such as placing a job on hold (TYPRUN=)
    To add or change the account number or accounting information on the JOB statement, the exit:
    • Replaces the information in the current statement
    • Sets a return code based on the type of processing it is performing and returns
    Note: Word 7 and word 8 of the parameter list contain the address of the reconstructed logon job accounting information and the address of a halfword containing the length of that information, respectively. Those addresses are set up by the SUBMIT exit interface routine (IKJEFF09) and can be used by the SUBMIT exit (IKJEFF10). The information addressed by word 7 has already been processed, so changing the contents of the data pointed to by word 7 in the exit will have no effect on the accounting information on the job statement.
    To change parameters or add other parameters on the JOB statement or other JCL statements, the exit:
    • Replaces the information in the current statement
    • Sets a return code based on the type of processing it is performing and returns
  • Continue a statement
    If the exit adds or changes information on the JCL statement, it may have to continue the statement. To continue a statement, the exit:
    • Changes the current statement to indicate continuation. The exit can add a comma after the last character of the last operand, or add a non-blank character in column 72.
    • Sets a return code of 4, sets a bit on in word 6, and returns.
    • When the exit receives control again, word 1 is zero and the bit in word 6 is still on. The exit supplies the address of the continuation statement in word 1 and turns off the bit in word 6. The exit sets a return code based on the processing it is performing and returns.
  • Customize the JOB statement

    You can either supply job information the user did not supply, or override the information a user specified. For example, you may want to minimize the information users must specify on the JOB statement, thus keeping inexperienced users from having to use JCL. You may want to supply accounting information or a job class.

    You may also want to include a password. Generally, a password is not needed on the JOB statement. For example, passwords are not required if users submit jobs to execute at the same node on which they are defined.

    The password is required on the JOB statement if:
    • Your RACF® users are defined with the same user ID and password on more than one node in a network, and
    • They use the JES control statement //*ROUTE XEQ to route jobs to another node.

    The SUBMIT exit can add the password to the JOB statement by retrieving the password from the terminal status block (TSB). However, by default, the passwords of users defined to RACF are not stored in the TSB. To have the logon processor store the passwords in the TSB, use the logon pre-prompt exit (IKJEFLD or IKJEFLD1). Then, the SUBMIT exit can retrieve the password from the TSBPSWD field and change the JOB statement when needed.

    Using the logon pre-prompt exit, set the "Store password in TSB" bit on (bit 3 of byte 2 of the control switches) to have the logon processor store the passwords in the TSB for RACF users. For more information, see Writing a logon pre-prompt exit (IKJEFLD/IKJEFLD1).

  • Determine the type of the current statement.
    When the exit gets control, word 1 contains the address of the current statement. The SUBMIT command processor also sets control switches in word 5 to indicate the type of statement it is passing. The different bits of bytes 2 and 3 (word 5) indicate whether the statement is a JOB, EXEC, or DD statement, a command, a comment statement, or a JES2 or JES3 control statement. Several bits also indicate whether the statement is:
    • Null (bit 4 of byte 2)
    • An operand that is to be continued (bit 5 of byte 2)
    • A statement that is to be continued (bit 6 of byte 2)
    • A statement that is a continuation statement (bit 7 of byte 2)

    In general, the exit bases its processing on the type of statement that it gets when it receives control. For example, bit 7 (of byte 2 in word 5) indicates that the current statement is a continuation of the previous statement that the exit processed before it returned control to the SUBMIT command processor.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014