Previous Topic: Generating Reports ProcedurallyNext Topic: Creating Page Breaks


Listing All Rows

You can write the contents of one or more columns from a table to the RUNLIST file by specifying the individual column names with the LIST command. For example, the following code writes a record on the RUNLIST file for each row accessed. Each record contains the contents of the two columns from the CUSTOMER table, CUSTID and NAME:

FOR EACH CUSTOMER
    LIST CUSTOMER.CUSTID CUSTOMER.NAME
ENDFOR

The report does not have any headings or footings. There is no control over pagination. Since the RUNLIST file is shared by all programs in an application run unit, all reports generated using RUNLIST are contained in the file with any termination or error messages produced using the LIST statement.