The WhereScape RED Callable Routines can be invoked using the unqualified routine name for SQL Server and Oracle. However, for Teradata and DB2 it is necessary to qualify the routine name with the owner/schema of the WhereScape RED metadata repository. All RED-generated procedures in a Teradata or DB2 repository that invoke a WhereScape RED Callable Routine do so by qualifying the routine name with [METABASE] e.g. [METABASE].routine_name. When RED creates/compiles a procedure in a Teradata or DB2 database it automatically replaces the [METABASE] "token" with the repository owner/schema.
When you edit a RED-generated procedure or create your own custom procedure in Teradata or DB2, you can qualify each callable routine name by either hard-coding the owner/schema or by using the [METABASE] "token" that RED will replace when the procedure is created/compiled in the database. The Teradata and DB2 examples in this chapter use the [METABASE] "token" but if you invoke a WhereScape RED Callable Routine interactively or from outside a RED-compiled procedure/function, then the actual owner/schema must be specified because RED won't have the chance to replace the "token".

  • No labels