The proc.getNumColumns() function
Use the proc.getNumColumns()
function
to get the number of columns of the current result set.
Syntax
proc.getNumColumns();
Example
/*JavaScript*/
proc.exec('DISPLAY Q.STAFF');
proc.messageBox('The Q.STAFF table has ' + proc.getNumColumns() + ' columns');
The
example procedure displays the Q.STAFF
table and
shows the message: “The Q.STAFF table has 7 columns.”