CHAPTER 5:  Reviewing Data

PURPOSE:  This chapter presents procedures to view the data from a Data Set (DS) on the screen and to form reports.

Browsing Through Data

Select EXAMINE from the Master menu to display the Examine menu (Figure 33).  A DBL must be declared to see this menu.  Express will prompt for a library name if one is not already declared.

Figure 33  Examine Menu

The Examine menu has five options: 

BROWSE

View data on screen

REPORT

Form reports

SHOW DBL

Display contents of DBL and its objects

HELP

Display help information

RETURN

Go back to the Master menu

To view data on the screen, select BROWSE (default option already highlighted) and press <RETURN>. Express will prompt for a DS name.  For the example, enter MYLIST and press <RETURN>.

Printing A File

After the DS has been identified, Express asks if output is to be sent to a file.  The default is YES.  If Yes is accepted, Express will prompt for a report file name.  After a name is entered, Express generates an ASCII report file.  When the processing is done, a message is displayed which says the report is ready to be printed. Data will not be presented on the screen if you choose to output a report to a file.

The report file is given a .REP extension and stored in a system file outside of the DBL.  To view the report, exit Express, then use the following ACCENT R command:

LIST SF file-name. REP

To print the report, QUIT out of ACCENT R and use a system command to send the report to a printer.

Displaying A Report On The Screen

For the example, select NO for the 'output to file' prompt and press <RETURN>.  A listing of the data (Figure 34) is displayed with column headings.

Figure 34  Browse Report

The Browse window has five menu options:

UP-SCROLL

View data off screen at the bottom

DOWN-SCROLL

View data off screen at the top

LEFT-SCROLL

View fields hidden off screen to the right

RESET

Re-display the left-most fields

RETURN

Go back to the Examine menu

Left Scrolling

When viewing a Data Set (DS) with a lot of fields, many can be hidden off-screen to the right.  Select LEFT-SCROLL and press <RETURN> to view the hidden data.

A bar will appear below the fields and the cursor will blink at the first character of the first field.  There are preset tab positions at the first character of each field.  When you press the right or left arrow key, the cursor will jump to the next field.  Position the cursor to the left-most field you want to scroll over and press <RETURN>.  Express will left scroll fields off-screen to the cursor point.  Fields to the left of the cursor point will not be affected by the scroll.

To terminate the scroll, you must scroll all the way until the last hidden field has been displayed.  Express will automatically terminate the scroll function at that point.  Control returns to the menu where UP-SCROLL become highlighted as the default option.

NOTE: Express notifies you if there are fields off screen to the right with the indicator (more ->) to the right of the RETURN option.

You may press <CTRL> R to refresh the screen when necessary.

After viewing the data, select RETURN and press <RETURN> to go back to the Examine menu.

Forming Reports

To form a report, select REPORT from the Examine menu.  Express will prompt for a DS name.  For the example, enter MYLIST and press <RETURN>.  A Report Commands window (Figure 35) will be displayed.

Figure 35  Report Commands Window

The Report Commands window has ten options:

SELECT

choose fields to include in the report

SORT

select field(s) to sort on

BREAK

indicate field(s) for control breaks

CRITERIA

specify conditions for including records

SUB TOTAL

total for control breaks

FINAL

total for report

OUTPUT

name output report file

RUN

generates report file (run outside ACCENT R)

HELP

display help information

RETURN

go back to the Examine menu

NOTE: Fields must be SELECTed before any other command can be used.  Control BREAKs must be established before SUB TOTALs can be used.

SELECT is the default option (already highlighted).  Press <RETURN> to select fields for the report.  The field selection window (Figure 36) is invoked.

Figure 36  Field Selection Window

Select fields by highlighting with the cursor and pressing <RETURN>.  Selected fields are marked with an arrow on the left side.  Re-selecting marked fields will nullify the selection.  Press <LINE FEED> to see the next page of a long listing.  Press <BACK SPACE> to see a prior page.  Press <CTRL> W to see the window menu which has six options.

SELECT

access field list for selection

REVIEW

display list of selected fields

CANCEL

clear selections

HELP

display help information

RETURN

go back to the Examine menu

QUIT

exit Express

For the example, select all the fields.  Press <CTRL> Z to return to the Report Commands window.

Select SORT and press <RETURN> to put the report in a certain order.  Express allows multiple level sorts (L1, L2, L3, etc.).  The Sort window is shown in Figure 37.

Figure 37  Sort Window

Each field is presented in succession with three options:

NO (default)

ignore field for sorting

YES

use field for sorting

END

return to the Report Commands window

With each NO response (the default), Express continues to cycle through the field names.  With each YES response, the sort level is raised and the next field is presented.  END must be selected to exit this window. For the example, select NO and press <RETURN> for each field until NAME is presented, then select YES and press <RETURN> for a Level 1 (L1) sort.  Select END for the next field and press <RETURN> to exit.

Select BREAK to establish control breaks.  This option must be used in junction with SUB TOTALS.  When the specified field's value changes, Express computes a subtotal.  The Control Break window looks and works exactly like the Sort window.  This option is not used for the example.

Select CRITERIA to specify conditions for including records in the report.  The Selection Criteria window (Figure 38) that is invoked looks like previous criteria windows.

Figure 38  Criteria Field Prompt

Express continues to cycle through the field names with either a YES or NO response.  END must be selected to exit this window.

A YES response causes a prompt for the criteria specification to be displayed (Figure 39) before presenting the next field.  Criteria options are listed in columns on either side of the criteria specification prompt.

Figure 39  Criteria Specification Prompt

For the example, select NO and press <RETURN> for each field until SALES is presented, then select YES and press <RETURN>.  At the criteria prompt, enter > 2000 and press <RETURN>.  Select END for the next field and press <RETURN> to exit.

Use SUB TOTAL to select numeric fields for sub-totaling.  This option must be used in junction with control BREAKs.  The Sub Total window presents each numerical field once with Yes-No-End options.  Once all the numerical fields have been presented, Express returns to the Report Commands window automatically.  This option is not used in the example.

Select FINAL to get a report total for numerical fields.  If subtotaling has been used, this option is not available as totaling for the report is already assumed.  Express will display a message notifying you of this situation when FINAL is selected.

FINAL will cycle through the numerical fields no matter what response is given.  NO is the default.  You must respond with END to exit the Final window (Figure 40).

Figure 40  Final Total Selection Window

For the example, select NO and press <RETURN> for EMP.  When SALES is presented, select YES and press <RETURN>.  Select END for the next field and press <RETURN> to exit.

Select OUTPUT to specify a file name for the report.  Express prompts for the report file name (Figure 41). For the example, enter COREP and press <RETURN>.  Express returns to the Report Command window.

Figure 41  Report File Prompt

Select RUN to execute the report.  If a report file name has been specified in the OUTPUT option, Express generates the report file.  Express displays a processing message when report file is ready to be printed.

NOTE: To print the report, follow the same steps mentioned in the 'Printing A File' subsection earlier in this chapter.

Figure 42 illustrates that a printed report looks like the same as a report on the screen.

Figure 42  Printed Report

If a report file was not specified, RUN will display the report on the screen with a browse window.

Once a report file has been generated or after exiting the browse window, Express returns to the Report Commands window.  The previous report selections are cleared to enable forming a new report.

Select RETURN and press <RETURN> to go back to the Examine menu.  Repeat this step to return to the Master menu.