You use the MCOM (message complex) call to
define the beginning of a job complex and set the destinations of the basic job and the associated confirmation jobs, or
define the end of a job complex.
Setting the KDCS parameter area (1st parameter)
The table below shows the various options and the necessary entries in the KDCS parameter area.
Function of the call | Entries in the KDCS parameter area | |||||
---|---|---|---|---|---|---|
KCOP | KCOM | KCRN | KCPOS | KCNEG | KCCOMID | |
Beginning of job complex | "MCOM" | "BC" | LTERM / TAC / Service ID / TAC queue | TAC / blanks / TAC queue | TAC / blanks / TAC queue | Complex ID |
End of job complex | "MCOM" | "EC" | Binary zero | Binary zero | Binary zero | Complex ID |
All the fields of the parameter area which are not used have to be set with binary zero.
Setting the parameters | |
Field name in the KDCS parameter area | Contents |
"MCOM" | |
"BC"/"EC" | |
LTERM name / TAC / service ID / binary zero / TAC queue | |
TAC / blanks / binary zero / TAC queue | |
TAC / blanks / binary zero / TAC queue | |
Complex ID |
KDCS call | |
2nd parameter | |
KDCS parameter area | - |
C/C++ macro calls | |
Parameters | |
KDCS_MCOMBC | (kcrn,kcpos,kcneg,kccomid) |
KDCS_MCOMEC | (kccomid) |
openUTM return information | |
---|---|
Field name in the KB return area | Contents |
Return code | |
Internal return code |
For the MCOM call you make the following entries in the appropriate fields of the KDCS parameter area:
KCOP
In the KCOP field, the MCOM operation code.
KCOM
In the KCOM field, either "BC" for beginning or "EC" for end of a job complex.
KCRN
In the KCRN field, if KCOM = BC applies:
the LTERM name of a communication partner if the basic job is an output job,
the TAC of an asynchronous program if the basic job is a background job (withoutdistributed processing), or
the name of the TAC queue when the basic job is an output job in a TAC queue (without distributed processing).
the service ID of a job-receiving service if the basic job is directed to a job-receiving service.
If KCOM = EC applies, you have to enter binary zero.
KCPOS
In the KCPOS field, if KCOM = BC is specified as the destination of the positive confirmation job, the TAC of an asynchronous program or a TAC queue, or blanks if no positive confirmation job is to be generated.
If KCOM = EC apples, you enter binary zero.
KCNEG
In the KCNEG field, if KCOM = BC is specified as the destination of the negative confirmation job, the TAC of an asynchronous program or a TAC queue, or blanks if no negative confirmation job is to be generated.
If KCOM = EC applies, you enter binary zero.
KCCOMID
In the KCCOMID field, the complex identifier (complex ID) of the job complex. It is defined for MCOM BC, may be 2 to 8 characters long and has to be prefixed with the character "*". It is to be specified for all the DPUT calls of the complex and for MCOM EC.
You specify the following for the KDCS call:
1st parameter
The address of the KDCS parameter area.
Macro names
The use of C/C++ macro calls is described in detail in the section "C/C++ macro interface".
openUTM returns:
KCRCCC
in the KCRCCC field, the KDCS return code, see next page.
KCRCDC
in the KCRCDC field, the internal return code of openUTM (see the openUTM manual ”Messages, Debugging and Diagnostics”).
KDCS return codes in the KCRCCC field for the MCOM call
The following codes can be analyzed in the program:
000 | Function carried out. |
40Z | openUTM cannot perform the function: generation error or system error, or a job complex is to be started without previously terminating the preceding job complex. |
42Z | Entry in KCOM is invalid. |
44Z | Value in KCRN is invalid:
|
49Z | Contents of unused fields of the KDCS parameter area not equal to binary zero. |
51Z | For KCOM = EC: no (confirmation) job to which user information can be related. |
55Z | Entry in KCCOMID is invalid: the name does not begin with "*" or is already assigned in the program unit or is unknown (for MCOM EC). |
57Z | Value in KCPOS is invalid:
|
58Z | Value in KCNEG is invalid:
|
An additional error code can be found in the dump:
71Z | INIT missing in this program unit. |
Features of the MCOM call
You have to terminate a job complex with MCOM EC before the PEND call, otherwise openUTM aborts the service with PEND ER and 86Z.
The complex identifier has to be unique within a program unit.
MCOM BC is only allowed after all preceding job complexes have been terminated.
If a service identifier is occupied by a job complex, it can only be released by MCOM EC (not as otherwise by DPUT NE).
Confirmation jobs must be directed to asynchronous program units or TAC queues of the local application.
If an error occurs, a message complex’s main job with negative acknowledgment job is (possibly after redelivery) not saved in the dead letter queue but is deleted. The negative acknowledgment job is activated.