VOC Format
Description
The VOC plays a vital part in the MV command processor and the MV file I/O system. Every word found on a command line and every filename opened is looked up in the VOC to determine its meaning or location.
For new and imported accounts, the VOC is created in a specific global, MV.VOC, and is populated with the contents of the NEWACC file stored in sysprog. All accesses to the VOC by system code will go directly to the global ^MV.VOC whereas any accesses by user code will open the file "VOC" or "MD" and access the global specified in the F pointer ( so don't change them from pointing to ^MV.VOC).
VOC Entry Format
The first attribute of a VOC item indicates the type of the item:
"F" | File. You can use the LISTF command to list VOC file entries. |
"K" | Keyword. Keywords used in CMQL are listed in the Caché MultiValue Query Language (CMQL) Reference. |
"PA" | Paragraph. You can use the LISTPA command to list VOC paragraph entries. |
"PH" | Phrase. You can use the LISTPH command to list VOC phrase entries. |
"PQ" | PROC command |
"PQN" | New PROC command |
"Q" | Q pointer |
"R" | Remote |
"S" | Sentence. You can use the LISTS command to list VOC sentence entries. |
"V" | Verb |
File Definition Format
File Definition
001 F 002 data section 003 dict section 004 M if this is a multi data section file 005 primary class name 006 file options 007 list of data section names 008 list of locations of data sections 009 list of class names for data sections
The dict and data sections may contain either global references or directory paths.
The file options are any combination of these chars:
-
B — Basic program file. Used to control display in Studio.
-
U — Untranslated. Item names in a directory file are not passed through the standard translation algorithm to create the filename.
Keyword Definition Format
Keyword Definition
001 "K" 002 Canonical form of the keyword. This is the text that is passed to the parser. 003 Alternate VOC entry to use if this word is used as a verb.
Verb Definition Format
Verb Definition
001 V 002 Function name 003 Location code 004 Processing Options 005 Parsing Options 006 007 BasicObjectPointer Location 008 ItemID of Basic Program 009 Filename of Basic Program 010 Account of Basic Program
The Location code directs the shell to the correct routine.
The Processing options are a set of single character codes passed to CMQL:
-
"A" - output processor uses default output attributes
-
"D" - output processor requires a datastream
-
"I" - output processor requires entire items
-
"J" - output processor requires total,avg and enum (STAT verb)
-
"L" - output processor requires a selectlist
-
"R" - output processor requires the raw data only, no conversions or formatting
-
"S" - output should be sorted by default
-
"T" - output processor requires totals only (SUM verb)
The Parsing options control the shell's operation:
-
2 TCL2 format
-
A Default to All items if none specified by select list or on the command line
-
B Backslashes ( \ ) can be used to quote strings
-
C Read Item into @Record
-
D force read from the Dict of the file.
-
E Handling of CRT/PRINT and error messages differs slightly for some verbs, usually CMQL verbs
-
F Filename only. Do not look for item IDs.
-
J Inhibit TCL1 parse - pass unprocessed line to verb implementation code.
-
K basic program is to keep select list 0 available to TCL after execution.
-
L Remove parenthesis from the line - for CLEAR-FILE (DATA XXX)
-
M Process error Messages before returning the next item.
-
N New Item OK
-
P Print out item IDs (TCL2)
-
Q Query syntax
-
R Require Item IDs to be specified. Overrides D3 behavior of assuming '*' if item spec missing.
-
U Take lock for Update