DEF CVS/DTE/LCS/UCS |
Define System Tables |
1. |
DEF CVS(new_table$) | |
2. |
DEF DTE(new_table$) | |
3. |
DEF LCS(new_table$) | |
4. |
DEF UCS(new_table$) | |
5. |
DEF SEP(new_table$) | |
6. |
DEF CHR(new_table$) |
new_table$ |
String expression. Contains the new definition (contents) of the table. |
Use these DEF directives to define new system tables for Accent Conversion, Date, Lowercase and Uppercase.
Define Accent Translation Table
Use the DEF CVS directive to set the values for the accent conversion table. The value of each byte to be translated is used as an offset into the table. The character at the particular offset is used in place of the original character.
See the "T" option under Key Definition Attributes, as well as the CVS( ) function.
The DEF DTE directive uses a string made up of 46 comma-delimited fields. These fields are used by the DTE function and should have the following values:
Number of Fields |
Field Contents |
12 |
Long form month names (%Ml) |
7 |
Long form day names (%Dl) |
2 |
Long form lowercase am/pm (%pl) |
2 |
Long form uppercase AM/PM (%Pl) |
12 |
Short form month names (%Ms) |
7 |
Short form day names (%Ds) |
2 |
Short form lowercase am/pm (%ps) |
2 |
Short form uppercase AM/PM (%Ps) |
Define Lowercase and Uppercase Tables
The DEF LCS and DEF UCS directives both take a 256-character string and replace the standard case conversion table with the string's value. Whenever PxPlus converts the case of a character, it uses the character's binary value as an offset into the tables.
Define Separator Table
Use the DEF SEP(<string>) directive to define a list of potential field separators.
Example:
DEF SEP($8A0A$) tells the system to accept either an $8A$ or $0A$ as the field separator.
When issuing the DEF SEP directive, the first character will become the system DEFAULT field separator.
Only one separator can be used at a time when parsing the data; that is, when the data is processed in the READ DATA FROM directive, it is first scanned to determine which, if any, of the field separator characters exist in the data. This scan is done initially with the first character in the separator list and, if not found in the data, the second character is checked and so on.
The currently defined field separators can be retrieved by accessing SEP(*).
Define Printable Character Table
This option allows the user to define which characters are "printable" for use with the CVS( ) function value 16.
To define which characters are "printable", the programmer can issue a DEF CHR(<string>) directive passing a string of 256 bytes. Each byte must be a $00$ or $01$ where $01$ indicates a printable character and $00$ indicates non-printable.
The current table of printable characters can be found by accessing CHR(*).
(The ability to define the "Printable" characters was added in PxPlus v7.00.)
CHR( ) ASCII Character of Value
CVS( ) Convert String
DTE( ) Convert Date
LCS( ) Return Lowercase String
SEP( ) Return Field Separator
UCS( ) Return Uppercase String