Change Job Exit Point
Required Parameters:
1 | Exit program data | Input | Char(*) |
2 | Length of exit program data | Input | Binary(4) |
Exit Point Name: QIBM_QWT_CHGJOB
Exit Point Format Name: CHGJ0100
The Change Job exit program is called from the job using the Change Job Command (CHGJOB) or API (QWTCHGJB)when changing a job on a job queue.
Authorities and Locks
A user must have all object (*ALLOBJ) and security administrator (*SECADM ) special authorities to add exit programs to the registration facility or to remove exit programs from the registration facility.
Required Parameters
- Exit program data
- INPUT; CHAR(*)
The data that is passed to the exit program. The data contains identification for the job being changed and the job attributes that are being changed. For details, see CHGJ0100 Format.
- Length of exit program data
- INPUT; BINARY(4)
The length of the data sent to the exit program.
CHGJ0100 Format
The following table describes the information that is located in the Exit program data parameter for the CHGJ0100 format. For detailed descriptions of the fields, see Field Descriptions. Also see the Change Job (QWTCHGJB) API for additional information.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Exit information length |
4 | 4 | CHAR(10) | Job name |
14 | E | CHAR(10) | Job user |
24 | 18 | CHAR(6) | Job number |
30 | 1E | CHAR(16) | Internal job identifier |
46 | 2E | CHAR(10) | Job queue |
56 | 38 | CHAR(10) | Job queue library |
66 | 42 | CHAR(10) | Job queue library ASP device name |
76 | 4C | CHAR(8) | Time-stamp job entered system |
84 | 54 | CHAR(1) | Job type |
85 | 55 | CHAR(1) | Job subtype |
86 | 56 | CHAR(2) | Reserved |
88 | 58 | BINARY(4) | Number of variable length key records |
92 | 5C | BINARY(4) | Offset to variable length key records |
These fields repeat, in the order listed, for each key requested. | BINARY(4) | Length of key record | |
BINARY(4) | Key | ||
CHAR(1) | Key data type | ||
CHAR(3) | Reserved | ||
BINARY(4) | Key data length | ||
CHAR(*) | Key data | ||
CHAR(*) | Reserved |
Field Descriptions
See Work Management API Attribute Descriptions (WMAttrDesc) for field names that are not documented below.
Exit information length..The length of information returned in the CHGJ0100 format.
Internal job identifier. An input value to other APIs to increase the speed of locating the job on the system. Only IBM i APIs use this identifier. The identifier is not valid following an initial program load (IPL). If you attempt to use it after an IPL, an exception occurs.
Job name.The name of the job that is being changed.
Job number.The number of the job that is being changed.
Job user.The user profile of the job that is being changed.
Job queue.The name of the job queue where the job being changed is located.
Job queue library.The name of the library where the job queue is located.
Job queue library ASP device name. The name of the auxiliary storage pool (ASP) device description for the ASP containing the library for the job queue. This field will contain hex zeros when there is no job queue associated with the job. This field will contain a name or one of the following special values:
*SYSBAS | The library is located in the system ASP or in a basic user ASP. |
*N | The name of the ASP device cannot be determined. |
Key.The key for the job attribute that was changed by the Change Job (QWTCHGJB) API. See valid keys for the list of valid keys.
Key data. The data for the job attribute that was changed by the Change Job (QWTCHGJB) API.
Key data length. The length of the data for the key data field.
Key data type. The type of dat contained by the key data field. The possible values returned in this field are:
B | The input data is in binary format. |
C | The input data is in character format. |
Length of key record.
Number of variable length key records.
Offset to variable length key records.
Reserved. An ignored field.
Time-stamp job entered system. The date and time the job entered the system. This is in system time-stamp format.
Program Data
When you register the exit program, the following is required for the program data.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | CHAR(10) | Job queue |
10 | A | CHAR(10) | Job queue library |
Field Descriptions
Job queue. The exit program will be called when a job is changed on this job queue. The following special value is supported:
*ANY | The program is called when a job is changed on any job queue. |
Job queue library. The name of the library that contains the job queue. The following special value is supported:
*ANY | The program is called when a job is changed on any job queue matching the job queue name, regardless of the library. |
Usage Notes
- The exit program is called from the job executing the CHGJOB command or API.
- When the job queue is being changed for a job, the exit program is called when the program data in the registration facility matches the original job queue.
- The exit program is called after the requested job attributes have been changed.
- The information is retrieved from the registration facility and saved the first time the exit is used in a job. Changes to the job queues registered may not be reflected until a new job starts.
- The exit program is not called from system jobs.
- Exceptions signaled to the caller of the exit program will not cause the Change Job to fail.
- The exit program cannot call the Change job command or API, as this will create a recursive loop condition.
- See the Command Analyzer Retrieve and Command Analyzer Change exit points and the Job Notification exit point for other related exit points.
Exit program introduced: 7.4