The OPSTATUS function returns a count of the address spaces currently in the system or in the *LOGON* state, outstanding WTORs, or IMS systems that are currently in the system and that match the selection criteria. OPSTATUS also optionally writes one or more records to the external data queue.
OPSTATUS is useful for retrieving either the names of address spaces that are active or have outstanding replies, or the IMS IDs of active IMS systems.
Note: Using the OPSTATUS function to count the number of batch jobs from a $HASP message rule cannot provide you with accurate results. The message can be issued on behalf of a batch job before the OPSTATUS function counts it or after OPSTATUS counts it. Batch jobs can show up as active before the program is executing, or after the program has finished executing but before JES has finished handling work on its behalf. The OPSTATUS function can be used in OPS/REXX or AOF rules.
OPSTATUS has the following format:
var = OPSTATUS(func, subfunc, entity,[system])
Specifies the type of entity whose status you want to query; func has one of the following values:
Address spaces
IMS systems
Batch jobs
Attached APPC transactions (ATX)
Outstanding replies (WTORs)
Started tasks and system address spaces
TSO users
The subfunc argument specifies one of these information types:
Based on the function code used, returns only the count of address spaces, outstanding WTORs, or IMS systems that match the selection criteria. No records are added to the external data queue.
Returns the count and add a WTOR or IMS record to the external data queue for each WTOR or IMS system found. A subfunction of L is valid only for function values of R (WTORs) and I (IMS systems).
Returns the count and do the following:
Returns the count and add two records to the external data queue for each outstanding WTOR in the sysplex. The first record contains information about the WTOR and is identical to that returned by the L subfunction. The second record identifies the WTOR issuer on the originating system and indicates how long the WTOR has been outstanding. A subfunction of S is valid only for a function value of R (WTORs).
For function values of A, J, P, S, or T, adds an ASID Workload Manager record to the external data queue for each address space that matches the selection criteria.
A subfunction of W is not valid for function values of I (IMS systems) and R (WTORs).
Returns the count and adds the following two records to the external data queue for each WTOR on the local system that also originated from the local system:
A subfunction of X is valid only for a function value of R (WTORs).
This argument restricts the returned information to only those entities with names matching the value of entity. Entity can be:
Note: Be sure to use this when searching for IDs currently in the *LOGON* state.
A string of characters ending with an asterisk to return information about only the entities with names that begins with the specified string.
For all function codes except I, the entity name refers to the jobname/TSO ID/started task name of each address space. For function code I, entity names refer to the four-character IMS ID of each IMS system.
(Optional) Enables CA OPS/MVS to execute the OPSTATUS function on external systems that have been defined to the MSF. The MSF establishes VTAM or CCI sessions between copies of CA OPS/MVS, permitting any copy to issue a command on any other copy and to receive its response.
Valid values for system are:
If the local MSF system name is used or implied, the system argument is ignored.
The number of seconds that the function waits for a response is determined by the ADDRESS OPSCTL MSF DEFAULT SYSWAIT value when it is greater than zero or the value of the MSFSYSWAIT parameter.
When the system argument is specified for a remote system within a no-wait AOF rule, no output for the function is returned.
An invalid or inactive MSF system name causes the REXX program to be interrupted for a SYNTAX error. Use the ADDRESS OPSCTL MSF LIST HOST command to validate the MSF system name before using it as an argument for any REXX function.
Example: Use the OPSTATUS Function
This example uses OPSTATUS function to determine whether the CICSPROD address space is active on SYSB.
jobname = "CICSPROD"
ADDRESS OPSCTL “MSF DEFAULT SYSWAIT(30)”
status = OPSTATUS("A","A",jobname,'SYSB')
if status=1 then TASKSTAT = "UP"
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|