The mc processing code invokes one of many available processing codes available for special processing on numeric and alphabetic strings of characters. Multiple mc conversions may be placed on the same attribute in an attribute-defining item, provided that each is delimited by a value mark.
System Processors |
Update |
Code Type |
Attribute Defining |
Dictionary Attributes |
Input Conversion |
Syntax
mc{/}code |
Parameter(s)
code |
Strings of characters. |
|
/a |
Retrieves only the nonalphabetic characters from a given data value. |
|
/an |
Retrieves only the characters that are neither alphabetical nor numerical from a given data value. mc/na is a synonym for this command. |
|
/n |
Retrieves only the nonnumeric characters from a given data value. |
|
a |
Retrieves only the alphabetic characters from a given data value. |
|
an |
Retrieves only the alphabetic and numeric characters from a given data value. mcna is a synonym for this command. |
|
dx |
Converts all decimal numbers in a given value to their corresponding hexadecimal equivalent. |
|
i |
Inverts the characters in a given string of data. |
|
l |
Converts all characters in the given value to lowercase characters. |
|
n |
Retrieves only the numeric characters from a given data value. |
|
p |
Converts all nonprintable (control) characters in a given value to periods. Nonprintable characters are those between the hexadecimal values x’00’-x’1f’ and those between x’7f’-x’fb’. Note that the characters above x’7f’ display, but actually have different character meanings as their high order bit is lost. |
|
s |
Capitalizes the first letter in each sentence. |
|
t |
Capitalizes the first character after any nonalphabetic character in a given value. |
|
u |
Converts all characters in the given value to uppercase characters. |
|
xd |
Converts all hexadecimal numbers in a given value to their corresponding decimal equivalent. |
Example(s)
Outputs 1200 (1200 followed by two spaces).
string = "1200 Main Street" crt oconv(string,"mc/a") |
This outputs as shown below, all alphanumeric characters having been stripped:
string = "1200 Main Street..." crt oconv(string,"mc/an") |
Outputs Main Street (note the space before Main).
... string = "1200 Main Street" crt oconv(string,"mc/n") |
Outputs MainStreet (the numbers and embedded spaces are stripped).
string = "1200 Main Street" crt oconv(string,"mca") |
Outputs 1200MainStreet (the spaces and the periods are stripped).
string = "1200 Main Street..." crt oconv(string,"mcan") |
Displays internal = 16 and external = A.
number = 10 crt "internal = " : iconv(number,"mcdx") crt "external = " : oconv(number,"mcdx") |
This returns the string "fedcba".
oconv("abcdef","mci") |
Displays upper and lower in all lowercase.
string = "UPPER And lower" crt oconv(string,"mcl") |
Outputs 1200 (the letters and embedded spaces are stripped).
string = "1200 Main Street" crt oconv(string,"mcn") |
Displays This is. A demo. Of the. MCS code.
string = "this is. a demo. of the. MCS code" crt oconv(string,"mcs") |
Displays This Is. A Demo. Of The. Mct Code.
string = "this is. a demo. of the. MCT code" crt oconv(string,"mct") |
Displays UPPER AND LOWER in all uppercase.
string = "UPPER And lower" crt oconv(string,"mcu") |
Outputs 6898.
crt oconv("1AF2","mcxd") |
See Also
Correlative Processing Codes (ADI), iconv() Function, Input-Conversion Processing Codes, oconv() Function, output-conversion, Output-Conversion Processing Codes, Processing Codes Overview, Processing Codes