>>-DLVALUE--(--data-location--+-------------------------------------------+--)->< '-,--linktype-string--+-------------------+-' '-,--comment-string-'
The DLVALUE function returns a DataLink value. When the function is on the right hand side of a SET clause in an UPDATE statement or is in a VALUES clause in an INSERT statement, it usually also creates a link to a file. However, if only a comment is specified (in which case the data-location is a zero-length string), the DataLink value is created with empty linkage attributes so there is no file link.
The comment-string cannot be the null value. If a comment-string is not specified, the comment-string is the empty string.
If the first argument can be null, the result can be null; if the first argument is null, the result is the null value.
The result of the function is a DataLink value.
The CCSID of the DataLink is the same as that of data-location except in the following cases:
CCSID of data-location | CCSID of comment-string | Result CCSID |
---|---|---|
65535 | 65535 | Job Default CCSID |
65535 | non-65535 | comment-string CCSID (unless the CCSID is 290, 930, 5026, 905, 1026, or 13488 where the CCSID will then be further modified as described in the following rows.) |
290 | any | 4396 |
930 or 5026 | any | 939 |
905 or 1026 | any | 500 |
1200 | any | 500 |
13488 | any | 500 |
When defining a DataLink value using this function, consider the maximum length of the target of the value. For example, if a column is defined as DataLink(200), then the maximum length of the data-location plus the comment is 200 bytes.
INSERT INTO HOCKEY_GOALS VALUES('Maurice Richard', 'Montreal canadian', '?', 'Boston Bruins, '1952-04-24', 'Winning goal in game 7 of Stanley Cup final', DLVALUE(:url_article), DLVALUE(:url_snapshot, 'URL', :url_snapshot_comment), DLVALUE('', 'URL', :url_movie_comment) )
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.