SCAN permits you to:
- Add records
to new or existing FOCUS or XFOCUS databases.
- Change field
values in FOCUS databases. With SCAN, you can change the values in
KEY fields (not possible with MODIFY requests).
- Delete records
from FOCUS databases.
- Search through
FOCUS databases to locate instances of specified character strings or
values.
- Display complete
record contents showing all field values, or subsets of the fields in
FOCUS databases.
- Move (relink)
record segments and descendant segments from one parent record to
another in FOCUS databases with parent-descendant structures.
In a typical SCAN session you identify a database and locate
specific logical records of interest. Your knowledge of the database's
structure and contents allows you to navigate from field to field.
Within the database you can add or delete instances of data at the segment
level or change data values at the field level.
Note: On databases protected with DBA passwords, SCAN
is only available to those who have the proper password.
As you work in a SCAN session, your changes are accumulated in
a revised version of your original database. When you decide to
terminate your session, you can either save the changed version
of the database and overwrite the original version with it, or keep
the original version as it was when you started (if you have inadvertently
changed the database).
We recommend that you copy your databases before using SCAN as
an additional safety precaution; SCAN is a powerful tool for manipulating
data, but keeps no log of the change transactions. Using the FOCUS
Absolute File Integrity feature (SET SHADOW=ON) protects you against
loss of data due to system crashes. (The SET SHADOW command is only
effective if it has been issued prior to database creation. Consult
the Describing Data manual for information about the
Absolute File Integrity feature. See the Developing Applications manual
for more information about SET parameters.)
Note: Absolute File Integrity and shadow paging are not
supported for XFOCUS data sources.
xSCAN vs. MODIFY, MAINTAIN, HLI, and FSCAN
FOCUS includes five facilities for maintaining the data
in FOCUS databases. You should be aware of their differences:
- The SCAN facility
is useful for examining the data in FOCUS databases to review or
physically add, change, or delete data fields. With SCAN, an experienced
user can quickly adjust database contents to correct errors or update
fields. To use it effectively, however, you must know the database's
contents and structure.
Caution: Because SCAN works directly
on the data, there is the potential for corrupting data if you are
unsure of the nature of your database. For example, if a SCAN operation
such as REPLACE is issued against a database field such as SALES, without
adequate selection criteria, every legitimate SALES field in the
database could be overwritten by the replacement value, and all
field values would have to be reentered.
- MODIFY (see Modifying Data Sources With MODIFY) is a transaction processing environment
that is used for maintaining FOCUS databases. MODIFY requests can
be developed with elaborate match logic and data validation, as
well as transaction logging. Such procedures, when fully tested,
can be run by clerical personnel with no threat to database security.
- MAINTAIN, Information
Builders' next generation data maintenance language, surpasses MODIFY,
enabling you to write to FOCUS and non-FOCUS databases while providing
support for record-at-a-time and set-based processing. MAINTAIN
includes a new graphical user interface (the Winform Painter), and
greatly enhances facilities for defining FOCUS transaction handling
and cooperative processing operations. For more information about
MAINTAIN, see Introduction to Maintain.
- HLI (Host Language
Interface) is an optional interface. It allows you to read and edit FOCUS
databases from programs written in other programming languages (FORTRAN and
C). HLI is similar to SCAN in function. HLI is described in the Host
Language Interface manual.
- The FSCAN facility
(see Directly Editing FOCUS Databases With FSCAN) is similar to the SCAN
facility: You can view, add, change, or delete data in your FOCUS
databases. The FSCAN facility provides full-screen capabilities
such as a prefix area and a command line. It also provides confirmation
screens for DELETE and QUIT operations. Unlike SCAN, the FSCAN facility
displays parent instances that lack descendant instances (short
path records) and verifies acceptable test values defined with ACCEPT
parameters. MARK and MOVE subcommands are not supported.