Delete character-values item – DC

You can use the Delete Character values command to delete data from specific column locations within result string.  The DC command has similarities to the RC command.  The main differences are that DC accepts only one string value, not a string-pair, and the DC command can result in character deletions, while the RC command does individual, one-for-one character replacements.

Syntax of a delete character-values item:

DC   character-deletion-list  [  column-reference  ]


       Introduces the delete-character-values item


Defines a string of one or more characters.

Each character in the result string that are found in the character-deletion-list string is deleted.

By default, the casing of character-deletion-list string uses the current PROFILE CASE setting in effect.  This can be overridden by a CC or CT command code, or by using a type code suffix of C, T or X on the character-replacement-list string.  When CASE T mode is in effect, by any means, any letters in the character-deletion-list string are effectively recorded twice, once for the lower-case version of the letter, and once for the upper case version.  For example, the command DC'abc'T maps both upper and lower case versions of the character-deletion-list string.  This operates as if the command DC'ABCabc'C were used.   Thus,  it will delete both upper-case and lower-case versions of A, B and C.

When using hex strings, the hex value is always treated as case-sensitive, if any of its data contains letters.  So, a command of DC'61'X would delete the lower-case letter 'a' but not the upper case letter 'A'.


Specifies columns in the result string where characters can potentially be deleted.  If column reference is omitted, the entire result string can potentially be modified.

The character-deletion-list represents potential character deletions that may take place.  It is not necessary for any of the characters in the character-deletion-list string to actually exist in the result string.  If none are present, it is not an error; no character deletions takes place, and the result string will remain unmodified.

The characters in the character-deletion-list string should be unique, but this is not checked for.  Any duplications are simply ignored.

For instance, to delete all slash characters from the string "Abc/Xyz/Pdq",  you could use a  delete character-values like


A complete mapping string that used this item would look like:

M"1+ DC'/'"

or with the 1+ implied by auto-copy we can shorten this to:


The final result string will be "AbcXyzPdq".

Created with the Personal Edition of HelpNDoc: Benefits of a Help Authoring Tool