z/OS JES2 Installation Exits
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Programming considerations

z/OS JES2 Installation Exits
SA32-0995-00

  1. The accounting field resides in a 144-byte work area pointed to by X003ACCT in the XPL passed to the exit in register 0.
  2. If you need to verify the existence of a JOB rather than a started task (STC) or TSO/E logon, this can be done by comparing the JCTJOBID field to a “J”. The presence of a “J” indicates the existence of a JOB.
  3. If you need to change the scheduling environment, use the JCTSCHEN field in the JCT.
  4. The ACCTFLD parameter on the JOBDEF statement indicates whether JES2 should scan the accounting field of a JOB statement. For further details concerning the use of the ACCTFLD parameter, see z/OS JES2 Initialization and Tuning Reference.

    If the ACCTFLD parameter indicates that the scan is to be performed, and if this exit is implemented and enabled, input processing will call your exit routine to perform the scan. If your exit routine passes a return code of 0 or 4 to JES2, input processing will call the existing HASPRSCN accounting field scan subroutine after your routine has executed. Note that if both routines are to be called, your routine should not duplicate HASPRSCN processing. For example, your routine should not set the fields in the JCT that are set by HASPRSCN. However, if your routine passes a return code of 8 or 12 to JES2, JES2 suppresses execution of HASPRSCN. If the ACCTFLD parameter indicates that the scan is to be performed but the exit is disabled, JES2 calls only HASPRSCN; your exit routine is not called and is not given the opportunity to allow or suppress HASPRSCN execution. If the ACCTFLD parameter indicates that a scan is not to be performed, your exit routine is not called, even if this exit is enabled, and execution of HASPRSCN is also suppressed.

  5. The ACCTFLD parameter on the JOBDEF statement indicates whether JES2 will cancel a job if the accounting field on the JOB statement is invalid or if a JCL syntax error has been detected during input processing. Note that your exit routine can affect this termination processing. For example, ACCTFLD=REQUIRED indicates that JES2 should scan the accounting field, that the job should be canceled if the accounting field is invalid, and that the job should be canceled if a JCL syntax error has been found. If you pass a return code of 8 to JES2, HASPRSCN is not called, therefore cannot terminate a job with an invalid accounting field, even though ACCTFLD=REQUIRED. Also note that HASPRSCN scans the accounting field passed in X003ACCT. Therefore, if your routine alters this field, you affect HASPRSCN processing.
  6. The specification of the ACCTFLD parameter is stored in the HCT, in field $RJOBOPT. If your exit routine is meant to completely replace HASPRSCN, you may want to access this field for use by your algorithm.
  7. Typically, use this exit, rather than Exit 2, to alter the JCT directly. If you use Exit 2 to alter the JCT, later processing might override your changes. The job exit mask and the spool partitioning mask are exceptions. See note 2 of Exit 2 for more information.
  8. An 80-byte work area pointed to by X003JXWR in the XPL is available for use by your routine. If your routine requires additional work space, use the $GETMAIN macro to obtain storage (and the $FREEMAIN macro to return it to the system when your routine has completed).
  9. When passing a return code of 12, your exit routine can pass an installation-defined error message to JES2 to be added to the JCL data set rather than the standard error message. To send an error message, generate the message text in your exit routine, move it to area pointed to by X003JXWR, and set the X003XSEM bit in X003RESP to one.
    Note: The standard error message, $HASP110, still appears in SYSLOG on this path, in addition to the installation-defined message. However, only the installation message will be placed in the JCL data set and no WTO will be issued for the installation-defined message unless Exit 3 issues the WTO itself.
  10. If there is no accounting field on a JOB statement, the length passed by JES2 to the exit routine in X003ACTL is zero. Your exit routine should take this possibility into account.
  11. If you intend to use this exit to process nonstandard accounting field parameters, you should either suppress later execution of HASPRSCN or code your exit routine to delete nonstandard parameters before passing control to HASPRSCN. If you do neither, that is, if you allow HASPRSCN to receive the nonstandard parameters, it might cancel the job because of an illegal accounting field (depending on how the ACCTFLD parameter on the JOBDEF statement is specified).

    If you change the length of the accounting field, you must reload the length into field JRWACCTL.

  12. There are three job class fields (JCTJCLAS, JCTCLASS, and JCTAXCLS) in the JCT. JCTJCLAS is the initial job execution class as set during input processing and used when building the JQE during that processing. JCTCLASS is the actual execution class. After input processing it contains the same value as JCTJCLAS, but it might be updated when the job executes if a $T command was used to update the job's class before execution. Therefore, JCTJCLAS and JCTCLASS could be different. JCTAXCLS is a copy of the actual execution class (JCTCLASS) that is propagated into the network JOB trailer. Do not use any exit routine to set the JCTAXCLS field.

    If you intend to use an exit 3 routine to change the execution class of a job, be certain to set both the JCTJCLAS and JCTCLASS fields.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014