Record

Top  Previous  Next

This section is where you configure the pattern recognition to determine what represents the start and end of a message sequence.

 

ascrec

Start Pattern

This value determines the start of relevant information. For example, let's say this is the contents of a file you need to process:

 

SubscriberName=AgencyToDispatch

[MESSAGE]

Line1=Type of call

Line2=Address information.

Line3=Cross-street information.

Line4=Dispatcher notes.

 

You would want to use * as the Start Pattern as we want GetASCII to recognize that the relevant data begins at the very first character of the file.

 

Start Offset

This value determines how many characters before or after the identified start pattern to begin character processing. This field can be set to positive or negative values.

 

For instance, a value of 5 means that GetSerial will begin the data record 5 characters after the first character in the Start Pattern. A value of -5 means that GetSerial will begin the data record 5 characters before the first character the Start Pattern.

 

Using our example, you would set the Start Offset to 0 to indicate that the relevant data begins at the very first character read in.

 

Note: the value -999 has special meaning, and is typically used in conjunction with the use of the Multiple Character Wildcard in the search strings.

 

If -999 is used as a Start Offset, an offset of one character past the string that matches the start pattern, is used. This will cause the number of characters that were found to match the Start Pattern to be skipped, even though the actual number of characters in the Start Pattern matching string aren't known ahead of time.

 

End Pattern

This value determines the end of relevant information. For example, let's say this is the contents of a file you need to process:

 

SubscriberName=AgencyToDispatch

[MESSAGE]

Line1=Type of call

Line2=Address information.

Line3=Cross-street information.

Line4=Dispatcher notes.

 

You would want to use ~ as the End Pattern as that tells PageGate that the very last character in the file is the end of relevant information.

 

End Offset

This value determines how many characters before or after the identified end pattern to end character processing.  This field can be set to positive or negative values.

 

For instance, a value of 5 means that GetSerial will end the data record 5 characters after the last character in the End Pattern. A value of -5 means that GetSerial will end the data record 5 characters after the last character the End Pattern. To use our earlier example, if we don't want the word END to be a part of the record processed, we would set the Start Offset value to -3. That way, the data record ends three characters before the last character of END.

 

Note: the value -999 has special meaning, and is typically used in conjunction with the use of the Multiple Character Wildcard in the search strings.

 

If -999 is used as an End Offset, an offset of one character before the string that matches the end pattern, is used. This will cause the number of characters that were found to match the End Pattern to be skipped, even though the actual number of characters in the End Pattern matching string aren't known ahead of time.