Clean Command [CL]. Robelle Suprtool 5.7
Реклама
Реклама
Clean Command [CL]
Specifies what characters to clean when using the $Clean function.
CLEAN [ SPECIAL | <string> <range> ]
(Default: None)
Suprtool will "clean" or replace all of the characters specified in the Clean command from a byte type field when invoked by the $Clean function. To define what characters that need to be replaced you use the clean command with the character you want to clean in quotes. Since most of the characters that you will need to clean are unprintable, you can enter the decimal equivalent of the character. This is denoted by entering the "^" character in quotes preceding the decimal number of the character you wish to clean.
An example of how easy it would be to clean your database of certain "bad" characters in byte-type fields would be as follows:
>base mydb,1,;
>get customer
>clean "^9","^10","^0","^7"
>update
>ext address(1) = $clean(address(1))
>ext address(2) = $clean(address(2))
>xeq
The SPECIAL keyword automatically defines Clean characters of Decimal 0 thru to
Decimal 31.
>base mydb,1,;
>get customer
>clean special
>update
>ext address(1) = $clean(address(1))
>ext address(2) = $clean(address(2))
>xeq
You can also specify a range of characters with the following syntax:
>base mydb,1,;
>get customer
>clean special,"^128:^255"
>update
>ext address(1) = $clean(address(1))
>ext address(2) = $clean(address(2))
>xeq
The above task would clean all byte type fields of any characters from Decimal 0
(Null) to Decimal 31 plus Decimal 128 to Decimal 255.
Removing Bad Characters
You can have the Clean function clean the field, and instead of replacing with a space, the $clean function will essentially shift characters to the left by Setting the
CleanChar in the following manner:
>Set Cleanchar “<null>”
Suprtool will pad the field that was cleaned with the appropriate amount of characters with a space at the end of the field.
136 • Suprtool 5.7 for MPE
Suprtool Commands
Изтегляне
Реклама