Closes a row set.
CLOSE-RS NAME=row_set_name_var|_lit|_col
NAME
Name of the row set.
CLOSE-RS can reside in any section except BEGIN-SETUP, BEGIN-SQL, and BEGIN-DOCUMENT. The row set specified by row_set_name must be active, or an exception is thrown.
The row set file is an XML file. You can define whether to create the XML file in a BI Publisher (BIP) format or an SQR format in the FormatForRowsetXML entry in the [Default-Settings] section of SQR.INI.
Begin-Report
Open-RS Name='customer' FileName='customer.xml'
Column = ('cust_num', 'integer')
Column = ('name', 'string')
Column = ('addr1', 'string')
Column = ('addr2', 'string')
Column = ('city', 'string')
Column = ('state', 'string')
Column = ('zip', 'string')
Column = ('phone', 'string')
Column = ('tot', 'integer')
Begin-Select
cust_num
name
addr1
addr2
city
state
zip
phone
tot
Write-RS Name='customer'
Value = ('cust_num', &cust_num)
Value = ('name', &name)
Value = ('addr1', &addr1)
Value = ('addr2', &addr2)
Value = ('city', &city)
Value = ('state', &state)
Value = ('zip', &zip)
Value = ('phone', &phone)
Value = ('tot', &tot)
from customers
order by cust_num
End-Select
Close-RS Name='customer'
End-Report