Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : $GET_SIZE

$GET_SIZE
Retrieves the size of an expression. (F)
Invocation
result = $GET_SIZE(value)
 
The size of an expression. This argument is typeless, two bytes long, and of binary syntax with 0 decimal places.
Example
Rule

 
RULE EDITOR ===> SCROLL: P
GET_SPEC(TABLE, FIELD);
_ LOCAL A, B, C, D, E;
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ GET TABLE; ¦ 1
_ A = $GET_SIZE((TABLE).(FIELD)); ¦ 2
_ B = $GET_TYPE((TABLE).(FIELD)); ¦ 3
_ C = $GET_SYNTAX((TABLE).(FIELD)); ¦ 4
_ D = $GET_DECIMALS((TABLE).(FIELD)); ¦ 5
_ E = $GET_MAXSIZE((TABLE).(FIELD)); ¦ 6
_ CALL ENDMSG(TABLE || ' ' || FIELD || ' ' ||(TABLE).(FIELD) ¦ 7
_ || ' ' || A || ' ' || B || ' ' || C || ' ' || D || ' ' ¦
_ || E); ¦
_ ---------------------------------------------------------------------------

 
Output
Running GET_SPEC(TABLES,NAME) could produce:
TABLES NAME $$ACCESSLOG 11 I C 0 16
Explanation
GET_SPEC uses the $GET_SIZE tool, as well as $GET_DECIMALS, $GET_MAXSIZE, $GET_SYNTAX, and $GET_TYPE, to get information about the field of a table.
You can also use these shareable tools to dump out the metadata information on the values involved in an error that you trapped while debugging a rule.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved