Selecting Items

To generate a report containing a subset of the CUSTOMERS (or any other) file, use a selection expression to define criteria against which all items in the file will be compared. The report then includes only those items that meet the selection criteria.

For example, to select only those customers who live in the state of Indiana, add the following selection expression to the preceding INFO/ACCESS query:

WITH STATE = "IN"

This expression compares the data in the attribute STATE to the literal IN.

The INFO/ACCESS query now looks like this:

>LIST CUSTOMERS WITH STATE = "IN" LAST-NAME STREET CITY STATE ID-SUPP

 

 

 

 

PAGE   1

 

10:44:25  DD MMM YYYY

 

 

 

 

Last Name.

Street............

City.......

State

JENKINS

1222 MAIN STREET

INDIANAPOLIS

IN

BUCKLER

26 STONE AVENUE

LINCOLN

IN

MASON

226 ROCK ROAD

LINCOLN

IN

ASH

912A E. OAK STREET

INDIANAPOLIS

IN

 

 

 

 

4 ITEMS LISTED.

 

 

 

 

 

 

>

 

 

 

The following examples illustrate how INFO/ACCESS queries closely follow the patterns of natural-language sentences:

LIST CUSTOMERS WITH LAST-NAME < "MARTIN"

LIST EMPLOYEES WITH SALARY > "25,000"

LIST CUSTOMERS WITH STREET = "56 SPRINGFIELD STREET"

LIST STUDENTS WITH FIRST-NAME LIKE "MARYLYNN"

See Also

An Overview of INFO/ACCESS

Defining INFO/ACCESS

Sorting Items

Formatting a Report

Sending a Report to the Printer

Summary

An Overview of INFO/ACCESS Commands

INFO/ACCESS Keywords