gtpc2m4jC/C++ Language Support User's Guide

lodic-Check System Load and Mark ECB

This function is used to check if enough system resources are available to begin processing low-priority or batch work, and to determine if an entry control block (ECB) can be suspended (based on the level of available resources).

An ECB that calls the lodic function is marked as a low-priority ECB. Once marked, the ECB can be suspended when system resources are below the shutdown levels defined for the BATCH priority class (see Table 10). Even though the ECB is marked as being able to be suspended, the ECB cannot be suspended until it gives up control. Once the ECB has been suspended, it will not receive control again until enough system resources are available.

Format

#include   <tpfapi.h>
int        lodic();

Normal Return

The return code depends on the shutdown levels that are defined for the BATCH priority class (see Table 10).

0
The available system resources are below the shutdown levels defined for the BATCH priority class (more work will not be started).

1
The available system resources are above the shutdown levels defined for the BATCH priority class (more work is allowed to be started).

Error Return

Not applicable.

Programming Considerations

Examples

The following example creates a new ECB after checking to see if available resources exist. The ECB is also marked as a low-priority batch ECB and is allowed to be suspended while resources are not held.

#include <tpfapi.h>
void QZZ0();

  ·
  ·
  ·
rc = lodic(); if (rc) credc( 0, NULL, QZZ1 );

Related Information

lodic_ext-Check System Load and Mark ECB with Extended Options.