Chapter 4 Managing Profiles
This section also applies for defining the script of a custom method, a calculated collection, an event handler, or a transformation.
You type the script of a custom check in the Check Script tab of the custom check properties. By default, the Check Script tab displays the following script items:
In Sybase AS IQ, you need to create additional checks on indexes in order to verify their columns. The custom check you are going to create verifies if indexes of type HG, HNG, CMP, or LF are linked with columns which data type VARCHAR length is higher than 255.
To define the script of a custom check:
Dim c 'temporary index column Dim col 'temporary column Dim position Dim DT_col
%Check%= True
if obj.type = "LF" or obj.type = "HG" or obj.type = "CMP" or obj.type ="HNG" then
for each c in obj.indexcolumns
set col = c.column
position = InStr(col.datatype,"(")
if position <> 0 then
DT_col = left(col.datatype, position -1)
else
DT_col = col.datatype
end if
if ucase(DT_col) = "VARCHAR" and col.length > 255 then
output "Table " & col.parent.name & " Column " & col.name & " : Data type is not compatible with Index " & obj.name & " type " & obj.type
%Check% = False
end if
| Copyright (C) 2007. Sybase Inc. All rights reserved. |
| |