Error codes  Building generic ODL functions

Chapter 3: Building Production Objects

Defining ODL functions

Generic ODL functions have a slightly different format than other functions because they are not specific to TRAN-IDE objects, and you determine what arguments to pass to them. You cannot attach a generic ODL function to a TRAN-IDE object; you must call a generic function from within other functions attached to TRAN-IDE objects.

You code a generic ODL function differently from the other functions. You must include the full function definition within the coding window, including the function’s return value type, its name, and its arguments, not just the parts that fall between the brackets { }.

A generic ODL function is public by default and available to any function in the project. To make a function available only to functions in the selected module, you must place “static” before the function’s name and return type; for example, “static int foo(int a, int b)”.

WARNING! Do not attach a generic ODL function directly to a TRAN-IDE object. Instead, call it from within another function that is attached to a TRAN-IDE object, such as a custom filter function, error function, or qualification function. More than one of these other functions can call the same generic function.





Copyright © 2005. Sybase Inc. All rights reserved. Building generic ODL functions

View this book as PDF