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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Adds one or more rows to the end of a Net.Data table.
Format
@DTW_TB_APPENDROW(table, rows)
Parameters
Table 119. DTW_TB_APPENDROW Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | INOUT | The macro table variable for which rows are appended. |
integer | rows | IN | The number of rows to append to table. |
Return Codes
Table 120. DTW_TB_APPENDROW 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
1010 | Data was written to the table until it was full, and the remainder of the data was discarded. |
Usage Notes
Examples
Example 1: Appends ten rows to the table
%DEFINE myTable = %TABLE @DTW_TB_APPENDROW(myTable, "10")
AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Returns the number of columns in a Net.Data table.
Format
@DTW_TB_COLS(table, cols)
@DTW_TB_rCOLS(table)
Parameters
Table 121. 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. |
Return Codes
Table 122. DTW_TB_COLS 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
1006 | A literal string was passed on a function call for a parameter which was required to be an output parameter. |
Examples
Example 1: Retrieves the number of columns and assigns the value to cols
%DEFINE myTable = %TABLE %DEFINE cols = "" ... @FillTable(myTable) ... @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(myTable) ... <P>My table contains @DTW_TB_rCOLS(myTable) columns.
AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Deletes one or more columns from a Net.data table.
Format
@DTW_TB_DELETECOL(table, after_col, cols)
Parameters
Table 123. DTW_TB_DELETECOL Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | INOUT | The macro table variable from which columns are to be deleted. |
integer | after_col | IN | The number of the column after which subsequent columns are to be delted. To delete the first column, specify 0. |
integer | cols | IN | The number of columns to delete from table. |
Return Codes
Table 124. DTW_TB_DELETECOL 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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: Deletes the third and fourth columns from the table
%DEFINE myTable = %TABLE @DTW_TB_DELETECOL(myTable, "3", "2")
Example 2: Deletes the first column from the table
%DEFINE myTable = %TABLE @DTW_TB_DELETECOL(myTable, "0", "1")
AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Deletes one or more rows from a Net.Data table.
Format
@DTW_TB_DELETEROW(table, start_row, rows)
Parameters
Table 125. DTW_TB_DELETEROW Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | INOUT | 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. |
Return Codes
Table 126. DTW_TB_DELETEROW 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
Usage Notes
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.
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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Generates an HTML definition list from a Net.Data table.
Format
@DTW_TB_DLIST(table, term, def, termstyle, defstyle, link, link_u, image, image_u)
@DTW_TB_DLIST(table, term, def, termstyle, defstyle, link, link_u, image)
@DTW_TB_DLIST(table, term, def, termstyle, defstyle, link, link_u)
@DTW_TB_DLIST(table, term, def, termstyle, defstyle, link)
@DTW_TB_DLIST(table, term, def, termstyle, defstyle)
@DTW_TB_DLIST(table, term, def, termstyle)
@DTW_TB_DLIST(table, term, def)
@DTW_TB_DLIST(table, term)
@DTW_TB_DLIST(table)
Parameters
Table 127. 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. |
Return Codes
Table 128. DTW_TB_DLIST 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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: 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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Prints out the contents of a Net.Data table using the HTML <PRE> tag, where each row of the table is displayed on one line.
Format
@DTW_TB_DUMPH(table)
Parameters
Table 129. DTW_TB_DUMPH Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | IN | A symbol specifying the macro table variable to display. |
Return Codes
Table 130. DTW_DB_DUMPH 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
1004 | A parameter passed on a function call, required to be a Net.Data macro table variable, was of a different variable type. |
1007 | A parameter contains a value which is not valid. |
Usage Notes
If the Net.Data table is empty, an error is returned.
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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Prints out the contents of the Net.Data table using the HTML <PRE> tag, where each field of the table is on one line.
Format
@DTW_TB_DUMPV(table)
Parameters
Table 131. DTW_TB_DUMPV Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | IN | A symbol specifying the macro table variable to display. |
Return Codes
Table 132. DTW_TB_DUMPV 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
1004 | A parameter passed on a function call, required to be a Net.Data macro table variable, was of a different variable type. |
1007 | A parameter contains a value which is not valid. |
Usage Notes
If the Net.Data table is empty, an error is returned
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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Returns a column heading from a Net.Data table.
Format
@DTW_TB_GETN(table, col, name)
@DTW_TB_rGETN(table, col)
Parameters
Table 133. 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. |
Return Codes
Table 134. DTW_TB_GETN 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
1006 | A literal string was passed on a function call for a parameter which was required to be an output parameter. |
1007 | A parameter contains a value which is not valid. |
1008 | A parameter is outside of table bounds. |
Usage Notes
Before calling DTW_TB_GETN(), set the number of columns in the table. 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.
Examples
Example 1: Retrieves the column name of column 4
%DEFINE myTable = %TABLE %DEFINE name = "" ... @FillTable(myTable) ... @DTW_TB_GETN(myTable, "4", name)
Example 2: Retrieves the column name of the last column in the table
%DEFINE myTable = %TABLE ... @FillTable(myTable) ... <P>The column name of the last column is @DTW_TB_rGETN(myTable, @DTW_TB_rCOLS(myTable))
AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Returns the value at a given row and column in a Net.Data table.
Format
@DTW_TB_GETV(table, row, col, value)
@DTW_TB_rGETV(table, row, col)
Parameters
Table 135. 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. |
Return Codes
Table 136. DTW_TB_GETV 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
1006 | A literal string was passed on a function call for a parameter which was required to be an output parameter. |
1007 | A parameter contains a value which is not valid. |
1008 | A parameter is outside of table bounds. |
Usage Notes
Before calling DTW_TB_GETV(), set the number of columns in the table. 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.
Examples
Example 1: Retrieves the table value at row 6, column 3
%DEFINE myTable = %TABLE %DEFINE value = "" ... @FillTable(myTable) ... @DTW_TB_GETV(myTable, "6", "3", value)
Example 2: Retrieves the table value at row 1, column 1
%DEFINE myTable = %TABLE ... @FillTable(myTable) ... <P>The table value of row 1, column 1 is @DTW_TB_rGETV(myTable, "1", "1").
AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Replaces certain characters in the data located in a Net.Data table with their corresponding HTML character escape codes.
Format
@DTW_TB_HTMLENCODE(table, collist)
@DTW_TB_HTMLENCODE(table)
Parameters
Table 137. 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. |
Return Codes
Table 138. DTW_TB_HTMLENCODE 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
Usage Notes
The characters that are replaced are indicated in the table below.
Name | Character | Code |
---|---|---|
Ampersand | & | & |
Double quote | " | " |
Greater than | > | > |
Less than | < | < |
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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Generates one or more HTML check box input tags from a Net.Data table.
Format
@DTW_TB_INPUT_CHECKBOX(table, prompt, namecol, valuecol, rows, checkedrows)
@DTW_TB_INPUT_CHECKBOX(table, prompt, namecol, valuecol, rows)
@DTW_TB_INPUT_CHECKBOX(table, prompt, namecol, valuecol)
@DTW_TB_INPUT_CHECKBOX(table, prompt, namecol)
Parameters
Table 139. 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. |
integer | valuecol | IN | The column number in table that contains 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. |
Return Codes
Table 140. DTW_TB_INPUT_CHECKBOX 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 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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 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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Generates HTML radio button input tags from a Net.Data table.
Format
@DTW_TB_INPUT_RADIO(table, prompt, namecol, valuecol, rows, checkedrows)
@DTW_TB_INPUT_RADIO(table, prompt, namecol, valuecol, rows)
@DTW_TB_INPUT_RADIO(table, prompt, namecol, valuecol)
Parameters
Table 141. 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. |
integer | valuecol | IN | The column number in table that contains 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. |
Return Codes
Table 142. DTW_TB_INPUT_RADIO 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 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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 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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Generates HTML <INPUT> tags for specified rows in a Net.Data table.
Format
@DTW_TB_INPUT_TEXT(table, prompt, namecol, valuecol, size, maxlen, rows)
@DTW_TB_INPUT_TEXT(table, prompt, namecol, valuecol, size, maxlen)
@DTW_TB_INPUT_TEXT(table, prompt, namecol, valuecol, size)
@DTW_TB_INPUT_TEXT(table, prompt, namecol, valuecol)
@DTW_TB_INPUT_TEXT(table, prompt, namecol)
Parameters
Table 143. 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 that contains the input field names. |
integer | valuecol | IN | The column number in table that contains 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. |
Return Codes
Table 144. DTW_TB_INPUT_TEXT 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 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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: 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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Inserts one or more columns into a Net.Data table.
Format
@DTW_TB_INSERTCOL(table, after_col, cols)
Parameters
Table 145. DTW_TB_INSERTCOL Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | INOUT | 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. |
Return Codes
Table 146. DTW_TB_INSERTCOL 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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: 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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Inserts one or more rows into a Net.Data table.
Format
@DTW_TB_INSERTROW(table, after_row, rows)
Parameters
Table 147. DTW_TB_INSERTROW Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | INOUT | 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. |
Return Codes
Table 148. DTW_TB_INSERTROW 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
Usage Notes
Before calling DTW_TB_INSERTROW(), set the number of columns in the table. 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.
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 | Linux | OS/2 | OS/390 | OS/400 | SCO | 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 149. 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 150. 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 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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><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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Returns the column number associated with a column heading of a Net.Data table.
Format
@DTW_TB_QUERYCOLNONJ(table, name, col)
@DTW_TB_rQUERYCOLNONJ(table, name)
Parameters
Table 151. 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. |
Return Codes
Table 152. DTW_TB_QUERYCOLNONJ 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
1006 | A literal string was passed on a function call for a parameter which was required to be an output parameter. |
Usage Notes
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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Returns the number of rows in a Net.Data table.
Format
@DTW_TB_ROWS(table, rows)
@DTW_TB_rROWS(table)
Parameters
Table 153. 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. |
Return Codes
Table 154. DTW_TB_ROWS 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
1006 | A literal string was passed on a function call for a parameter which was required to be an output parameter. |
Examples
Example 1: Retrieves the current number of rows in the table and assigns the value to rows
%DEFINE myTable = %TABLE %DEFINE rows = "" ... @FillTable(myTable) ... @DTW_TB_ROWS(myTable, rows)
AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Generates an HTML selection list from a Net.Data table.
Format
@DTW_TB_SELECT(table, name, optioncol, size, multiple, rows, selectedrows, valuecol)
@DTW_TB_SELECT(table, name, optioncol, size, multiple, rows, selectedrows)
@DTW_TB_SELECT(table, name, optioncol, size, multiple, rows)
@DTW_TB_SELECT(table, name, optioncol, size, multiple)
@DTW_TB_SELECT(table, name, optioncol, size)
@DTW_TB_SELECT(table, name, optioncol)
@DTW_TB_SELECT(table, name)
Parameters
Table 155. 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 |
rows
| IN | The row numbers from table to use in the SELECT field. The default is to use all the rows. |
string |
selectedrows
| 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. |
string | valuecol | IN | The column number in table to use for the VALUE attribute of the OPTION tags. The default value is 1. This parameter is optional. |
Return Codes
Table 156. DTW_TB_SELECT 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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 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>
Example 2: Uses the valuecol parameter to generate an HTML SELECT menu that uses a column number from which to obtain the values.
@DTW_TB_SELECT(Mytable,"URL6","3","","y","1 2 4","1 4", "3")
Results:
<SELECT NAME="URL6" SIZE="3" MULTIPLE> <OPTION VALUE="text_string1" SELECTED>image1text <OPTION VALUE="text_string2">image2text <OPTION VALUE="text_string3" SELECTED>image3text </SELECT>
AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Sets the number of columns in a Net.Data table.
Format
@DTW_TB_SETCOLS(table, cols)
Parameters
Table 157. DTW_TB_SETCOLS Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | INOUT | The macro table variable for which the number of columns is set. |
integer | cols | IN | The initial number of columns to allocate in table. |
Return Codes
Table 158. DTW_TB_SETCOLS 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
Usage Notes
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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Assigns a name to a column heading in a Net.Data.
Format
@DTW_TB_SETN(table, name, col)
Parameters
Table 159. DTW_TB_SETN Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | INOUT | 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. |
Return Codes
Table 160. DTW_TB_SETN 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
Usage Notes
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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Assigns a value to a particular row and column in a Net.Data table.
Format
@DTW_TB_SETV(table, value, row, col)
Parameters
Table 161. DTW_TB_SETV Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | INOUT | 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. |
Return Codes
Table 162. DTW_TB_SETV 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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. |
Usage Notes
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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Generates an HTML table from a Net.Data table.
Format
@DTW_TB_TABLE(table, options, collist, cellstyle, link_u, image_u, url_text, url_style)
@DTW_TB_TABLE(table, options, collist, cellstyle, link_u, image_u, url_text)
@DTW_TB_TABLE(table, options, collist, cellstyle, link_u, image_u)
@DTW_TB_TABLE(table, options, collist, cellstyle, link_u)
@DTW_TB_TABLE(table, options, collist, cellstyle)
@DTW_TB_TABLE(table, options, collist)
@DTW_TB_TABLE(table, options)
@DTW_TB_TABLE(table)
Parameters
Table 163. 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. |
Return Codes
Table 164. DTW_TB_TABLE 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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 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 | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Generates an HTML text area from a Net.Data table.
Format
@DTW_TB_TEXTAREA(table, name, numrows, numcols, valuecol, rows)
@DTW_TB_TEXTAREA(table, name, numrows, numcols, valuecol)
@DTW_TB_TEXTAREA(table, name, numrows, numcols)
@DTW_TB_TEXTAREA(table, name, numrows)
@DTW_TB_TEXTAREA(table, name)
Parameters
Table 165. 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. |
Return Codes
Table 166. DTW_TB_TEXTAREA 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. |
1003 | The number of parameters passed on a function call either exceeded the maximum number allowed, or was less than the minimum number required by the function. |
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 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>