RULE

Although the match Rule options appear near the end of the pattern data entry form, think of the rule as being at the beginning of your Pattern, e.g., think 'AND 650 $x = Fiction' or 'NOT 650 $x = Fiction'. If you add a second Pattern, then think, e.g., 'AND 650 $x = Fiction' + 'NOT 008/33 = 1'.

The default match Rule is 'AND'.   AND

If you choose 'AND' as your match Rule, the program will find records that match the elements specified in the pattern.   If you repeat the same Tag in two patterns, using the 'AND' match rule, and the field is not a repeatable field (e.g., 245), then the program will, naturally, check the same field for the elements that you have specified, e.g.:  Pattern1: TAG=245 SUBF=b Rule=AND  Pattern2: TAG=245 SUBF=p Rule=AND         The program will find records where $a AND $b are present in a single 245 field (because the record can contain only one 245 field)   However, if you repeat the same Tag in two patterns, using the 'AND' match rule, and the field is a repeatable field (e.g., 651) then the program will check check all occurrences of the field for the elements that you have specified, e.g.:  Pattern1: TAG=651 SUBF=a DATA=United States Rule=AND  Pattern2: TAG=651 SUBF=v DATA=literature    Rule=AND    The program will find records where any 651 field contains 'United States' in subfield $a, and any 651 field contains 'literature' in subfield $v. The two strings do not need to be present in the same occurrence of the field. For example, a record containing the following 651 fields will match the pattern above:   651  0$aUnited States$xEmigration and immigration$xHistory.   651  0$aNew York (N.Y.)$xHistory$vJuvenile literature.          The program will find records where $a contains 'United States' AND $v contains 'literature' in any occurrence of a 651field (because the record can contain multiple fields)

If you want to check *the same* field for the elements that you have specified, then you must repeat the same Tag in two patterns, using the 'AND/Same Tag' match rule.

Rule: AND/Same Tag This match Rule is not meant be used in a Pattern #1 search. It is used to bind multiple patterns to a single occurrence of a repeatable field, and so is used only when you repeat the same Tag in two or more patterns. If you repeat the same Tag in two patterns and the Tag is for a non-repeatable field, then 'AND' will search the same occurrence of the field (because there can be only one occurrence of the field). If, however, you want to search the same occurrence of a repeatable field for a pattern, then this match Rule 'AND/Same Tag' will do what you need.

If you choose 'AND/Same Tag' as your match Rule in a subsequent Pattern, the program will first find records that match all of the elements (Tag, Tag Occ, Ind 1, Ind 2, Subf, Subf Occ, and/or Data) that you have specified in a preceeding Pattern and then search the same occurrence of the field in those records to find the records that match all of the elements (Tag, Tag Occ, Ind 1, Ind 2, Subf, Subf Occ, and/or Data) that you have specified in the subsequent Pattern for which you have used the 'AND/Same Tag' match Rule, e.g.:

Pattern1: TAG=651 SUBF=a DATA=United States Rule=AND
Pattern2: TAG=651 SUBF=v DATA=literature    Rule=AND/Same Tag
  The program will find records where the same 651 field contains 'United States' in subfield $a, and 'literature' in subfield $v. The two strings must be present in the same occurrence of the field. For example, a record containing the following 651 fields will match the pattern above: 
 651  0$aUnited States$xHistory$vJuvenile literature. 

         The program will find records where $a contains 'United States' AND $v contains 'literature' in the same occurrence of a 651field (because you limited the search to the same occurrence of the field)

Rule: OR This match Rule is not meant be used in a Pattern #1 search. If you choose 'OR' as your match Rule in a subsequent Pattern, the program will first find records that match all of the elements (Tag, Tag Occ, Ind 1, Ind 2, Subf, Subf Occ, and/or Data) that you have specified in a preceeding Pattern and then search the resulting records to find the records that match all of the elements (Tag, Tag Occ, Ind 1, Ind 2, Subf, Subf Occ, and/or Data) that you have specified in the subsequent Pattern for which you have used the 'OR' match Rule, e.g.:  Pattern1: TAG=650 SUBF=a DATA=Periodicals Rule=AND  Pattern2: TAG=655 SUBF=a DATA=Periodicals Rule=OR

    The program will find records where either fields 650 or 655 contain $a = Periodicals. Whereas, if you had used 'AND' for the second match, e.g.:

 Pattern1: TAG=650 SUBF=a DATA=Periodicals Rule=AND  Pattern2: TAG=655 SUBF=a DATA=Periodicals Rule=AND

    The program would find records where both fields( 650 and 65)5 are present and both fields contain $a = Periodicals.

The 'OR' match Rule can also be combined with a preceding Pattern ruled by 'NOT', 'NONE', or 'NOWHERE'. These three negative match Rules are necessary because of the repeatable fields in MARC records, and it is important that you understand the differences between these three negative match Rules work.

Rule: NOT If you choose 'NOT as your match Rule, the program will find records that do not contain all of the elements (Tag, Tag Occ, Ind 1, Ind 2, Subf, Subf Occ, and/or Data) that you have specified in the pattern.

NOT [Tag only] will find records that do not contain the specified field; e.g., this Pattern and Rule will find records that have no 650 fields:  Pattern1: TAG=650 Rule=NOT

