Data link support classes (DB/2 only)
The database data link support classes provide a means for storing file links into a database and accessing file links from a database. These classes store the information that you use to create and access data links to files. These data links give file access the same data integrity as data that is stored in the database. See the Quick Beginnings for DB2 File Manager for more information on data links and the Data Link File Manager. The following platforms support the VA Smalltalk data link type:
•Windows 2000, or XP
•AIX
The following classes make up VA Smalltalk data link support:
AbtDataLink
Associates a data link value with a file location and file.
To insert or update a data link, create an instance of this class, set the scheme, server, and pathOnly attributes, and send the instance as input on the INSERT statement execution.
When you fetch a data link, VA Smalltalk returns an instance of this class with the scheme, server, pathOnly, complete, and comment attributes set.
The AbtDataLink class contains all of the attributes except path and linktype. You can retrieve the path and linktype attributes using the #getAttribute:ofDataLink: method.
The complete list of data link attributes is:
scheme
Type of server protocol.
server
Fully qualified hostname of the server where the file resides.
pathOnly
Path and file name, not including the data link key.
path
Path and file name, including the data link key.
complete
Complete URL to access the file.
linktype
Link type of the file, currently always equal to URL.
comment
Description of the file.
Note:
The characters used in a data link value are limited to the set defined for a URL. These characters include the uppercase (A through Z) and lower case (a through z) letters, the digits (0 through 9) and a subset of special characters ($, -, @, ., &, +, !, *, ", ', (,), =, ;, /, #, ?, :, space, and comma).
AbtDataLinkConverter
Enables the data link class, AbtDataLink, to be available to VA Smalltalk parts. Allows you to choose the attribute of AbtDataLink to display in the container details columns.
To display more than one attribute, add two container details columns and set the AbtDataLinkConverter instance for each column to the appropriate attribute.
The following table shows the valid attributes and an example of what is displayed. For this example, the data links server machine is abc.raleigh.ibm.com. The files are stored in x/y directory and the filename is filename.ext. The astericks represent an access token which UDB provides.
| |
Link Type | URL |
Complete | http://abc.raleigh.ibm.com/x/y/****;filename.ext |
Path | /x/y/****;filename.ext |
Path Only | /x/y/filename.ext |
Scheme | http |
Server | abc.raleigh.ibm.com |
AbtIbmCliDataLinkField
Stores the data that you move to and from the database operating system memory. The field class moves the data link value attribute between the AbtDataLink class and the operating system memory.
Data link restrictions
Notes:
a. The data link type does not support the equality operator. Use scalar functions instead of the equality operator. For more information on scalar functions, see IBM DB2 Universal Database SQL Reference For example, use the following code:
DLURLSCHEME(DL)='HTTP' AND
DLURLSERVER(DL)='ABC.RALEIGH.IBM.COM' AND
DLURLPATHONLY(DL)='/test.dat'
b. The data link type does not support linking to the same file from either the same database or from different databases. To allow multiple links to the same file, place the file data link in a separate database table and refer to it from other database tables.
Last modified date: 01/29/2015