![]() ![]() |
|
LISTGenerates a formatted report of records and fields from a specified file.
SYNTAXLIST file-specifier {record-list} {selection-criteria} {sort-criteria} {USING file-specifier} {output-specification} {format-specification} {(options}
NOTESIf an output specification clause is not provided, the system will search for default data definition records (named 1, 2 and so on) in the file dictionary and then in the file specified in the JEDIFILENAME_MD environment variable. If default data definition records cannot be found, the only the record keys will be listed. The records will not be sorted unless you specify a sort criteria clause.
EXAMPLE 1
List all the records in the SALES file and use the default data definition records (if found) to format the output.
EXAMPLE 2
List the records from the SALES file with key values of ABC, DEF or GHI. Use the default data definition records (if found) to format the output.
EXAMPLE 3
Get the previously saved list called SALES.Q4 and, using the list, report on the records in the SALES file which have a key greater than DEF. Use the default data definition records (if found) to format the output.
EXAMPLE 4
List the records in the SALES file in which the S.CODE field contains values which start with ABC or end with DEF. Use the default data definition records (if found) to format the output.
EXAMPLE 5
List the records in the SALES file in which the S.CODE field does not contain values which start with ABC or end with DEF. Output the report to the printer. Use the default data definition records (if found) to format the output.
EXAMPLE 6
Sort the SALES file by S.CODE. Output the S.CODE, P.CODE and VALUE fields. Control break on a change in S.CODE and suppress the LINE FEED before the break. Reserve the break value for use in the heading ("B"). Maintain a running total of the VALUE field and output it at each control break. Put the word "Total" on the grand-total line. Set up a heading for each page which comprises the words "Sales Code : ", the sales code (from the break), a date and a LINE FEED. Set up a footing which contains the text "Page " and a page number, centered on the line. Produce the report on the currently assigned printer. jQL |