You are here: Adding Section and Field Rules > Search Criteria

Search Criteria

The GetRecord function lets the system get data records from an extract list. It searches the extract list for particular records based on search criteria formatted as shown here:

offset,data offset,data (and so on)

The search criteria is defined by one or more pairs of offsets and data. The number of pairs is limited by the size of the data field in a MEM_DDT_REC. All offsets are based on the first character in a record being character 1 (base 1)—not character zero (0).

It is not necessary for offsets to increase from left to right, but it makes for better readability. It is necessary, however, to specify your search string in the correct case. Searches are performed in a case-sensitive manner.

Because many of the section and field rules use calls to GetRecord, search criteria is often needed wholly or as part of the data field.

Here are some examples:

This search criteria

 

Finds the record...

20,HeaderRec

With the text HeaderRec starting at offset 20.

10,ABC 50,XYZ

With ABC at offset 10 and XYZ at offset 50.

11,~ABC 25,Header

That has a string starting at offset 11 which is not equal (~) to ABC and is equal to Header at offset 25

11,(Electric,Pwr)

That has a string starting at offset 11 which is equal to Electric or Pwr.