The following built-in qualification functions are available:
Verifies the existence of data in the specified collection file. Use this function before using the dbSelect built-in filter function when you cannot be certain if data is in a collection file.
Must match the pattern string in the Qualification Object Information windows’s FldObj or Datalink field.
Verifies that data is not present in the specified collection file. Use this function before using the dbInsert built-in filter function to verify that there is no data in the collection file that the dbInsert operation would overwrite.
Must match the pattern string in the Qualification Object Information windows’s FldObj or Datalink field.
Performs a byte-by-byte comparison of the content in the Qualification Object Information windows’s FldObj or Datalink field to the date format specifiers in the argument string. If they match, the function returns true (1).
Argument |
Description |
---|---|
YY |
The last two digits of the year. |
YYYY |
The year. |
jjj |
The Julian date (0 – 365). |
JJJ |
The for Julian date (1 – 366). |
mm |
The month (1 – 12). |
dd |
The day (1 – 31). |
w |
The day of the week (0 – 6). |
W |
The day of the week (1 – 7). |
Any other character must match the data in the Qualification Object Information windows’s FldObj or Datalink field.
If the referenced object’s data contains at least the month and day, then isDate also verifies that the date is valid (for example, “9 – 31” is invalid). To verify leap year dates, the referenced object must contain the month, day, and year.
Because isDate compares each format specifier in the argument string to one byte of data in the referenced field or datalink object, the bytes of data must exactly match the format specifiers. For example, if the data for the month is “3” instead of “03”, use the “m” argument instead of the “mm” argument.
YY/mm/dd
W
– In the incoming data, the year,
month, and day must each be two characters. The two slashes (/)
and the space character must be present in the data exactly as entered
in the argument string.
JJ
– In
the incoming data, the Julian date can be only two characters, specifically,
from 01 to 99.
m-YYYY
– In
the incoming data, the month can only have one character, from 1
to 9, and the year must have four characters. The dash must be present
in the data, exactly as entered in the argument string.
Compares the content of the Qualification Object Information windows’s FldObj or Datalink field to the argument string. If they match, the function returns true (1).
Must match the pattern string in the Qualification Object Information windows’s FldObj or Datalink field.
Compares the content of the Qualification Object Information windows’s FldObj or Datalink field to the argument string. If they do not match, the function returns true (1).
Must not match the pattern string in the Qualification Object Information windows’s FldObj or Datalink field.
Checks the content of the Qualification Object Information windows’s FldObj or Datalink field for the regular expression in the argument string. If it is not present, the function returns true (1). You can use a simple literal or a UNIX-style regular expression.
The regular expression in the Qualification Object Information windows’s FldObj or Datalink field.
Checks the content of the Qualification Object Information windows’s FldObj or Datalink field for the regular expression in the argument string. If it is present, the function returns true (1). You can use a simple literal or a UNIX-style regular expression.
The regular expression in the Qualification Object Information windows’s FldObj or Datalink field.
Because isTime compares each format specifier in the arguments string to one byte of data in the Qualification Object Information windows’s FldObj or Datalink field, the bytes of data must exactly match the format specifiers. For example, if the data for the minutes is “7” instead of “07”, use the “m” argument of mm. However, “xx” must always contain two characters, and “zzz” must always contain three-characters.
hh:mm xx
– In
the incoming data, the hour and minutes must each be two characters.
The colon and the space characters must be in the data exactly as
entered in the argument string.
ss:m:H
– In
the incoming data, the seconds must be two characters, ie. from
01 to 59, and the minutes and hour can only be one character each, ie.
from 0 to 9.
When you use the isRegEx() and isNotRegEx() qualification functions, the regular expression in the argument string can contain special symbols so the value matches a range of values in the data area.
Symbol |
Description |
---|---|
[ ] |
Brackets define a range of characters to match a single character position. Example – “ |
. |
A period matches any single character except newline. Example – “ |
* |
An asterisk matches any character or characters. Example – “ |
^ |
A caret at the start of an expression causes a match only on the initial segment of a line. If the caret precedes a string in brackets, a match occurs on any character except the characters in the string and new line. Example – “ |
+ |
A plus sign following a regular expression means one or more times. Example – “ |
$ |
A dollar sign as the last character of a regular expression anchors the expression to the end of a line. The strings that end in the expression's characters just preceding the $ fulfill the search criteria. Example – “ |
– |
|
{m} {m,} {m,u} |
Integers that specify the number of times
to apply the preceding regular expression. “ |
( ) |
Use parentheses to group other expressions. Operators like *, {}, and + can work on a regular expression enclosed in parentheses ( ) as well as on a single character. |
\ |
You can use any of the above characters as their own value by preceding the character with a backslash. The backslash works on only one character at a time. Example – “ |
To scan for the string “[TASK-01] C:>
”,
where the numbers can change to any other numbers, use:
\[TASK-[0-9][0-9]\] C:.>
To accept a value without case sensitivity, follow the example below. This example accepts any combination of these letters, but in the correct sequence, to make the word date.
[Dd][Aa][Tt][Ee]
To enter an octal value, enter the character in
the form “\134
”.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |