Previous | Contents | Index |
The Guided Query Language includes a natural language interface. This interface acts to translate everyday words and phrases into computer terminology. The user is freed from having to learn computer jargon.
To facilitate this, GQL includes a vocabulary file. This vocabulary
file contains a list of valid phrases and throwaway words (such as
"the" and "a"). The name of the vocabulary file is:
TTI_RUN:GUIDE_VOCAB.TAB
The vocabulary file can be modified in order to add new phrases or to ignore certain words. For example, if your users are comfortable with the word ROLLUP instead of SUMMARY, you can modify the vocabulary file to indicate that ROLLUP = SUMMARY. In other words, your vocabulary file can be customized for a particular use (e.g., department) at any time.
The vocabulary file can be modified in order to add new phrases or to ignore certain words.
You must have sufficient privileges in order to modify the vocabulary file. |
Some examples of synonyms are listed below:
Example 7-1 Example of Some Synonyms |
---|
Word Synonym Contexts __________________________________________________________________ open, $open, all ouvrez, $open, all sort, $sort, all arrange, $sort, all list, $list, all print, $list all omit, $exclude, all skip, $exclude, all |
In open (the file), "the" and "file" are examples of throwaway words.
A summary of The Guided Query Commands can be found in Appendix A, The Guided Query Language Summary of Commands. Section A.4, Adding Synonyms provides more information on the vocabulary file.
GQL comes packaged with a built-in vocabulary.
A.1 Commands Affecting Output
APPEND filename.ext
BREAK [ON] expression [, ... ] [DESCRIPTION 'text' [POSITION nn]] [PAGE] [NOTOTALS]
CONDITION varname IS expression
EXCLUDE expression [, expression[, ...]]
EXCLUDE FOUND structure_name
IF THEN if expression then ..... else ..... endif
INCLUDE expression [, expression [, ...]]
INCLUDE PARTIAL expression [, expression [, ...]]
INCLUDE FOUND structure_name
INCLUDE keyfield = value1 TO value2
KEY keyfield = expression
LET varname = expression
MAKE REPORT
MAKE EXPORT
MAKE EXPORT with HEADINGS
MAKE EXPORT STRUCTURE
MAKE EXPORT WORDPERFECT
NEW
OLD GQL_filename
OPEN structure_synonym_in_GUIDE_NAMES
OPEN structure_name
OPEN structure_synonym NAME filename
OUTPUT output_filename
PRINT expression [, ... ]
PRINT [GROUP break_level]
PRINT [HEADING "heading_expression1" ["hdg_expr2"
["hdg_expr3"]]]
PRINT [MASK "edit mask"]
PRINT [LENGTH field_length]
PRINT [POS[ITION] [column_position | +preceding_spaces
| =column_nbr]]
PRINT [[WITH] TOTALS [= totals_expression]]
PROGRAM program_filename [UNIQUE]
RELATE str_name(field) TO lookup_str_name(field)
SAVE GQL_filename
SET COMMANDS [SHORT | LONG]
SET CUTOFF max_records
SET EDITOR [INTERNAL | EXTERNAL]
SET GRANDTOTAL "text" [POSITION nn] [NOTOTALS]
SET INPUT MESSAGE text_str
SET INPUT ROUTINE routine_name
SET INTOUCH [ON|OFF]
SET LOOKUPERR "substitute_character"
SET MENU [ON|OFF]
SET OUTPUT filename
SET PROCEED [TRUE|FALSE]
SET PROMPT "new_prompt"
SET REPROMPT [TRUE|FALSE]
SET SCREEN [80|132|WIDE|NARROW]
SET SPACING [SINGLE|DOUBLE|TRIPLE|1|2| 3|blanks-1]
SET TSUPPRESS [ON|OFF]
SORT [ON|BY] [UP|ASCENDING|DOWN|DESCENDING] expression [ , ... ]
TITLE "page_heading1" ["page_heading2"
["page_heading3"]]
A.2 Print Expressions
PRINT field
PRINT field1 + field2 (etc.)
PRINT CUME expression
PRINT PERCENT expression OF [TOTAL] expression
A.3 Commands Affecting Screen Display
SHOW COMMANDS
SHOW OPEN
SHOW FIELDS [[IN] structure_name]
SHOW COLUMN column_number
SHOW STRUCTURES
SHOW STRUCTURES IN device_directory_spec
SHOW command_name
RESTART
REMOVE command_name
REFRESH
EDIT
HELP
SET SCREEN [80|132|WIDE|NARROW]
SET PROMPT new_gql_prompt
SET COMMANDS [SHORT|LONG]
SET DISPLAY [ON|OFF]
A.4 Adding Synonyms
To create your own synonyms, do the following:
$ EDIT TTI_RUN:GUIDE_VOCAB.TAB |
Example:
Suppose you want to add the synonym SKIP for the command EXCLUDE:
except, $exclude, all |
except, $exclude, all skip, $exclude, all |
Now, if you enter your new synonym (command) SKIP at the command prompt, you will find that it does exactly the same thing as the EXCLUDE command.
The following are GQL System Options:
$ DEFINE GUIDE_OPTIONS "Option1, Option2, Option3" |
$ DEFINE GUIDE_OPTIONS "NOSYSTEM" $ DEFINE GUIDE_OPTIONS "INTERNAL EDITOR" $ DEFINE GUIDE_OPTIONS "NOSYSTEM, INTERNAL EDITOR" $ DEFINE GUIDE_OPTIONS "MENU ON" |
The NOSYSTEM option prevents access to VMS from GQL.
When users try to access VMS by entering "$$" at the Guide prompt, they will see the error message, "System access is not allowed":
Example B-1 VMS Access Error Message |
---|
Guide> $$ System access is not allowed EXIT = Exit INTOUCH Guided Query Language HELP = Help |
B.2.1 INTERNAL EDITOR
The INTERNAL EDITOR option causes GQL to use its
internal editor rather than using the VMS editor. Use this option if
you do not want users to access a VMS editor.
B.3 MENU ON
GQL has two user interfaces available:
The command line interface is the default when GQL is run. If you want the menu interface to be the default, use the MENU ON option.
Previous | Next | Contents | Index |