Examples
Example 1
An ACFFQRY specifying a full ENTRY value only:
ACFFQRY SUBSYSTEMThis
returns all TYPE matches for that ENTRY:
ACFFQRY:0
SUBSYSTEM SYSVSSI
SUBSYSTEM SYSVIEW
SUBSYSTEM VLF
SUBSYSTEM LLA
SUBSYSTEM JES
SUBSYSTEM VTAM
SUBSYSTEM TSO
SUBSYSTEM RMFExample 2
An ACFFQRY specifying a full ENTRY value and a full TYPE value:
ACFFQRY SUBSYSTEM TSOThis returns all keyword=value data that is associated
with the ENTRY/TYPE pair:
ACFFQRY:0
SUBSYSTEM TSO
JOB=TSO
DESC='Time Sharing Option'
SHUTDLY=00:01:30Example 3
An ACFFQRY specifying a full ENTRY and a wild TYPE:
ACFFQRY SUBSYSTEM V*This returns a list of all matching TYPES:
ACFFQRY:0
SUBSYSTEM VLF
SUBSYSTEM VTAMExample 4
This example shows how to access automation control file data about monitor resources specifying a full ENTRY and a wild TYPE:
ACFFQRY MONITOR J*This returns a list of matching
TYPES:
ACFFQRY:0
MONITOR JES2MON
MONITOR JES2SPOOLExample 5
This example is the same as Example 3, except that the DATA option is specified:
ACFFQRY SUBSYSTEM V* (DATAThe keyword=value data that is values for all
matches are returned:
ACFFQRY:0
SUBSYSTEM VLF
DESC='Virt Lib DEF'
SCHEDSUB=MSTR
JOBTYPE=MVS
IPLOPTIONS=START
RECYCLEOPT=START
RESTARTOPT=ALWAYS
PARMS=',SUB=MSTR,NN=00'
SHUTDLY=00:03:00
STRTDLY=00:02:00
TERMDLY=00:00:15
JOB=VLF
SUBSYSTEM VTAM
DESC='VTAM V4.1'
PARMS=',,,(LIST=FP)'
SHUTDLY=00:01:00
JOB=VTMN24EExample 6
This example shows the use of the TAME option:
ACFFQRY CONTROLLER QLN37A07 (TAMEAll ENTRY/TYPES that include a wildcard that
matches the search string are returned:
ACFFQRY:0
CONTROLLER QLN*
CONTROLLER QLN37*
CONTROLLER Q*Example 7
This example is the same as example 6 except that the DATA option is specified:
ACFFQRY CONTROLLER QLN37A07 (TAME DATAAll keyword=value data for the
ENTRY/TYPE list is returned:
ACFFQRY:0
CONTROLLER QLN*
LOCATION=NEW_YORK
TYPE=LOCAL
OWNER='FRED SMITH'
CONTROLLER QLN37*
LOCATION='Episode 1, Level 3, Oil Refinery'
TYPE=LOCAL
START='MVS VARY 04AE,ONLINE'
OWNER='JIM SMITH'
CONTROLLER Q*
LOCATION=USA
TYPE=GLOBAL
OWNER='BILL SMITH'Example 8
This example shows the result of the following NOWILD option:
ACFFQRY CONTROLLER QLN37* (NOWILDThe asterisk (*) is treated as a literal in
the search pattern:
ACFFQRY:0
CONTROLLER QLN37*
LOCATION='Episode 1, Level 3, Oil Refinery'
TYPE=LOCAL
START='MVS VARY 04AE,ONLINE'
OWNER='JIM SMITH'Example 9
The following example shows how to find the job name for a subsystem from a REXX routine, using the NetView PIPE facility:
Get_Jobname:
Arg subsystem .
'PIPE NETVIEW ACFFQRY SUBSYSTEM' subsystem '| STEM ALL_DATA.',
'| SEPARATE | LOCATE 1.4 /JOB=/ | TAKE 1 | STEM JOBNAME.'
If all_data.0 < 1 Then
Say 'PIPE 1 Failed'
If all_data.1 <> 'ACFFQRY:0' Then
Return
If jobname.0 = 0 Then
Return subsystem
Parse var jobname.1 'JOB=' jobname .
Return jobnameExample 10
This example takes the name of a failing device and finds the appropriate person to notify. It
makes use of the TAME option. The data being searched is:
DEVFAIL DEV1230,
CONTACT=MIK
DEVFAIL DEV12*,
CONTACT=JB
DEVFAIL DEV34*,
CONTACT=JAQUES
DEVFAIL DEV*,
CONTACT=MIK
CONTACT MIK,
page=00230936473
CONTACT JB,
page=00234628164
CONTACT JAQUES,
page=00237564815The
following code fragment takes the number of a failing device and returns the paging number for the
person to be notified. Note the use of subroutines that make it easy to write similar queries and
could replace the previous example.
Get_Page_Num:
Procedure
Arg device_number .
match = Get_Best_Match('DEVFAIL',device_number)
If match = '' Then
Return
contact = Get_Key('CONTACT=','DEVFAIL',match)
If contact = '' Then
Return
Return Get_Key('page=','CONTACT',contact)
Get_Best_Match:
Procedure
Arg entry ., type .
'PIPE NETVIEW ACFFQRY' entry type '( TAME | STEM DATA.'
If data.0 < 1 Then
Say 'Get_Best_Match PIPE Failed'
If data.0 <> 'ACFFQRY:0' Then
Return
match = '' /* Longest match = best match */
match_len = 0
Do i = 2 to data.0
If words(data.i) = 2 Then Do
data_val = word(data.i,2)
If Length(data_val) > match_len The Do
match = data_val
match_len = Length(match)
End
End
End
Return match
Get_Key:
Procedure
Arg key . , entry ., type .
'PIPE NETVIEW ACFFQRY' entry type '(NOWILD | STEM ALL_DATA.',
'| SEPARATE | LOCATE 1.'||length(key) '/'||key||'/',
'| TAKE 1 | STEM DATA.'
If all_data.0 < 1 Then
Call Terminal_Error 'Get_Key PIPE Failed'
If all_data.1 <> 'ACFFQRY:0' Then
Return
parse var data.1 .'=' data_val
Return data_val