These functions simplify working with Net.Data tables and are more efficient than writing your own functions using REXX, C, or Perl.
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Adds one or more rows to the end of a table. Assign the table values of the new rows with the DTW_TB_SETV() function after rows are appended to the table.
The number of columns in the table must be set before calling DTW_TB_APPENDROW(). You can set the number of columns with the DTW_TB_SETCOLS() or DTW_TB_INSERTCOL() functions, or by passing the table to a language environment to be set.
If there is a limit on the total number of rows allowed in the table, and the number of rows to be appended can cause the limit to be exceeded, an error is returned to the caller.
Format
@DTW_TB_APPENDROW(table, rows)
Values
Table 68. DTW_TB_APPENDROW Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable for which rows are appended. |
| integer | rows | IN | The number of rows to append to table. |
Examples
Example 1: Appends ten rows to the table
%DEFINE myTable = %TABLE @DTW_TB_APPENDROW(myTable, "10")
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X |
| X | X | X | X |
Purpose
Returns the current number of columns in a table.
Format
@DTW_TB_COLS(table, cols)
@DTW_TB_rCOLS(table)
Values
Table 69. DTW_TB_COLS Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable for which the number of columns are returned. |
| integer | cols | OUT | A variable that contains the number of columns in table. |
Examples
Example 1: Retrieves the number of columns and assigns the value to cols
%DEFINE myTable = %TABLE %DEFINE cols = "" ... @FillTable() ... @DTW_TB_COLS(myTable, cols)
Example 2: Retrieves and displays the value for the current number of columns in the table
%DEFINE myTable = %TABLE ... @FillTable() ... <P>My table contains @DTW_TB_rCOLS(myTable) columns.
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Deletes one or more rows beginning at the row specified in start_row.
The number of columns in the table must be set before calling DTW_TB_DELETEROW(). You can set the number of columns with the DTW_TB_SETCOLS() or DTW_TB_INSERTCOL() functions, or by passing the table to a language environment to be set.
Format
@DTW_TB_DELETEROW(table, start_row, rows)
Values
Table 70. DTW_TB_DELETEROW Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable from which rows are to be deleted. |
| integer | start_row | IN | The row number of the first row in table to delete. |
| integer | rows | IN | The number of rows to delete from table. |
Examples
Example 1: Deletes five rows starting at row 10 of a table
%DEFINE myTable = %TABLE @DTW_TB_DELETEROW(myTable, "10", "5")
Example 2: Deletes all of the rows of a table
%DEFINE myTable = %TABLE @DTW_TB_DELETEROW(myTable, "1", @DTW_TB_rROWS(myTable))
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns an HTML definition list from a macro table.
Format
@DTW_TB_DLIST(table, term, def, termstyle, defstyle, link, link_u, image, image_u)
Values
Table 71. DTW_TB_DLIST Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | A symbol specifying the macro table variable to display as an HTML definition list. |
| integer | term | IN | The column number in table that contains term name values (the text to go after the <DT> tag). The default is to use the first column. |
| integer | def | IN | The column number in table containing term definition values (the text to go after the <DD> tag). The default is to use the second column. |
| string | termstyle | IN | A variable or literal string that contains a list of HTML elements for the term name values. The default is to use no style tags. |
| string | defstyle | IN | A variable or literal string containing a list of HTML elements for the term definition values. The default is to use no style tags. |
| string | link | IN | Specifies for which HTML elements an HTML link is generated. Valid values are DT and DD. The default is not to generate HTML links. |
| integer | link_u | IN | The column number in table that contains the URLs for the HTML references. The default is not to generate HTML links. |
| string | image | IN | Specifies for which HTML elements an inline image is generated. Valid values are DT and DD. The default is not to generate inline images (DT). |
| integer | image_u | IN | The column number in table that contains the URLs for the inline images. The default is not to generate inline images. |
Examples
Example 1: Creates a definition list producing the HTML shown below, depending on the table data
@DTW_TB_DLIST(Mytable,"3","4","b i","strong","DD","2","DT","1")
Results:
<DL> <DT> <IMG SRC="http://www.mycompany.com/images/image1.gif" ALT=""><b><i>image1text</i></b> <DD> <A HREF="http://www.mycompany.com/link1.html"><strong>link1text</strong></A> <DT> <IMG SRC="http://www.mycompany.com/images/image2.gif" ALT=""><b><i>image2text</i></b> <DD> <A HREF="http://www.mycompany.com/link2.html"><strong>link2text</strong></A> <DT> <IMG SRC="http://www.mycompany.com/images/image3.gif" ALT=""><b><i>image3text</i></b> <DD> <A HREF="http://www.mycompany.com/link3.html"><strong>link3text</strong></A> <DT> <IMG SRC="http://www.mycompany.com/images/image4.gif" ALT=""><b><i>image4text</i></b> <DD> <A HREF="http://www.mycompany.com/link4.html"><strong>link4text</strong></A> </DT> </DL>
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns the contents of a macro table variable. Each row of the table is displayed on a different line. The entire table is enclosed in <PRE></PRE> tags.
Format
@DTW_TB_DUMPH(table)
Values
Table 72. DTW_TB_DUMPH Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | A symbol specifying the macro table variable to display. |
Examples
Example 1:
@DTW_TB_DUMPH(Mytable)
The HTML generated by this example looks like this:
<PRE> Name Department Position Jack Smith Internet Technologies Software Engineer Helen Williams Database Development Manager Alex Jones Manufacturing Industrial Engineer Tom Baker Procurement Sales Rep </PRE>
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns the contents of a macro table variable. Each table value is on a different line. The entire table is enclosed in <PRE></PRE> tags.
Format
@DTW_TB_DUMPV(table)
Values
Table 73. DTW_TB_DUMPV Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | A symbol specifying the macro table variable to display. |
Examples
Example 1:
@DTW_TB_DUMPV(Mytable)
The HTML generated for this example looks like this:
<PRE> http://www.mycompany.com/images/image1.gif http://www.mycompany.com/link1.html image1text link1text http://www.mycompany.com/images/image2.gif http://www.mycompany.com/link2.html image2text link2text http://www.mycompany.com/images/image3.gif http://www.mycompany.com/link3.html image3text link3text http://www.mycompany.com/images/image4.gif http://www.mycompany.com/link4.html image4text link4text </PRE>
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X |
| X | X | X | X |
Purpose
Retrieves the column heading for the column number specified in col.
You must set the number of columns in the table before calling DTW_TB_GETN(). You can set the number of columns with the DTW_TB_SETCOLS() or DTW_TB_INSERTCOL() functions, or by passing the table to a language environment to be set.
Format
@DTW_TB_GETN(table, col, name)
@DTW_TB_rGETN(table, col)
Values
Table 74. DTW_TB_GETN Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable from which a column name is returned. |
| integer | col | IN | The column number of the column whose name is to be returned. |
| string | name | OUT | A variable that contains the name of the column specified in col. |
Examples
Example 1: Retrieves the column name of column 4
%DEFINE myTable = %TABLE %DEFINE name = "" ... @FillTable() ... @DTW_TB_GETN(myTable, "4", name)
Example 2: Retrieves the column name of the last column in the table
%DEFINE myTable = %TABLE ... @FillTable() ... <P>The column name of the last column is @DTW_TB_rGETN(myTable, @DTW_TB_rCOLS(myTable))
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X |
| X | X | X | X |
Purpose
Retrieves the table value for the row and column numbers specified in row and col.
You must set the number of columns in the table before calling DTW_TB_GETV(). You can set the number of columns with the DTW_TB_SETCOLS() or DTW_TB_INSERTCOL() functions, or by passing the table to a language environment to be set.
Format
@DTW_TB_GETV(table, row, col, value)
@DTW_TB_rGETV(table, row, col)
Values
Table 75. DTW_TB_GETV Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable for which a table value is returned. |
| integer | row | IN | The row number of the value to be returned. |
| integer | col | IN | The column number of the value to be returned. |
| string | value | OUT | A variable that contains the value at the row and column specified in row and col. |
Examples
Example 1: Retrieves the table value at row 6, column 3
%DEFINE myTable = %TABLE %DEFINE value = "" ... @FillTable() ... @DTW_TB_GETV(myTable, "6", "3", value)
Example 2: Retrieves the table value at row 1, column 1
%DEFINE myTable = %TABLE ... @FillTable() ... <P>The table value of row 1, column 1 is @DTW_TB_rGETV(myTable, "1", "1").
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns the input macro table with these HTML characters encoded:
| Name | Character | Code |
|---|---|---|
| Ampersand | & | & |
| Double quote | " | " |
| Greater than | > | > |
| Less than | < | < |
Format
@DTW_TB_HTMLENCODE(table, collist)
Values
Table 76. DTW_TB_HTMLENCODE Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | INOUT | The macro table variable to modify. |
| string | collist | IN | The column numbers in table to encode. The default is to encode all columns. |
Examples
Example 1:
@DTW_TB_HTMLENCODE(Mytable, "3 4")
The special characters in columns 3 and 4 of the specified table are replaced with their encoded forms.
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns one or more HTML check box input tags from a macro table variable.
Format
@DTW_TB_INPUT_CHECKBOX(table, prompt, namecol, valuecol, rows, checkedrows)
Values
Table 77. DTW_TB_INPUT_CHECKBOX Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable to display as check box input tags. |
| string | prompt | IN | The column number in table or a string containing the text to display next to the check box. This parameter is required but can have a null ("") value. When prompt is null, the value used is the value defined for namecol. |
| string | namecol | IN | The column number in table or a string containing the input field names. |
| string | valuecol | IN | The column number in table or a string containing the input field values. The default is 1. |
| integer | rows | IN | The list of rows in table from which to generate the input fields. The default is to use all rows. |
| integer | checkedrows | IN | The list of rows specifying which rows of table to check. The default is not to check fields. |
Examples
Example 1: Generates HTML for three check box input tags
@DTW_TB_INPUT_CHECKBOX(Mytable,"3","4","","2 3 4","1 3 4")
Results:
<INPUT TYPE="CHECKBOX" NAME="link2text" VALUE="1">image2text<BR> <INPUT TYPE="CHECKBOX" NAME="link3text" VALUE="1" CHECKED>image3text<BR> <INPUT TYPE="CHECKBOX" NAME="link4text" VALUE="1" CHECKED>image4text<BR>
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns one or more HTML radio button input tags from a macro table variable.
Format
@DTW_TB_INPUT_RADIO(table, prompt, namecol, valuecol, rows, checkedrows)
Values
Table 78. DTW_TB_INPUT_RADIO Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable to display as radio button input tags. |
| string | prompt | IN | The column number in table or a string containing the text to display next to the radio button. Required parameter, but can contain a null ("") value. When prompt is null, uses the value of valuecol. |
| string | namecol | IN | The column number in table or a string containing the input field names. |
| string | valuecol | IN | The column number in table or a string containing the input field values. |
| string | rows | IN | The list of rows in table from which to generate the input fields. The default is to use all rows. |
| integer | checkedrows | IN | A row number in table to display the corresponding radio button as checked. Only one value is allowed. |
Examples
Example 1: Generates HTML for three radio button input tags
@DTW_TB_INPUT_RADIO(Mytable,"3","Radio4","4","2 3 4","4")
Results:
<INPUT TYPE="RADIO" NAME="Radio4" VALUE="link2text">image2text<BR> <INPUT TYPE="RADIO" NAME="Radio4" VALUE="link3text">image3text<BR> <INPUT TYPE="RADIO" NAME="Radio4" VALUE="link4text" CHECKED>image4text<BR>
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns HTML <INPUT> tags for specified rows in a Net.Data table. For example, Net.Data can generate HTML <INPUT> tags with the VALUE, SIZE, and MAXLENGTH attributes:
<INPUT TYPE="TEXT" NAME="someName" VALUE="someValue" SIZE="20" MAXLENGTH="40">
Format
@DTW_TB_INPUT_TEXT(table, prompt, namecol, valuecol, size, maxlen, rows)
Values
Table 79. DTW_TB_INPUT_TEXT Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable to display as text input tags. |
| string | prompt | IN | The column number in table or a string containing the text to display next to the input field. If prompt is null, no text is displayed. |
| string | namecol | IN | The column number in table or a string containing the input field names. |
| string | valuecol | IN | The column number in table or a string containing the default input field values, which is specified for the VALUE attribute on the INPUT tag. The default is to not generate the VALUE attribute value. |
| integer | size | IN | The number of characters of the input field, which is specified for the SIZE attribute on the INPUT tag. The default is the length of the longest default input value, or 10 if no default input exists. |
| integer | maxlen | IN | The maximum length of an input string, which is specified for the MAXLENTH attribute of the INPUT tag. The default is not to generate the MAXLENGTH attribute value. |
| integer | rows | IN | The list of rows in table from which to generate the input fields. The default is to use all rows. |
Examples
Example 1: Returns three HTML <INPUT> tags
@DTW_TB_INPUT_TEXT(Mytable,"3","3","4","35","40","1 2 3")
Results:
<P>image1text <INPUT TYPE="TEXT" NAME="image1text" VALUE="link1text" SIZE="35" MAXLENGTH="40"> <P>image2text <INPUT TYPE="TEXT" NAME="image2text" VALUE="link2text" SIZE="35" MAXLENGTH="40"> <P>image3text <INPUT TYPE="TEXT" NAME="image3text" VALUE="link3text" SIZE="35" MAXLENGTH="40">
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Inserts one or more columns beginning after the column specified in after_col.
Format
@DTW_TB_INSERTCOL(table, after_col, cols)
Values
Table 80. DTW_TB_INSERTCOL Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable into which columns are to be inserted. |
| integer | after_col | IN | The column number of the column after which the new columns are to be inserted. To insert columns at the beginning of the table, specify 0. |
| integer | cols | IN | The number of columns to insert into table. |
Examples
Example 1: Inserts five columns at the end of a table
%DEFINE myTable = %TABLE @DTW_TB_INSERTCOL(myTable, @DTW_TB_rCOLS(myTable), "5")
Example 2: Inserts a column at the beginning of a table
%DEFINE myTable = %TABLE @DTW_TB_INSERTCOL(myTable, "0", "1")
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Inserts one or more rows beginning after the row specified in after_row.
The number of columns in the table must be set before calling DTW_TB_INSERTROW(). You can set the number of columns with the DTW_TB_SETCOLS() or DTW_TB_INSERTCOL() functions, or by passing the table to a language environment to be set.
Format
@DTW_TB_INSERTROW(table, after_row, rows)
Values
Table 81. DTW_TB_INSERTROW Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable into which rows are to be inserted. |
| integer | after_row | IN | The number of the row after which new rows are inserted. To insert rows at the beginning of the table, specify 0. |
| integer | rows | IN | The number of rows to insert into table. |
Examples
Example 1: Inserts a row after row five of a table
%DEFINE myTable = %TABLE @DTW_TB_INSERTROW(myTable, "5", "1")
Example 2: Inserts three rows at the start of a table
%DEFINE myTable = %TABLE @DTW_TB_INSERTROW(myTable, "0", "3")
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns an HTML list.
Format
@DTW_TB_LIST(table, listtype, listitem, itemstyle, link_u, image_u)
Values
Table 82. 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. |
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><A HREF="http://www.mycompany.com/link2.html"> <IMG SRC="http://www.mycompany.com/images/image2.gif" ALT="">link2text</A> <LI><A HREF="http://www.mycompany.com/link3.html"> <IMG SRC="http://www.mycompany.com/images/image3.gif" ALT="">link3text</A> <LI><A HREF="http://www.mycompany.com/link4.html"> <IMG SRC="http://www.mycompany.com/images/image4.gif" ALT="">link4txt</A> </OL> </U></TT>
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Returns the maximum number of rows allowed in a table.
Format
@DTW_TB_MAXROWS(table, maxrows)
@DTW_TB_rMAXROWS(table)
Values
Table 83. DTW_TB_MAXROWS Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable for which the maximum number of rows is returned. |
| integer | maxrows | OUT | A variable that contains the maximum number of rows allowed in table. If the table was defined without a limit on the number of rows, 0 is returned. |
Examples
Example 1: Retrieves the maximum number of rows allowed in the table and returns the value
%DEFINE myTable = %TABLE %DEFINE maxrows = "" @DTW_TB_MAXROWS(myTable, maxrows) %IF (maxrows != "0") The maximum number of rows allowed is $(maxrows). %ELSE There is no limit on the number of rows allowed. %ENDIF
Example 2: Retrieves and displays the value for the maximum number of rows
%DEFINE myTable = %TABLE %IF (@DTW_TB_rMAXROWS(myTable) != "0") The maximum number of rows allowed is @DTW_TB_rMAXROWS(myTable). %ELSE There is no limit on the number of rows allowed. %ENDIF
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Returns the column number associated with a column heading. If the column heading does not exist in the table, 0 is returned.
Format
@DTW_TB_QUERYCOLNONJ(table, name, col)
@DTW_TB_rQUERYCOLNONJ(table, name)
Values
Table 84. DTW_TB_QUERYCOLNONJ Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable from which a column number is to be returned. |
| string | name | IN | The name of the column heading for which the column number is returned. If the column heading does not exist in the table, 0 is returned. |
| integer | col | OUT | A variable that contains the column number of the column whose name is specified in name. |
Examples
Example 1: Retrieves the column number for the column whose name is SERIAL_NUMBER
%DEFINE myTable = %TABLE %DEFINE col = "" @DTW_TB_QUERYCOLNONJ(myTable, "SERIAL_NUMBER", col)
Example 2: Retrves the column number for the column whose name is SERIAL_NUMBER
%DEFINE myTable = %TABLE <P>The "SERIAL_NUMBER" column is column number @DTW_TB_rQUERYCOLNONJ(myTable, "SERIAL_NUMBER")
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X |
| X | X | X | X |
Purpose
Returns the current number of rows in a table.
Format
@DTW_TB_ROWS(table, rows)
@DTW_TB_rROWS(table)
Values
Table 85. DTW_TB_ROWS Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable for which the current number of rows is returned. |
| integer | rows | OUT | A variable that contains the current number of rows in table. |
Examples
Example 1: Retrieves the current number of rows in the table and assigns the value to rows
%DEFINE myTable = %TABLE %DEFINE rows = "" ... @FillTable() ... @DTW_TB_ROWS(myTable, rows)
Example 2: Retrieves and displays the value for the current number of rows
%DEFINE myTable = %TABLE ... @FillTable() ... <P>The table value of row 1, column 1 is @DTW_TB_rROWS(myTable, "1", "1").
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns an HTML SELECT menu.
Format
@DTW_TB_SELECT(table, name, optioncol, size, multiple, rows, selectrows)
Values
Table 86. DTW_TB_SELECT Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable to display as a SELECT field. |
| string | name | IN | The value of the NAME attribute of the SELECT field. |
| integer | optioncol | IN | The column number in table with values to use in the OPTION tags of the SELECT field. The default is to use the first column. |
| integer | size | IN | The number of rows in table to use for OPTION tags in the SELECT field. The default is to use all the rows. |
| string | multiple | IN | Specifies whether multiple selections are allowed. The default is N, which does not allow multiple selections. |
| string | selectedrows | IN | The row numbers from table to use in the SELECT field. The default is to use all the rows. |
| string | rows | IN | The list of rows from table whose OPTION tags are checked. To specify more than one row, you must have the multiple parameter set to Y. The default is to select the first item. |
Examples
Generates an HTML SELECT menu with multiple selections
@DTW_TB_SELECT(Mytable,"URL6","3","","y","1 2 4","1 4")
Results:
<SELECT NAME="URL6" SIZE="3" MULTIPLE> <OPTION SELECTED>image1text <OPTION>image2text <OPTION SELECTED>image4text </SELECT>
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Sets the number of columns in the table. Specify the column headings with the DTW_TB_SETN() function. You can only use the DTW_TB_SETCOLS() function once for a table. Afterwards, use the DTW_TB_DELETECOL() or DTW_TB_INSERTCOL() functions to change the number of columns in the table.
Format
@DTW_TB_SETCOLS(table, cols)
Values
Table 87. DTW_TB_SETCOLS Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable for which the number of columns is set. |
| integer | cols | IN | The initial number of columns to allocate in table. |
Examples
Example 1: Allocates three columns for the table and assigns the names to the columns
%DEFINE myTable = %TABLE @DTW_TB_SETCOLS(myTable, "3") @DTW_TB_SETN(myTable, "Name", "1") @DTW_TB_SETN(myTable, "Address", "2") @DTW_TB_SETN(myTable, "Phone", "3")
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Assigns a name to a column heading. To delete a column heading, assign the column heading value to NULL.
The number of columns in the table must be set before calling DTW_TB_SETN(). You can set the number of columns with the DTW_TB_SETCOLS() or DTW_TB_INSERTCOL() functions, or by passing the table to a language environment to be set.
Format
@DTW_TB_SETN(table, name, col)
Values
Table 88. DTW_TB_SETN Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable in which a column name will be set. |
| string | name | IN | A character string that is assigned to the column heading of the column specified in col. |
| integer | col | IN | The column number of the column whose heading is being set. |
Examples
Example 1: Assigns a name to column headings 1 through 3
%DEFINE myTable = %TABLE @DTW_TB_SETCOLS(myTable, "3") @DTW_TB_SETN(myTable, "Name", "1") @DTW_TB_SETN(myTable, "Address", "2") @DTW_TB_SETN(myTable, "Phone", "3")
Example 2: Delete the column heading for column 2. This is done by passing a variable on the function call which has not been defined. By default, this variable will have a value of NULL
%DEFINE myTable = %TABLE @DTW_TB_SETN(myTable, nullVar, "2")
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
|
|
|
|
| X |
|
|
|
Purpose
Assigns a value in a table. To delete a table value, assign the value to NULL.
The number of columns in the table must be set before calling DTW_TB_SETV(). You can set the number of columns with the DTW_TB_SETCOLS() or DTW_TB_INSERTCOL() functions, or by passing the table to a language environment to be set.
Format
@DTW_TB_SETV(table, value, row, col)
Values
Table 89. DTW_TB_SETV Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | The macro table variable in which a table value will be set. |
| string | value | IN | A character string that is assigned to the table value of the row and column specified in row and col. |
| integer | row | IN | The row number of the value to be set. |
| integer | col | IN | The column number of the value to be set. |
Examples
Example 1: Assigns a value to row 3 column 3
%DEFINE myTable = %TABLE @DTW_TB_SETV(myTable, "value3.3", "3", "3")
Example 2: Delete the table value at row 4, column 2. This is done by passing a variable on the function call which has not been defined. By default, this variable will have a value of NULL.
%DEFINE myTable = %TABLE @DTW_TB_SETV(myTable, nullVar, "4", "2")
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns an HTML table from a macro table variable.
Format
@DTW_TB_TABLE(table, options, collist, cellstyle, link_u, image_u, url_text, url_style)
Values
Table 90. DTW_TB_TABLE Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | A macro table variable to display as an HTML table. |
| string | options | IN | The table attributes inside the TABLE tag. The default is to use
no attributes. Valid values include:
|
| string | collist | IN | The column numbers in table to use in the HTML table. The default is to use all the columns. |
| string | cellstyle | IN | A list of HTML style elements, such as B and I, to go around text in each TD tag. The default is not to use style tags. |
| integer | link_u | IN | The column number in table containing URLs used to create HTML links. You must specify the column in collist also. The default is not to generate HTML links. |
| integer | image_u | IN | The column number in table containing URLs used to create inline images. You must specify the column in collist also. The default is not to generate image tags. |
| integer | url_text | IN | The column number in table containing text to display for HTML links or inline images. The default is to use the URL itself. |
| string | url_style | IN | A list of HTML style elements for the text specified in url_text. The default is not to generate style tags. |
Examples
Example 1: Generates HTML tags for a table with a border and using B (bold) and I (italics) tags
@DTW_TB_TABLE(Mytable,"BORDER","4 2 1","i","2","1","4","b")
Results:
<TABLE BORDER> <TR> <TH>TITLE <TH>LINKURL <TH>IMAGEURL <TR> <TD><i>link1text</i> <TD><A HREF="http://www.mycompany.com/link1.html"><b>link1text</b></A> <TD><IMG SRC="http://www.mycompany.com/images/image1.gif" ALT=""><b>link1text</b> <TR> <TD><i>link2text</i> <TD><A HREF="http://www.mycompany.com/link2.html"><b>link2text</b></A> <TD><IMG SRC="http://www.mycompany.com/images/image2.gif" ALT=""><b>link2text</b> <TR> <TD><i>link3text</i> <TD><A HREF="http://www.mycompany.com/link3.html"><b>link3text</b></A> <TD><IMG SRC="http://www.mycompany.com/images/image3.gif" ALT=""><b>link3text</b> </TABLE>
| AIX | HP-UX | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
| X | X | X | X | X | X | X | X |
Purpose
Returns HTML TEXTAREA tags from a macro table variable.
Format
@DTW_TB_TEXTAREA(table, name, numrows, numcols, valuecol, rows)
Values
Table 91. DTW_TB_TEXTAREA Parameters
| Data Type | Parameter | Use | Description |
|---|---|---|---|
| table | table | IN | A macro table variable to show as a TEXTAREA tag. |
| string | name | IN | The name of the text area. |
| integer | numrows | IN | The height of the text area, specified in rows. The default is the number of rows in table. |
| integer | numcols | IN | The width of the text area, specified in columns. The default is the length of the longest row in table. |
| integer | valuecol | IN | The column number in table whose values are shown in the text area. The default is the first column. |
| string | rows | IN | A list of rows in table used to generate the TEXTAREA tag. The default is to use all rows. |
Examples
Example 1: Generates HTML TEXTAREA tags and specifies which rows to include
@DTW_TB_TEXTAREA(Mytable,"textarea5","3","70","4","1 3 4")
Results:
<TEXTAREA NAME="textarea5" ROWS="3" COLS="70"> link1text link3text link4text <TEXTAREA>