ACFFQRY

Purpose

The ACFFQRY command provides a fast, pipeable means of accessing the SA z/OS automation control file from your automation procedures.

See also the related command ACF in IBM Z® System Automation Operator's Commands.

Syntax

The following syntax diagram shows how to use the ACFFQRY command to query the automation control file.

Read syntax diagramSkip visual syntax diagramACFFQRYentry(TAMENOWILDentrytype(TAMENOWILDDATA

Parameters

entry
This is the entry value to be used to search the automation control file. The entry value may take the following forms:
*
The entry value is or ends with the wildcard character, unless TAME is specified.
entry
A specific entry value is entered. You must enter a specific entry value if you want to specify a type value.

For messages data of application groups (APGs), entry must be prefixed with 0. For messages data of monitor resources (MTRs), entry must be prefixed with 1.

type
This is the type value to be used to search the automation control file. A type value can be specified only when a specific entry value is entered. The type value may take the following forms:
*
The type value is or ends with the wildcard character, unless TAME or NOWILD is specified.
type
A specific type value is entered.
TAME
Wildcards in the entry and type name in the automation control file database are to be matched against the entry and type specified on the search. TAME allows for wildcards in the database that you are searching. For example, with a constant query string, such as AAA 123 you can match on multiple entries in the automation control file, such as AAA 12*.

This means that if user entries and types have been set up in the automation control file with an asterisk for the last character they are taming candidates. This may be particularly useful for situations where generic rather than specific data is maintained and used in automation procedures.

NOWILD
The asterisk (*) character in the query string is to be treated as a literal.
DATA
The keyword=value data that is related to the entry/type pair is to be returned.

Restrictions and Limitations

A type value can be specified only if a specific entry value is specified.

Usage

It is most efficient if it is called within a PIPE, but may also be called within a TRAP/WAIT/MSGREAD.

Task Global Variables

None.

Messages

Output from ACFFQRY takes the form of a correlated multiline message, with one or two list items and data elements on each line of the message. There are no surrounding message IDs or details.

The first line of the multiline message is always the literal ACFFQRY:, followed by the return code from ACFFQRY. If output is present it begins on line two. This means that output returned in a stem must be processed from element two.

If keyword=data is returned, the entry and type will precede it. Your routines can differentiate entry/type output from data output by the presence of an equals (=) sign. For example:
If Pos('=',data.n) = 0 then Do
/* data line is an ENTRY TYPE    */
End
Else Do
/* data line is an KEYWORD=VALUE */
End
  • If both entry and type parameters are omitted, a list of all the entries is returned.
  • If an entry is specified and the type is omitted, a list of the entry and all the types for that entry is returned.
  • If both entry and type are specified, all the data for that entry/type combination is returned.
  • If the parameters indicate an area where there is no data, a null list is returned.

Table 1 shows the result for various parameter combinations. An - means that an option is irrelevant to the output produced. An asterisk in the DATA column indicates that the keyword=value data is returned.

Table 1. Output from ACFFQRY

ACFFQRY

Entry
Type TAME NOWILD DATA Result
    - -   List of all entries
en* or *   No No   List of entries starting with en.
en* or *   Yes No   List of all entries starting with en or taming en*.
entry   Yes - - List of entries taming entry
entry   No - - List of types for entry
entry ty* No No * List of types for entry starting with ty
entry ty* Yes No * List of types for entry starting with ty or taming ty*
entry ty* No Yes * All data for entry entry and type ty*
entry ty* Yes Yes * List of all types for entry taming ty*
entry type No - - All data for entry entry and type type
entry type Yes - * List of all types for entry taming type

Return Codes

These return codes appear on the first line of the returned data, after the literal ACFFQRY:.
0
Data returned.
1
There is no data for the specified parameters or SA z/OS is not fully initialized.
2
Too many parameters before the opening parentheses. You can specify at most one entry and one type, each of which is a single word.
3
Entry/Type combination not allowed. If you have specified an entry including an *, you may not specify a type.
5
The SA z/OS global variables containing internal automation control file information have been corrupted.
6
You have specified an invalid option.
7
You have specified an option more than once.