CDO$HELP.HLB  —  CDO Edit Strings, Floating Characters
    There are six edit string floating characters: S, Z, -, +, $, and
    \.

1  –  S Floating Sign Character

    If you use the edit string character S (uppercase letter S) only
    once within an edit string, one of the following results can
    occur:

    o  If the field's value is positive, the character S inserts a
       plus sign (+) into the edited value.

       CDO Edit       S9
       String:
       DTR Edit       +9
       String:
       Field Value:   6
       Edited         +6
       Value:

    o  If the field's value is negative, the floating sign character
       inserts a minus sign (-) into the edited value.

       CDO Edit       S9
       String:
       DTR Edit       +9
       String:
       Field Value:   -8
       Edited         -8
       Value:

    o  If the field's value is zero, the effect of the floating sign
       character depends on the language reading the field.

       CDO Edit       S9
       String:
       DTR Edit       +9
       String:
       Field Value:   0
       Edited         +0
       Value:

       If you use more than one floating sign character at the
       beginning of an edit string, the S character suppresses
       leading zeros before inserting a plus sign (+) or minus sign
       (-) into the edited value.

       CDO Edit       SS99
       String:
       DTR Edit       ++99
       String:
       Field Value:   0054
       Edited         +54
       Value:

    You cannot use the S character within an edit string that
    contains another character designating a sign.

2  –  Z Floating Zero Replace Character

    If the digit within the field's value is zero, the floating zero
    replace character Z (uppercase letter Z) displays a literal value
    instead of the zero digit in the edited string.

    If the digit within the field's value is not zero, the floating
    zero replace character displays the digit.

    CDO Edit       Z" "99
    String:
    DTR Edit       Z99
    String:
    Field Value:   25
    Edited         25
    Value:

    The following example also shows the floating zero replace
    character.

    CDO Edit       Z"*"99
    String:
    DTR Edit       *99
    String:
    Field Value:   25
    Edited         *25
    Value:

    Translation of Characters in Floating Zero Replace Edit Strings
    shows how CDO translates individual CDO characters in floating
    zero replace edit strings for other languages.

    Table 6-2 Translation of Characters in Floating Zero Replace Edit
              Strings

               CDO                                RPG
    Z String   Character  COBOL    DTR   PL/I     EDIT
    Format     in String  PICTURE  EDIT  PICTURE  WORD

    Z"string"  blank      Z        Z     Z or Y   0

               *          *        *     *        *

               any other  *        *     *        *
               character

    See the PL/I documentation for an explanation of when the CDO
    blank character is translated to Z and when it is translated to
    Y.

    You cannot use the Z character within an edit string that
    contains another character designating a sign.

3  –  - Floating Minus Character

    If you use the edit string floating minus character, a minus
    sign (-), only once within an edit string, one of the following
    results can occur:

    o  If the field's value is positive, the floating minus character
       inserts a blank into the edited value.

    o  If the field's value is negative, the floating minus character
       inserts a minus sign into the edited value.

    o  If the field's value is zero, the effect of the floating minus
       character depends on the language reading the field. If you
       use this character a number of times at the beginning of an
       edit string, the character suppresses leading zeros before
       inserting a blank or minus sign into the edited value.

    You cannot use the minus character within an edit string that
    contains another character designating a sign.

    For a nonnumeric field, this character moves a minus sign into
    the edited value.

    CDO Edit       -9
    String:
    DTR Edit       -9
    String:
    Field Value:   -54
    Edited         -54
    Value:

4  –  + Floating Plus Character

    If you use the edit string floating plus character, a plus
    sign (+), only once within an edit string, one of the following
    results can occur:

    o  If the field's value is positive, the floating plus character
       inserts a plus sign into the edited value.

    o  If the field's value is negative, the floating plus character
       inserts a blank into the edited value.

    o  If the field's value is zero, the effect of the floating plus
       character depends on the language reading the field. If you
       use this character a number of times at the beginning of an
       edit string, the character suppresses leading zeros before
       inserting a blank or plus sign into the edited value.

    You cannot use this character within an edit string that contains
    another character designating a sign.

    CDO Edit       +++9
    String:
    DTR Edit       +++9
    String:
    Field Value:   54
    Edited         +54
    Value:

5  –  $ Floating Currency Character

    If you use the floating currency character only once, it inserts
    the dollar sign ($) in the next character position in the edited
    value.

    If you supply the floating currency character more than once at
    the beginning of an edit string, it suppresses leading zeros.
    To suppress up to four leading zeros, supply the character four
    times at the beginning of the edit string.

    The floating currency character inserts the currency sign to the
    left of the first printed digit of the edited value.

    CDO Edit       $,$$$.99
    String:
    DTR Edit       $,$$$.99
    String:
    Field Value:   157.86
    Edited         $157.86
    Value:

6  –  \ : Floating Blank Character

    The floating blank character, a backslash (\), suppresses blanks
    from an edited value. If the value of the character is a blank,
    the edited value excludes it.

    CDO Edit       MMM\\\\\,YYYY
    String:
    Field Value:   June 15, 1982
    Edited         JUNE,1982
    Value:
Close Help