AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | PTX | 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 136. 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 137. 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 | 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. |
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").</p>