Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

STAT^%ZTLOAD: Task Status

Reference Type: Supported, Category: TaskMan, Integration Agreement: 10063

Description

This API looks up tasks and retrieves their current status. The status of a task returned by STAT^%ZTLOAD is expressed in the general terms of whether the task ran, is running, or will run. ZTSK(1) and (2) return the code and text of the current status. This status is an abstraction based on the more complex system used by TaskMan.

An active task is one that either is expected to start or is currently running. An inactive task will not start in the future without outside intervention; this may be because it has already completed, was never scheduled, or was interrupted. The "running" status is not based on direct examination of the system tables but is inferred from TaskMan's information about the task.

When interpreting the output of STAT^%ZTLOAD, consider that:

Format

  STAT^%ZTLOAD

Make sure to perform the following steps before calling this API:

  1. NEW all non-namespaced variables.

  2. Set all input variables.

  3. Call the API.

Input Variables

ZTSK:

(required) The task number to look up. It must be defined on the current volume set.

Output Variables

ZTSK(0):

Returns:

  • 1—Task is defined.

  • 0—Task is not defined.
ZTSK(1):

Numeric status code from 0 to 5 indicating the status of the task.

ZTSK(2):

Status text describing the status of the task. Its value corresponds with the status code in ZTSK(1). The possible values and their meanings are as follows:

  • ZTSK(1) = 0 and ZTSK(2) = "Undefined" means the task does not exist on this volume set.

  • ZTSK(1) = 1 and ZTSK(2) = "Active: Pending" means the task is scheduled, waiting for an I/O device, waiting for a volume set link, or waiting for a partition in memory.

  • ZTSK(1) = 2 and ZTSK(2) = "Active: Running" means the task has started running.

  • ZTSK(1) = 3 and ZTSK(2) = "Inactive: Finished" means the task quit normally after running.

  • ZTSK(1) = 4 and ZTSK(2) = "Inactive: Available" means the task was created without being scheduled or was edited without being rescheduled.

  • ZTSK(1) = 5 and ZTSK(2) = "Inactive: Interrupted" means the task was interrupted before it would have quit normally. Causes can include bad data, user intervention, hard error, and many other possibilities.

 


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.