Obtains the number of row which is being processed to a foreach.

# 1 sqlca.row

<sqlca.row />
Example
Copy
<xsql-script name='sql_type'>
<body>
<foreach>
<select prefix='m_'>
<columns>empcode</columns>
<from table='ccompany' />
</select>
<do>
<println>Number of row which is being processed : <sqlca.row />  (ccompany.code = <m_empcode />)</println>
</do>
</foreach>
</body>
</xsql-script>

Output:

Copy
Number of row which is being processed : 0  (ccompany.code = 0)
Number of row which is being processed : 1  (ccompany.code = ACME)
Number of row which is being processed : 2  (ccompany.code = IASA)