AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | PTX | SUN | Win NT |
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 152. 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 153. 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 | 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. |
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")</p>