You can use the INCLUDE OMIT Substring Comparison statement in conjunction with other options to select/omit the number of records to be processed, which can reduce processor and data transfer time. There are two types of INCLUDE OMIT Substring Comparison tests:
This information is also applicable to OMIT control statement.
SyntaxINCLUDE COND=(Field-1 starting position, Field-1 length, SS, Relational Operator, Substring Constant) (P1,M1,SS,EQ/NE,constant) or (P1,M1,EQ/NE,constant)
P1 – specifies the first byte of the character input field. The first data byte of a fixed-length is relative position 1. The first data byte of a variable-length record is relative position 5; the first four bytes contain the record descriptor word. All fields must start on a byte boundary and must not extend beyond byte 4092.
M1 – Specifies the length of the field to be tested. Length is 1 to 256 bytes.
Constant – A character string or a hexadecimal string.
Format for a character string constant is C’cc…c’ where ‘c’ may be any EBCDIC character, up to 256 characters. To include a single apostrophe in the character string, such as for the name O’Malley, specify it with two single apostrophes. For example, C’O’ ‘Malley’
The format for hexadecimal is X’ xx…xx’ where ‘xx’ is any pair of hexadecimal digits, up to 256 pairs. Valid hexadecimal digits are 0–9, A, B, C, D, E, and F.
Example-01
Suppose you want to select only records having OK in anywhere within bytes 11 through 16 or OR bytes 21 through 23 containing J69, L92, or J92. You can use one of the substring search capabilities of INCLUDE and OMIT to write the statement in a simpler form as:
INCLUDE FORMAT=SS,COND=(11,6,EQ,C'OK',OR,21,3,EQ,C'J69,L92,J82')
Example-02
Suppose you want to select only the books for the Biology, History, Business and Psychology departments. You can use one of the substring search capabilities of INCLUDE and OMIT to write the statement in a simpler form as:
INCLUDE COND=(106,5,SS,EQ,C'BIOL ,HIST ,BUSIN,PSYCH')
With substring search (SS format), you only write the field once and write the character constant so it includes all of the strings you want to search for. If the value in the field matches any of the strings (for example, “BUSIN”), the record will be included. If the value in the field does not match any of the strings, the record will be omitted.
The length of each string must match the length of the field. Because the Department field is 5 characters, you must add a blank at the end of “BIOL” and “HIST”, which are each four characters, but not for “BUSIN” and “PSYCH”, which are each five characters.
Effective User interviews play a crucial role in Scrum methodology, helping Product Owners and Scrum…
Product Owners should be well-versed in various user research tools and techniques to effectively understand…
Effective Product Owner plays a crucial role in Agile development, acting as the bridge between…
A well-maintained product backlog is crucial for successful product development. It serves as a single…
Incremental value to the customer refers to the gradual delivery of small, functional parts of…
A Product Market refers to the group of potential customers who might be interested in…