The INCLUDE/OMIT control statement selects records from an input file based on comparisons testing the contents of one or more fields within the record. A field can be compared to a constant or to another field within the record. Furthermore, a binary field may enter into comparisons that involve testing the individual bits in the field. Only one INCLUDE/OMIT control statement can be specified for an application, either as an INCLUDE or as an OMIT control statement.
Locale-Based Comparison Processing
MFX supports alternative sets of collating rules based on a specified national language. The alternative collating applies to INCLUDE/OMIT (and OUTFIL INCLUDE/OMIT) comparison processing as well as to SORT/MERGE processing. A locale defines single and multi-character collating rules for a cultural environment.
Locale-based INCLUDE/OMIT processing applies only to character (CH) fields and character or hexadecimal constants compared to character fields. When LOCALE is active, a CH to BI (or BI to CH) comparison is not allowed. The illegal comparison will cause MFX to terminate with an error message.
For more information on locale-based processing, see LOCALE.
INCLUDE/OMIT Control Statement Format
COND Parameter (Required)
COND=ALL | All of the input records are to be included. This is the default. |
COND=NONE | None of the input records are to be included. |
COND=comparison(s) | Specifies one or more comparisons that determine which
records are to be included or omitted. Two types of
comparisons are possible:
|
The following several pages describe standard comparisons. For information on substring comparisons, see Substring Comparisons.
p | The position value indicates the first byte of the field relative to the beginning of the input record after E15 or E32 processing, if specified, has completed. The field must begin on a byte boundary. (Keep in mind that if a variable-length file is being referenced, the first 4 bytes must be reserved for the Record Descriptor Word.) |
l | The length value indicates the length of the field. The length must be an integer number of bytes. See the table below for permissible field lengths by format. |
f | The format value indicates the format of the field. The permissible formats for standard comparisons are indicated in the following table. If all data fields have the same format, the FORMAT=f subparameter can be specified instead of the individual f values. If both are specified, the individual f values will be used for fields where they are specified. |
|
For information on the year data formats (Y2B, Y2C, Y2D, Y2P, Y2S and Y2Z) plus the related data format PD0, see CENTWIN Parameter (Optional) and Converting Year Data with Century Window Processing on INREC, OUTREC, or OUTFIL OUTREC. Also, see Specifying Field-to-Field Standard Comparisons for Year Fields.
|
bit mask | A bit mask is a string of bits, specified in terms of either hexadecimal or binary digits. The bit mask indicates which bits in the input field are to be tested. Each bit in the mask whose value is 1 (ON) is tested against the corresponding bit in the input field. If the value of a mask bit is 0 (OFF), the corresponding bit in the input field is ignored. The hexadecimal format of a bit mask is X'hh...hh,' where each 'hh' represents any pair of hexadecimal digits. The binary format of a bit mask is B'bbbbbbbb...bbbbbbbb', where each 'bbbbbbbb' represents 8 bits or a byte. Each bit is 1 or 0. The number of bits in a binary bit mask must be a multiple of 8. The maximum length of a binary bit mask is 256 bytes (2048 bits). A bit mask is truncated or padded on the right to the byte length of the binary field. The pad character is X'00' or B'00000000'. |
bit pattern | The binary format of a bit pattern is B'bbbbbbbb...bbbbbbbb', where each 'bbbbbbbb' represents 8 bits or a byte. Each bit is 1, 0, or period (.). If the value of a bit in the bit pattern is 1 or 0, the corresponding bit in the binary input field is compared to 1 or 0. If a . (period) occurs in a bit position in the bit pattern, the corresponding bit in the input field is ignored. The number of bit positions in a bit pattern must be a multiple of 8. The maximum length of a bit pattern is 256 bytes (2048 bits). A bit pattern is truncated or padded rightward to the byte length of the binary input field. The pad character is B'00000000'. |
EQ | Equal to |
NE | Not equal to |
GT | Greater than |
GE | Greater than or equal to |
LT | Less than |
LE | Less than or equal to |
BO (or ALL) | All mask bits are 1s (ON) in the input field |
BM (SOME) | Some but not all mask bits are 1s (ON) in the input field |
BZ (NONE) | None of the mask bits is 1 (ON) in the input field |
BNO (NOTALL) | Some or no mask bits are 1s (ON) in the input field |
BNM (NOTSOME) | All or no mask bits are 1s (ON) in the input field |
BNZ (NOTNONE) | All or some mask bits are 1s (ON) in the input field |