Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with UNSTRING (or problem with me)

32 views
Skip to first unread message

Bruce Axtens

unread,
Aug 3, 2022, 9:30:33 AM8/3/22
to
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

docd...@panix.com

unread,
Aug 3, 2022, 11:11:22 AM8/3/22
to
In article <57264bfc-416e-4d54...@googlegroups.com>,
Bruce Axtens <bruce....@gmail.com> 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

Bruce Axtens

unread,
Aug 3, 2022, 7:53:20 PM8/3/22
to
On Wednesday, 3 August 2022 at 11:11:22 pm UTC+8, docd...@panix.com 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.

docd...@panix.com

unread,
Aug 3, 2022, 8:55:12 PM8/3/22
to
In article <862a935a-95a4-44e1...@googlegroups.com>,
Gently, Mr Axtens. The best way I know to learn to find the mistakes is
to have made them, yourself.

DD
0 new messages