Creating Q-pointers

Create the D3 Oracle Gateway Q-pointers for each Oracle database. The remote Q-pointer defines the D3 view of an Oracle table. The name of each Oracle table column available to D3 is enumerated within the Q-pointer.

Note: Due to caching, each time that a super Q-pointer is modified, the current D3 session must be logged off to flush the super Q-pointer information from the server.

Item-ID

The super Q-pointer item-ID is used the same way as any other file-pointer item-ID (as the name of a file to open).

Attributes 1 and 2

Attribute 1 is always a q. Attribute 2 is always blank for super Q-pointers.

Attribute 3

Attribute 3 has the Oracle table name, and an optional slash with a view name or number. The D3 Oracle Gateway only opens a file name once, and returns a pointer to the opened file descriptor for each subsequent open. Oracle tables (files) can be opened more than once with different sets of primary keys/columns, so we need a way to defeat the open caching for differing columns/primary keys. We do that with the tablename/view. Unless you intend to open the same Oracle table with differing primary key definitions or column definitions, you do not need to worry about this.

Attribute 4

Attribute 4 defines what primary keys and columns work with the Q-pointer. For an Oracle Q-pointer, the data is structured as:

pk1{.d1.pk2{...}}{/col1{/col2{...}}}

where:

Option Description
pkN Primary key piece N. A primary key within Oracle can consist of one or more columns. The standard procedure for implementing a multi-part item-ID in D3 is to delimit each part with a character that would not appear in the data, such as an asterisk.
dN The character delimiting pkN from pkN+1.
colN
  • Each column name in the Oracle table that the D3 user wishes to reference must appear within the Q-pointer, delimited with a slash (/).

  • The attribute number for each column defaults to the ordinal position within the slashes.

  • To give an attribute a specific attribute number, prefix the column name with the number. For example, to make the column named duedt attribute 10, use the definition 10duedt.

Attributes MUST be defined in order.

This example is illegal and produces undefined results:

ordno.*.partno/10duedt/3qord
This example is legal:
ordno.*.partno/3qord/10duedt

Example Q-pointer

Attr,value Data Description
item-ID orderpart D3 opens orderpart to access the op table within the Oracle database.
1 q Q-pointer
2 blank Not used by super Q-pointers.
3 oravms:op/shortview oravms Item-id in the dm,hosts, file that references a particular schema on a specific instance of a specific system.
op Name of the table in the Oracle database.
shortview Name of this D3 view of this table. Unnecessary unless there is another Q-pointer that refers to a table named op in this, or any other schema.
4 ordno.*.partno/qord/10duedt ordno Name of the column within the op table representing the first field of the item-id.
.*. Delimiter between the first and second part of the item-id. It MUST be enclosed in periods.
partno Column name of the second field of the item-ID.
qord Column named qord. Appears as attribute 1 because it is the first column defined and has no attribute number specified.
10duedt Column named duedt in Oracle appears as attribute 10 in D3 because of the 10 before the name.