NETWORK Procedure

PATTERNMATCH Statement

  • PATTERNMATCH < options >;

The PATTERNMATCH statement invokes an algorithm that searches for subgraph patterns in an input graph. The pattern matching problem is described in the section Pattern Matching.

You can specify the following options:

CODE=string

specifies the code that defines FCMP functions.

INDUCED=TRUE | FALSE

specifies whether to filter matches by using the induced subgraph of the match. You can specify the following values:

TRUE

keeps only matches whose induced subgraph is topologically equivalent to the query graph.

FALSE

does not filter by using the induced subgraph of the match.

By default, INDUCED=FALSE.

LINKFILTER=function-name

specifies the FCMP function for link filters.

LINKPAIRFILTER=function-name

specifies the FCMP function for link-pair filters.

MATCHFILTER=function-name

specifies the FCMP function for a filter that is based on a potential match (that is, any subset of nodes or links or both).

MAXMATCHESPERQUERY=number | ALL
MAXMATCHES=number | ALL

specifies the maximum number of matches to return for each pattern-matching query. You can specify either a number (any 64-bit integer greater than or equal to 1) or ALL (the maximum value that can be represented by a 64-bit integer). By default, MAXMATCHESPERQUERY=ALL.

MAXTIME=number

specifies the maximum amount of time to spend in the pattern matching algorithm. The type of time (either CPU time or real time) is determined by the value of the TIMETYPE= option in the PROC NETWORK statement. The default is the largest number that can be represented by a double.

NODEFILTER=function-name

specifies the FCMP function for node filters.

NODEPAIRFILTER=function-name

specifies the FCMP function for node-pair filters.

OUTMATCHGRAPHLINKS=libref.data-table

specifies the links output data table for the induced subgraph of matches. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

OUTMATCHGRAPHNODES=libref.data-table

specifies the nodes output data table for the induced subgraph of matches. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

OUTMATCHLINKS=libref.data-table

specifies the links output data table for matching subgraphs. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

OUTMATCHNODES=libref.data-table

specifies the nodes output data table for matching subgraph mappings. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

OUTQUERYLINKS=libref.data-table

specifies the links query output data table to contain the generated queries. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

OUTQUERYNODES=libref.data-table

specifies the nodes query output data table to contain the generated queries. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

OUTSUMMARY=libref.data-table

specifies the summary output data table for pattern match queries. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs in Chapter 1, Introduction.

QUERYKEY=column

specifies the name of the data variable for the query key. The value of the variable can be numeric or character.

QUERYKEYAGGREGATE=TRUE | FALSE

specifies whether to aggregate nodes across query keys for creating the induced subgraph(s). You can specify the following values:

TRUE

aggregates nodes across query keys for creating the induced subgraph(s).

FALSE

does not aggregate nodes across query keys for creating the induced subgraphs(s).

By default, QUERYKEYAGGREGATE=TRUE.

Last updated: August 07, 2026