AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | PTX | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Generates an HTML list from a Net.Data table.
Format
@DTW_TB_LIST(table, listtype, listitem, itemstyle, link_u, image_u)
@DTW_TB_LIST(table, listtype, listitem, itemstyle, link_u)
@DTW_TB_LIST(table, listtype, listitem, itemstyle)
@DTW_TB_LIST(table, listtype, listitem)
@DTW_TB_LIST(table, listtype)
Parameters
Table 150. DTW_TB_LIST Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | IN | A symbol specifying the macro table variable to display as an HTML list. |
string | listtype | IN | The type of list to generate. Acceptable values include:
|
integer | listitem | IN | The column number in table containing the list values (the text to go after the <li> tag). The default is to use the first column. |
string | itemstyle | IN | A variable or literal string containing a list of HTML elements for the term name values. The default is to use no style tags. |
integer | link_u | IN | The column number in table that contains the URLs for the HTML links. If this value is not specified, no HTML links are generated. |
integer | image_u | IN | The column number in table that contains the URLs for the inline images. If this value is not specified, no inline images are generated. |
Return Codes
Table 151. DTW_TB_LIST Return Codes
Return Code | Explanation |
---|---|
-1001 | The server could not process a Net.Data request to allocate memory. |
1001 | An input parameter contained a NULL value. |
1002 | An input parameter contained a string value which consisted of the null-terminating character. |
1003 | An incorrect number of parameters were passed on a function call. |
1004 | A parameter passed on a function call, required to be a Net.Data macro table variable, was of a different variable type. |
1005 | A parameter passed on a function call, required to be a string variable, was of a different variable type. |
1007 | A parameter contains a value which is not valid. |
1008 | A parameter is outside of table bounds. |
Examples
Example 1: Generates HTML tags for an ordered list
@DTW_TB_LIST(Mytable,"OL","4","TT U","2","1")
Results:
<tt><u> <ol> <li><a href="http://www.mycompany.com/link1.html"> <img src="http://www.mycompany.com/images/image1.gif" alt="">link1text</a></li> <li><a href="http://www.mycompany.com/link2.html"> <img src="http://www.mycompany.com/images/image2.gif" alt="">link2text</a></li> <li><a href="http://www.mycompany.com/link3.html"> < IMG SRC="http://www.mycompany.com/images/image3.gif" ALT="">link3text</a></li> <li><a href="http://www.mycompany.com/link4.html"> <img src="http://www.mycompany.com/images/image4.gif" alt="">link4txt</a></li> </ol> </u></tt>