17.10 - Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)
int FNC_Get_GLOP_Map (GLOP_Map_t **Map)
Map
typedef struct
{
  GLOP_ref_t  GLOP[8],
} GLOP_Map_t;
GLOP_ref_t
typedef  struct
{
  void     *GLOP_ptr,
  int       version,
  int       size,
  int       page,
  GLOP_Mode mode,
  GLOP_Type type,
}  GLOP_ref_t;

Syntax Elements

Map
The address of where FNC_Get_GLOP_Map is to store a pointer to a GLOP_Map_t structure.
If the external routine has no access to a GLOP set, FNC_Get_GLOP_Map returns a NULL pointer. This is the case when the external routine contains no USING GLOP SET clause in the CREATE statement or the GLOP data table could not find a row for the specified GLOP set of which the external routine is a member.
Structure GLOP_Map_t is an array of eight GLOP_ref_t structures, plus some internal structures. Eight GLOP data references is the maximum an external routine is allowed to map.
GLOP_ptr
Specifies the mapped address of the GLOP data.
version
Specifies the version of the GLOP being used.
This version reflects the GLOP_Version column in the DBCExtension.GLOP_Data table.
size
Specifies the length in bytes of the mapped GLOP data.
Referencing outside the range could cause a memory violation.
page
Specifies the number of the mapped GLOP page.
mode
Specifies the mapping and modification mode, where the GLOP_Mode enumerated type has the following definition:
typedef enum
  {
    GLOP_NONE=0, /* no map mode */
    GLOP_R=1,    /* read-only */
    GLOP_W=2,    /* normal map read/write */
    GLOP_M=3,    /* normal map global modify */
    GLOP_SW=4,   /* shared map read/write */
    GLOP_SM=5    /* shared map global modify */
  } GLOP_Mode;
For details on the GLOP mapping and modification modes, see GLOP Data Attributes and GLOP Data Attributes.
type
Specifies the type of GLOP, where the GLOP_Type enumerated type has the following definition:
typedef enum
 {
   GLOP_NULL=0, /* no mapping */
   GLOP_SY=1,   /* system GLOP */
   GLOP_RO=2,   /* role GLOP */
   GLOP_US=3,   /* user GLOP */
   GLOP_SE=4,   /* session GLOP */
   GLOP_TR=5,   /* transaction GLOP */
   GLOP_RE=6,   /* request GLOP */
   GLOP_XR=7    /* external routine GLOP */
 }  GLOP_Type;
For details on the GLOP types, see GLOP Types.