IBM Books

Reference

DTW_TB_INSERTCOL


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 144. 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 145. 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")


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]