The following example demonstrates using LIST to generate information on a preprinted form.
Assume that a panel named CUSTPNL was created that corresponds to the form. The panel definition input parameters do not specify error handling, value limitations, and so on, since there is no user interaction. The output parameters specify the necessary edit patterns. All fields are protected and, when testing, all fields display.
The following code generates a report for all customers in Texas.
<<CUST‑RPT>> PROCEDURE
FOR FIRST CUSTOMER
WHERE CUSTOMER.STATE EQ 'TX'
MOVE CUSTOMER TO CUST‑INQ BY NAME
LIST PANEL CUST‑INQ
LIST NEWPAGE
WHEN NONE
LIST 'THERE ARE NO CUSTOMERS IN TEXAS ON FILE'
ENDFOR
ENDPROC
While testing the program, you can view the output online to evaluate the report content quickly. You can print the output to verify the layout.
When the program is ready to be released to production, you can remove the headings and literals that simulate the preprinted form from the panel. If you want to maintain these literals for documentation or future updates, you can retain them by designating them as nonprint by specifying a field attribute of I (for invisible) on the Extended Field Definition fill‑in of the Panel Definition Facility.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|