Find EDRS Job (QxdaFindEDRSJob) API


  Required Parameter Group:

1 Connection handle Input Binary(4)
2 Job-associated user data Input Char(*)
3 Length of job-associated user data Input Binary(4)
4 Receiver variable Output Char(*)
5 Length of receiver variable Input Binary(4)
6 Receiver variable format Input Char(8)
7 Number of jobs found Output Binary(4)
8 Number of jobs returned Output Binary(4)
9 Error code I/O Char(*)

  Service Program: QXDAEDRS

  Default Public Authority: *USE

  Threadsafe: Conditional; see Usage Notes

The Find EDRS Job (QxdaFindEDRSJob) API is used to find all jobs with user-defined data associated with the Connect to EDRS Server (QxdaConnectEDRS) API that matches the data passed to this API.


Authorities and Locks

None.


Required Parameter Group

Connection handle
INPUT; BINARY(4)

The handle number of the connection in which to find jobs. The connection handle must have been generated by the Connect to EDRS Server (QxdaConnectEDRS) API in the current job and activation group.

Job-associated user data
INPUT; CHAR(*)

User data that also was passed to the Connect to EDRS Server (QxdaConnectEDRS) API. This may be the complete user data or only a part of it. If it is only part, it must be the beginning of the user data string.

Length of job-associated user data
INPUT; BINARY(4)

The length of the user data to compare.

Receiver variable
OUTPUT; CHAR(*)

Space for the job information to be returned. This information is returned as an array of QJBI0100 structures, one for each job found. For the format of each array element, see QJBI0100 Format.

Length of receiver variable
INPUT; BINARY(4)

Length (in bytes) of the receiver variable provided to return information about the jobs found.

Receiver variable format
INPUT; CHAR(8)

The format of the structure in which to return information about the jobs found. The possible value is:

QJBI0100 Basic receiver variable structure.

Number of jobs found
OUTPUT; BINARY(4)

The number of jobs found with associated user data that matches the user data passed in. This is the total number found, even if the information for all the jobs cannot fit in the space provided.

Number of jobs returned
OUTPUT; BINARY(4)

The actual number of jobs for which information was returned.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.


QJBI0100 Format

The following table shows the structure of the QJBI0100 format. For more details about the fields in this table, see Field Descriptions.

Offset Type Field
Dec Hex
0 0 BINARY(4) Process ID
4 4 CHAR(10) Job name
14 E CHAR(10) Job user name
24 18 CHAR(6) Job number
30 1E CHAR(16) Internal job identifier
46 2E CHAR(2) Reserved


Field Descriptions

Internal job identifier. The internal job identifier. This value is sent to other APIs to speed the process of locating the job on the system.

Job name. The name of the job found.

Job number. The number of the job found.

Job user name. The name of the initial user of the job found.

Process ID. The process ID (PID) of the job found.

Reserved. Reserved field; it must be initialized to 0x00.


Usage Notes

This function may be called from the initial thread of a job only.


Error Messages

Message ID Error Message Text
CPF180C E Function &1 not allowed.
CPF24B4 E Severe error while addressing parameter list.
CPF3C90 E Literal value cannot be changed.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPFB750 E Connection handle specified not valid.
CPFB751 E Parameter &1 passed not correct.
CPFB752 E Internal error in &1 API.
CPFB756 E Rollback operation performed.
CPFB757 E The connection is suspended.
CPFB758 E The EDRS server system has been switched.


API introduced: V4R4
Top | Database and File APIs | APIs by category