OPSTAT
The OPSTAT instruction invokes the TSO command OPSTAT, which you can use to change the status of an operation at any workstation, except workstations that have the nonreporting attribute. Events generated by OPSTAT are matched against operations on the ready list. Events received for operations in waiting, W, or complete, C, status are ignored. Jobs and tasks that are running are always allowed to finish. If there is more than one operation at the workstation, you can optionally specify the ADID, IA, OPNUM, or JOBNAME parameters to identify the particular operation whose status is to be changed.
Keywords used in the Opstat Instruction shows the keywords that can be specified.
| Keyword | Requirement | Description | Abbreviation | Format |
|---|---|---|---|---|
| ADID() | Required | The application identifier of the operation whose status you want to change. | A | |
| CLASS() | Optional | For a printer workstation, specifies the printer SYSOUT class of the operation whose status you want to change. | ||
| DURATION() | Optional | If you are specifying STATUS(C) to set the operation status to complete, you can optionally specify a duration for the completed operation. You specify the duration in hours and minutes, in the format hhmm. | HHMM | |
| FORM() | For a printer workstation, specifies the printer FORM name of the operation whose status you want to change. | |||
| OPNUM() | Optional | The operation number of the operation whose status you want to change. | ||
| ERRORCODE() | Optional | If you are specifying STATUS(E) to set the operation status to ended-in-error, it is required that you specify an error code for the operation. The error code can be any 4 characters. | ||
| EVDATE() | Optional | The date of this operation status event. You can use the EVDATE parameter to indicate to the scheduler that the operation changed status at a time other than the current date. If you do not specify this parameter, the operation is considered to have changed status on the date the scheduler processed the OPSTAT command. | YYMMDD | |
| EVTIME() | Optional | The time of this operation status event. You can use the EVTIME parameter to indicate to the scheduler that the operation changed status at a time other than the current time. If you do not specify this parameter, the operation is considered to have changed status at the time the scheduler processed the OPSTAT command. | HHMM | |
| IA() | Optional | The input arrival date and time of the occurrence that contains the operation whose status you want to change. It defaults to the current date and current time or to the current date and default input arrival time, if the default is specified in the DEFIAT parameter of the EQQYRPRM member. | YYMMDDHHMM | |
| JOBNAME() | Optional | The job name associated with the operation whose status you want to change. | J | |
| NUMJOB() | Optional | Use this optional parameter to specify a job number for an operation. Specify a number in the range 0–99999. The scheduler builds a job number in the format USRnnnnn, padding the number with zeros on the left if you specify fewer than 5 digits. | ||
| STATUS | Optional | The operation
status that you want to set. You can change the operation status to C (operation completed successfully). Note: You cannot use
the OPSTAT command to change an operation from status W to status
C, because predecessor jobs might not have completed. |
ST | |
| SUBSYS() | Optional | The name of the tracker subsystem to which the OPSTAT instruction is directed. It defaults to the subsystem name specified in the OCL OPTRK initialization parameter. | ||
| TOKEN() | Optional | The token assigned for the operation whose status you want to change. A token is automatically assigned for operations started on workstations that specify a user-defined destination ID. The token can be used to uniquely identify the operation. | ||
| TRACE() | Optional | Event tracing indicator. When a positive number is specified, a trace entry is created for each event generated by the OPSTAT command. The trace record is written to the message log file identified by ddname EQQMLOG. The record identifies the name of each receiving subsystem. The default value 0 will not generate trace records. | ||
| WSNAME() | Optional | The name of the workstation for which you are reporting the status of an operation. | W |
The SUBSYS keyword defaults to the IBM Z Workload Scheduler subsystem name (tracker) specified in the OCL SUBSYS initialization parameter
OPSTAT W(BDEC) ST(C) J(DNCD3000) A(ACLMSDLY)In this example an operation for application ACLMSDLY at workstation BDEC is reported as completed.
- RESULT = 0
- Operation status modified
- RESULT = 8
- Invalid instruction