The FIND command is optional. When specified, it must follow the INPUT command that defines the data file to be processed. Its purpose is to define a data string that is used as a search vehicle for selection or rejection of records.
Command Operands FIND=t'data',POS=nnnnn,ro,OFFSET=nnnnn,OFFSIZ=n,LOGIC=AND|OR,RDW
where:
(required) is the data type.
specifies that the following data is considered to be character data and used as is.
specifies that the following data is considered to be hex data.
specifies that the following data is considered to be packed data.
(required) is the actual data string/target data searched for within an input record. The data must be enclosed in single quotes.
For more information on data specification, see Data Specification Rules in this chapter.
(required) a 1- to 5-digit numeric value specifying the starting position, relative to zero (0), of the target data within the record. For variable length records (RECFM=VB or RECFM=VBS), the standard 4-byte RDW field is ignored for purposes of coding POS=n. That is, POS=0 addresses the first byte of the record itself (not the first byte of the RDW). This rule is adjusted if OFFSET is also coded.
(optional) specifies the relational operand to be used as the comparison condition which the target data must meet. Valid operands are:
If omitted, the File Utility defaults to EQ.
(optional) a 1- to 5-digit numeric value that defines the starting position, relative to zero (0), of a field containing an offset value that when added to the start of the record, addresses a data segment within the record.
When OFFSET= is specified, the keyword POS= refers to the start of the data segment itself, not the start of the record.
(optional) where n is a value between 1 and 4 that defines the size of the field found at OFFSET=nnnnn.
(optional) specifies that the value found at OFFSET= (includes a 4-byte length for the record descriptor word).
(optional) The LOGIC= keyword provides you with a means by which FIND commands can be logically connected to form Boolean expressions.
specifies that the next FIND statement must be used in qualifying the data for selection or rejection, and that the data must meet all the criteria specified in each FIND command connected with AND.
specifies that if the target data does not meet the criteria on the current FIND command, the next FIND command is used in qualifying the data for selection or rejection.
If omitted, the File Utility defaults to OR.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |