• Problem with UNSTRING (or problem with me)

    From Bruce Axtens@21:1/5 to All on Wed Aug 3 06:30:32 2022
    Given
    01 WS-SIDES PIC X(20).
    01 WS-SIDE-NUMBERS PIC 99V9
    OCCURS 3 TIMES
    INDEXED BY SIDE-INDEX.
    and
    UNSTRING WS-SIDES DELIMITED BY ALL ','
    INTO WS-SIDE-NUMBERS(1)
    WS-SIDE-NUMBERS(2)
    WS-SIDE-NUMBERS(3)
    END-UNSTRING.
    DISPLAY WS-SIDE-NUMBERS(1) SPACE WS-SIDE-NUMBERS(2) SPACE WS-SIDE-NUMBERS(2).

    with WS-SIDES containing '0.5,0.4,0.6', I'm consistently getting "00.5 00.4 00.4" displayed. Why isn't the 0.6 ending up in WS-SIDE-NUMBERS(3)?

    -- Bruce

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to [email protected] on Wed Aug 3 15:11:19 2022
    In article <[email protected]>,
    Bruce Axtens <[email protected]> wrote:

    [snip]

    DISPLAY WS-SIDE-NUMBERS(1) SPACE WS-SIDE-NUMBERS(2) SPACE WS-SIDE-NUMBERS(2).

    with WS-SIDES containing '0.5,0.4,0.6', I'm consistently getting "00.5
    00.4 00.4" displayed. Why isn't the 0.6 ending up in WS-SIDE-NUMBERS(3)?

    DD

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bruce Axtens@21:1/5 to [email protected] on Wed Aug 3 16:53:18 2022
    On Wednesday, 3 August 2022 at 11:11:22 pm UTC+8, [email protected] wrote:
    DISPLAY WS-SIDE-NUMBERS(1) SPACE WS-SIDE-NUMBERS(2) SPACE WS-SIDE-NUMBERS(2).

    Yep, problem with me. How to look stupid. Sigh. Won't be the last time.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to [email protected] on Thu Aug 4 00:55:09 2022
    In article <[email protected]>,
    Bruce Axtens <[email protected]> wrote:
    On Wednesday, 3 August 2022 at 11:11:22 pm UTC+8, [email protected] wrote:
    DISPLAY WS-SIDE-NUMBERS(1) SPACE WS-SIDE-NUMBERS(2) SPACE >WS-SIDE-NUMBERS(2).

    Yep, problem with me. How to look stupid. Sigh. Won't be the last time.

    Gently, Mr Axtens. The best way I know to learn to find the mistakes is
    to have made them, yourself.

    DD

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)