Change Current Job (QWCCCJOB) API
Required Parameter Group:
1 | Changed job information | Input | Char(*) |
2 | Error code | I/O | Char(*) |
Default Public Authority: *USE
Threadsafe: No
The Change Current Job (QWCCCJOB) API lets you change information for the current job. The information that this API updates represents data that should be changed only from within the job itself. This API should be called only from the initial thread of the job.
Authorities and Locks
None.
Required Parameter Group
- Changed job information
- INPUT; CHAR(*)
The information for the job that you want to change. The information must be in the following format:
- Number of variable length records
- BINARY(4)
- Total number of all of the variable length records.
- Variable length records
- The fields of the job to change and the data used for the change. For the specific format of the variable length record, see Format for Variable Length Record.
- Error code
- I/O; CHAR(*)
The structure in which to return error information. For the format of the structure, see Error code parameter.
Format for Variable Length Record
The following table defines the format for the variable length records.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Key identifier |
4 | 4 | BINARY(4) | Length of key data |
8 | 8 | CHAR(*) | Key data |
If the length of the data is longer than the key identifier's data length, the data will be truncated at the right. No message will be issued.
If the length of the data is smaller than the key identifier's data length, the data will be padded with blanks at the right. No message will be issued.
It is not an error to specify a key more than once. If duplicate keys are specified, the last specified value for that key is used.
Each variable length record must be 4-byte aligned. If not, unpredictable results may occur.
Field Descriptions
Key data. The data used to change a specific field of the job.
Key identifier. The field of the job to change. Only specific fields of the job can be changed. See Key Identifiers for the list of valid keys.
Length of key data. The length of the data used to change a specific field of the job.
Key Identifiers
The following table lists the valid keys for the key identifier area of the variable length record.
Key ID | Type | Field Description |
---|---|---|
1 | CHAR(1) | Exit key |
2 | CHAR(1) | Cancel key |
3 | CHAR(10) | Function name |
4 | CHAR(1) | Reset Function type and Function name |
Key Identifier Descriptions
Exit key. Whether the Exit key is set as pressed for the job. It must have a value of 0 or 1.
0 | The Exit key was not pressed. |
1 | The Exit key was pressed. |
Note: The application or command that was called before this API determines how the key is set.
Cancel key. Whether the Cancel key is set as pressed for the job. It must have a value of 0 or 1.
0 | The Cancel key was not pressed. |
1 | The Cancel key was pressed. |
Note: The application or command that was called before this API determines how the key is set.
Function name. Additional information about the last high-level function initiated by the initial thread. When the Function name is set with this API, the Function type field is automatically set to a value indicating User-specified.
Note: Specifying this key and key 4 (Reset Function type and Function name) on the same API call may produce unpredictable results.
Reset Function type and Function name. Whether the Function type and Function name fields are reset to blanks. It must have a value of 0 or 1.
0 | The Function type and Function name fields are not reset to blanks. |
1 | The Function type and Function name fields are reset to blanks. |
Note: This key can be used to clear the Function type and Function name fields. Specifying this key and key 3 (Function name) on the same API call may produce unpredictable results.
Error Messages
Message ID | Error Message Text |
---|---|
CPF1863 E | Length of value not valid. |
CPF1867 E | Value &1 in list not valid. |
CPF1868 E | Value &1 for number of records not valid. |
CPF2199 E | &2 not valid for key &1. |
CPF24B4 E | Severe error while addressing parameter list. |
CPF3C90 E | Literal value cannot be changed. |
CPF3CF1 E | Error code parameter not valid. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
API introduced: V2R3