Previous Topic

Next Topic

Book Contents

Book Index

Status Extension

The value of 2 (BAPI_M_STATUS) should be set in the BAPICMD field for the Status function.

The Status function can be used to retrieve information about jobs in the Active Jobs file. This service can be called from any environment, but only by using the CTMBAPI mode, that is, using a program, and not by means of a batch statement, REXX or CLIST.

On return, the status of and other information about the job is returned to the caller.

If you only requested one job, for example, Status using OID, the result is returned in the Status extension itself. If more than one job may conform to the selection criteria, for example, the status of MEMNAME ABC, a reply buffer must be supplied into which the API can return a result for each and every job that conforms. If no such buffer is supplied, no reply other than an appropriate return code is returned.

The Status extension fields are summarized in Table 287. If the caller filled in a field, it is used as Search argument, and only jobs that conform to that field are returned. On return from the API, if no reply area has been supplied, and if only one job conforms to the selection criteria, the API will fill in all these fields with actual information about this job. For example, if you specify ABC in BAPISMEM, and there is only one job in the AJF with a matching MEMNAME, such as ABCXYZ, on return from the API this field will hold the value ABCXYZ.

The values in the columns in Table 287 have the same significance as those in Table 286.

Table 287 Status Extension Fields

Field Name

Optional

In or Out

Type

Usage

BAPISGRN

O

I or O

CL20*

Group name.

BAPISHLD

O

I or O

CL1

Hold state. Valid values are:

  • H (Hold)
  • F (Free)

BAPISJID

O

I or O

CL5

JES job ID (job number).

BAPISJNM

O

I or O

CL8*

Job name. Valid only after job submission.

BAPISLIB

O

I or O

CL44*

Scheduling library from which the job was ordered.

BAPISMEM

O

I or O

CL8*

MEMNAME.

BAPISODT

O

I or O

CL6

ODATE of the job. This must be fully specified. Prefixing is not supported.

BAPISOID

O

I or O

CL5

Order ID. If a value is entered, it must include all five characters of the Order ID.

Prefixing is not supported.

BAPISOWN

O

I or O

CL8*

Owner of the job.

BAPISRBA

Not applicable

O

CL6

RBA of the job, in hexadecimal format.

BAPISRBB

Not applicable

O

CL3

RBA of the job, in binary format.

BAPISRNM

Not applicable

O

H

Run number of the job.

BAPISSTT

O

I or O

CL15*

Status of job. For a list of valid values, see Table 288 in The Status Reply DSECT (CTMBJSE).

The masking character "*" can be used in any status value which includes an underscore character "_". However, the "*" must follow immediately after the "_".

BAPISTAB

O

I or O

CL8*

Table from which the job was ordered.

BAPISRBC

O

I

CL20

(Only for jobs that are part of a group)
The name of the rule-based calendar that made the job eligible for execution.

BAPISTYP

O

I or O

CL3

Task type. Valid values are:

  • JOB
  • TBL
  • STC
  • CYC
  • EMR
  • CST
  • ECJ
  • EST
  • ECS
  • WRN

Except for TBL, each of these is explained in TASKTYPE: General Job Parameter. TBL is explained in Fields of the Display Type A (All Info).

Parent Topic

The Control-M Application Program Interface (CTMAPI)