Pathmaker Programming Guide

Defining Data for a Pathmaker Project
Preparing for Pathmaker Application Development
2–28 067868 Tandem Computers Incorporated
Creating Constraints
You can create constraints for a table definition to control the values allowed for a
column. Creating simple constraints on a column allows the Pathmaker product to
generate MUST BE checks in the requester. Note that the Pathmaker product cannot
generate MUST BE checks for every type of constraint that you can create in SQL.
Table 2-3 lists some examples of SQL expressions that can be used in a constraint
statement and indicates whether Pathmaker can translate the expression into a MUST
BE check.
Table 2-3. SQL Constraints and Pathmaker MUST BE Checks
Expression Translated Into MUST BE?
QTY_ORDERED BETWEEN 400 AND 500
STATE IN (“CALIFORNIA”, “ARIZONA”)
QTY_ORDERED < 500
Yes
Yes
Yes
COLUMN1 > COLUMN2
CUSTNAME LIKE “MART%”
No
No
NonStop SQL Data Definition Features Related to Pathmaker Programming
The language used to define data for NonStop SQL has three features that are related
to Pathmaker programming. Two NonStop SQL DDL clauses, HEADING and
UPSHIFT, can be used in any NonStop SQL data definition statement that adds or
alters columns, such as CREATE TABLE, CREATE VIEW, or ALTER TABLE. The
HELP TEXT statement can be used to specify or delete help text for a NonStop SQL
object. Table 2-4 briefly describes these three NonStop SQL DDL features.
Table 2-4. Related NonStop SQL Data Definition Language Features
Feature Description
HEADING clause Allows you to specify default prompt text for a data field. If you do not use
HEADING or if you use the NO HEADING clause, the default prompt text
is the column name.
UPSHIFT clause Causes the application to change all lowercase alphabetic characters into
uppercase alphabetic characters before they are entered into the
database. UPSHIFT helps ensure the consistency of your database.
You should use UPSHIFT on any character field that acts as a primary or
foreign key.
HELP TEXT statement Allows you to specify help text for a column, constraint, index, table, or
view.
You can alter heading text and help text or enter text for the first time by using the
Display Detail screen in Pathmaker. The Display Detail screen also allows you to add
information that you cannot supply from either Enscribe or NonStop SQL DDL, such
as the screen field name and video attributes for the data fields.