Change Current Job (QWCCCJOB) API


  Required Parameter Group:


  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.

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 Identifier Descriptions

Exit key. Whether the Exit key is set as pressed for the job. It must have a value of 0 or 1.

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.

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.

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



API introduced: V2R3

[ Back to top | Work Management APIs | APIs by category ]