NOT [Tag + Occ] will find records that do not contain the specified occurrence of the field; e.g., this Pattern and Rule will find records that do not have a second occurrence of a 650 field, i.e., it will find records that only have one 650 field:  Pattern1: TAG=650 OCC=2 Rule=NOT

NOT [Tag + Ind] will find records that contain the specified field, where the indicator is not what you specified, e.g. this Pattern and Rule will find records that have one or more 650 field with an indicator value that is not '0':  Pattern1: TAG=650 Ind 1=0 Rule=NOT

NOT [Tag + Subf] will find records that contain the specified field, where the subfield code is not what you specified, e.g. this Pattern and Rule will find records that have one or more 650 field with a subfield code that is not 'x':  Pattern1: TAG=650 SUBF=x Rule=NOT

NOT [Tag + Subf + Data] will find records that contain the specified field and subfield code where the Data is not what you specified, e.g. this Pattern and Rule will find records that have one or more 650 field with subfield $x that does not contain 'History':  Pattern1: TAG=650 SUBF=x Data=History Rule=NOT

If you are looking for records where a specified field is missing, use NOT.

If you are looking for records where a specified field is present but an indicator value, subfield code, or data is missing, use NONE (see below)

If you are looking for records where a specified field is not present or the field is present but none of the occurrences of that field contain all of the elements (Tag Occ, Ind 1, Ind 2, Subf, Subf Occ, and/or Data) that you have specified in the pattern, use NOWHERE (see below)

Rule: NONE If you choose 'NONE' as your match Rule, the program will find records where a repeatable field specified in your Pattern is present, but none of the occurrences of that field contain all of the elements (Ind 1, Ind 2, Subf, Occ, and/or Data) that you have specified in the pattern.

NONE [Tag only] is not useful–use NOT instead.

NONE [Tag + Ind] will find records that contain the specified field, but none of the occurrences of the field contain the indicator that you specified, e.g. this Pattern and Rule will find records that have one or more 650 field but none of those fields have an indicator value of '0':  Pattern1: TAG=650 Ind 1=0 Rule=NONE

NONE [Tag + Subf] will find records that contain the specified field, but none of the occurrences of the field contain the subfield code that you specified, e.g. this Pattern and Rule will find records that have one or more 650 field but none of those fields have a subfield code 'x':  Pattern1: TAG=650 SUBF=x Rule=NONE

NONE [Tag + Subf + Data] will find records that contain the specified field and subfield code but none of the occurrences of the field contain the Data that you specified, e.g. this Pattern and Rule will find records that have one or more 650 field containing subfield $x, but none of those subfield $x contain 'History':  Pattern1: TAG=650 SUBF=x Data = History Rule=NONE

If you are looking for records where a specified field is missing, use NOT (see above)

If you are looking for records where a specified field is present but an indicator value, subfield code, or data is missing, use NONE

If you are looking for records where a specified field is not present or the field is present but none of the occurrences of that field contain all of the elements (Tag Occ, Ind 1, Ind 2, Subf, Subf Occ, and/or Data) that you have specified in the pattern, use NOWHERE (see below)

Rule: NOWHERE If you choose 'NOWHERE' as your match Rule, the program will find records where a repeatable field specified in your Pattern is either not present, or none of the occurrences of that field contain all of the elements (Ind 1, Ind 2, Subf, Occ, and/or Data) that you have specified in the pattern.

NOWHERE [Tag only] is not useful–use NOT instead.

NOWHERE [Tag + Ind] will find records that either do not contain the specified field, or contain the specified field but none of the occurrences of the field contain the indicator that you specified, e.g. this Pattern and Rule will find records that either have no 650 field or have one or more 650 fields but none of those fields have an indicator value of '0':  Pattern1: TAG=650 Ind 1=0 Rule=NOWHERE

NOWHERE [Tag + Subf] will find records that either do not contain the specified field, or contain the specified field, but none of the occurrences of the field contain the subfield code that you specified, e.g. this Pattern and Rule will find records that either have no 650 field or have one or more 650 fields but none of those fields have a subfield code 'x':  Pattern1: TAG=650 SUBF=x Rule=NOWHERE

NOWHERE [Tag + Subf + Data] will find records that either do not contain the specified field or contain the specified field but none of the occurrences of the field contain the specified subfield code, or contain the specified field and subfield code but none of the occurrences of the field contain the Data that you specified, e.g. this Pattern and Rule will find records that either have no 650 field, or have one or more 650 fields but non contain subfield $x, or have one or more 650 fields containing subfield $x, but none of those subfield $x contain 'History':  Pattern1: TAG=650 SUBF=x Data = History Rule=NOWHERE

If you are looking for records where a specified field is missing, use NOT (see above)

If you are looking for records where a specified field is present, but an indicator value, subfield code, or data is missing, use NONE (see above)

If you are looking for records where a specified field is not present, or the field is present but none of the occurrences of that field contain all of the elements (Tag Occ, Ind 1, Ind 2, Subf, Subf Occ, and/or Data) that you have specified in the pattern, use NOWHERE.

phelp/helpmrmgmatchrules.txt · Last modified: 2021/12/29 16:21 (external edit)
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki