Features for Application Developers

In this section:

FOCUS provides a complete application development environment. In addition to the reporting tools, the following features support the development of complete applications:

Data Source Security

Access to data in FOCUS data sources and external files can be restricted through FOCUS facilities that permit Database Administrators to select any of the following levels of protection for all or part of each data source:

These limits can be varied for individual users, and each user can be given access to entirely different fields or even particular values in fields.

Access rights to data sources are governed through the contents of decision tables associated with the data sources' Master Files.

Dialogue Manager

You can enter and execute FOCUS requests at the terminal, or as text files in an editor for subsequent use whenever you execute the file.

These named, executable requests are called FOCEXECs or stored procedures. They can be created as stand-alone requests or as request procedures that include variable substitution and various interactive prompting sequences. This is the procedural area of FOCUS, and these procedures are the FOCUS equivalent of macros or command lists (CLISTs or EXECs).

The tools for building these procedures are a series of Dialogue Manager control statements or keywords that perform actions such as:

The Developing Applications manual describes the Dialogue Manager control facilities. These include facilities for incorporating prompting dialogues in procedures, and including variable fields that are assigned values at run time. These values can be supplied from a variety of sources (typed on the command line, as responses to prompts, through full screen entry forms, in SET statements from external files, or as default values). Therefore, you have a variety of ways to control your processing flow during execution.

Interactive Menus and Windows: Window Painter

You can create a series of menus and windows using Window Painter, and then display those menus and windows on an application screen using the Dialogue Manager -WINDOW statement. When displayed, the menus and windows can collect data by prompting a user to select or enter a value, or press a PF key.

Window Painter enables you to design the menus and windows on the screen, specifying the information offered for selection, prompting, and display. These specifications can include variables that are resolved at execution time. This enables earlier parts of the application to determine the menu selection and information display of later menus and windows.

The Window facility, including Window Painter and the -WINDOW statement, is covered in the Developing Applications manual.

Data Source Management: Maintain and MODIFY

To manage data, you may use the graphical Maintain facility or the MODIFY facility.

Maintain is a graphical toolset for building modular data maintenance applications to perform event-driven, set-based processing. Its sophisticated Winform Painter enables you to simply point, click, and type to define forms. You can also include check boxes and buttons to trigger procedures, and display and edit several sets of data simultaneously, moving through each set using automatically provided scroll bars. The Painter generates these forms (Winforms) automatically from your specifications, dramatically reducing the effort required to build an application.

The Maintain language and tools are covered separately in the Maintaining Databases manual.

MODIFY invokes the data management environment, which provides complete facilities for the following data source maintenance activities:

The Maintaining Databases manual describes how to incorporate these facilities into MODIFY requests that you can execute to update a FOCUS data source. Such requests can range from simple (containing a few instructions) to extensive (containing multiple full screen entry forms and conditional branching logic, set with values entered at run time). The three following interrelated FOCUS facilities are specifically designed to assist you in preparing data source maintenance procedures:

You can use the JOIN command in the context of MODIFY requests to gain access to data from related data sources, or you can use the COMBINE command in MODIFY requests to update multiple data sources simultaneously.

FOCUS offers two operating environments for data source maintenance:

Full Screen Data Entry Forms: FIDEL

Data source maintenance and Dialogue Manager procedures require full screen data entry forms for entering information needed to update data sources. The facility for describing screen forms, FIDEL, is discussed in the Maintaining Databases manual. You invoke FIDEL by including the keywords -CRTFORM (from Dialogue Manager) or CRTFORM (from MODIFY).

You can describe screen forms with free-form text layout, using spot markers to position the text on the screen. You design windows on the screen, or forms longer than the screen size (up to 1280 lines long), using scrolling features activated with PF keys. Displayed fields can be protected, or left unprotected for updating. FIDEL provides a variety of dynamic attributes for highlighting fields you wish to emphasize, such as blinking fields, background lighting, and colors.

A Screen Painter, entered through TED, generates the FIDEL code and enables you to see your developing screen form and immediately review the effects of your design decisions. This is particularly useful when developing complex screens with many attributes and labels. (The Screen Painter is only available with TED.)

Data Source Editor: FSCAN

The FSCAN facility, described in the Maintaining Databases manual, is a data source maintenance utility that enables you to edit FOCUS data sources directly on the screen. FSCAN displays data sources as if they were flat files on a full screen system editor. FSCAN commands allow you to scroll through records, navigate the data source, locate specific field values, and delete records. You can also add new records by typing them in and change field values by typing over them. In addition, FSCAN has these features:

FOCUS also provides a FOCUS data source line editor called SCAN. SCAN is described in the Maintaining Databases manual.

FSCAN and SCAN are best suited for making minor changes and corrections to FOCUS data sources. For more extensive maintenance, use the MODIFY or Maintain facilities.

Resource Governor: SmartMode

The SmartMode option is a FOCUS report monitor that predicts resource usage of a report and prevents users from running expensive queries. The System or Database Administrator sets the maximum resource usage permitted for a report.

Using query statistics it has recorded, SmartMode analyzes reports requested with the TABLE, TABLEF, MATCH, GRAPH, and FML (formerly EMR) commands. When SmartMode is governing, it estimates the I/O and CPU resources a request would consume. If the resource usage is greater than the resource usage threshold the administrator has defined, SmartMode cancels the request.

SmartMode provides an interactive administrative facility to control all aspects of its operation. The administrator may establish a different threshold for each shift and mode of execution, and may adjust cost factors to fine-tune the SmartMode protection of the most important resources of the site. Reports and graphs on resource usage patterns show how data sources are used, who uses them, and how resource usage is distributed.

For complete documentation and installation instructions, see the SmartMode for FOCUS Installation and Operations Manual.


Information Builders