In an online program that does not print a large number of rows, it is reasonable to allow the database to access the rows based on the WHERE clause criteria and the ORDERED BY clause.
FOR EACH CUSTOMER
WHERE STATE EQ 'TX' AND CITY EQ 'DALLAS'
ORDERED BY CUSTID
PRODUCE CUSTRPT
ENDFOR
However, when you are going to print a large amount of data, you should run the program in batch. When the program executes in batch, the database can still control the sequence in which the rows are retrieved. In addition, RDF can sort the detail lines. RDF uses the system sort utility. You can specify any combination of up to nine fields. This is especially useful if you must sort on non‑key fields.
In a CICS environment, CA CICSORT lets CA Ideal programs producing sorted reports run online.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|