tterm() — Terminate MTF subtasks

Standards

Standards / Extensions C or C++ Dependencies
Language Environment C only  

Format

#include <mtf.h>

int tterm(void);

General description

Restriction: This function is not supported in AMODE 64.

Terminates the MTF environment under MVS. The function is invoked by a main task to await the completion of all parallel functions that were scheduled by tsched() and to detach all subtasks and remove the MTF environment created by tinit(), see tinit() — Attach and initialize MTF subtasks.

To avoid infringing on the user's name space, this nonstandard function has two names. One name is prefixed with two underscore characters, and one name is not. The name without the prefix underscore characters is exposed only when you use LANGLVL(EXTENDED).

To use this function, you must either invoke the function using its external entry point name (that is, the name that begins with two underscore characters), or compile with LANGLVL(EXTENDED). When you use LANGLVL(EXTENDED) any relevant information in the header is also exposed.

If tinit() has not been successfully called before a tterm() call, tterm() indicates that MTF is already inactive.

If a tterm() call is not issued before main program termination, a system abend with completion code A03 will occur. The program's termination will terminate the main task while subtasks are still active even if all scheduled parallel functions have completed execution.

If tinit() is called by a program running under IMS, CICS, or DB2, the request will not be processed and the returned value will indicate that MTF calls are not supported under these systems.

Note: This function is not supported under the z/OS® UNIXwith the POSIX(ON) runtime option.

Returned value

If successful, detaching the subtasks and removing the MTF environment, tterm() returns MTF_OK.

If unsuccessful, tsched() returns one of the following values:
Error Code
Description
EINACTIVE
MTF is inactive.
ETASKABND
One or more subtasks have terminated abnormally.
Note: These values are macros. They can be found in the mtf.h header file (mtf.h).

Related information