Home > Archive > Cobol > September 2004 > Re: UNSTRINGing a CSV line
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: UNSTRINGing a CSV line
|
|
| Lueko Willms 2004-09-28, 3:55 pm |
| .. Am 23.09.04
schrieb robert@wagner.net.yourmammaharvests (Robert Wagner)
bei /COMP/LANG/COBOL
in 4tn5l09s2l89k4bn7rvdqolh71s7kaklul@4ax.com
ueber Re: UNSTRINGing a CSV line (was: If you were inventing CoBOL...)
RW>>> Parse-CSV-Row.
RW>>> move 1 to CSV-Pointer
RW>>> perform until CSV-Pointer greater than length(CSV-Row)
RW>>> move spaces to Next-Token[color=darkred]
RW>>> if CSV-Row (CSV-Pointer:1) = '"' or "'"
RW>>> add 1 to CSV-Pointer
RW>>> unstring CSV-Row
RW>>> delimited by CSV-Row(CSV-Pointer-1:1)[color=darkred]
RW>>> into Next-Token[color=darkred]
RW> Your two suggestions are in conflict. Occurs Depending On cannot be
RW> used on table items.
RW>>> with pointer CSV-Pointer
I don't see any OCCURS DEPENDING ON anywhere, and I did not even
think of it.
Yours,
Lüko Willms http://www.mlwerke.de
/--------- L.WILLMS@jpberlin.de -- Alle Rechte vorbehalten --
"Die Interessen der Nation lassen sich nicht anders formulieren als unter
dem Gesichtspunkt der herrschenden Klasse oder der Klasse, die die
Herrschaft anstrebt." - Leo Trotzki (27. Januar 1932)
| |
| Robert Wagner 2004-09-28, 3:55 pm |
| On 23 Sep 2004 17:49:00 GMT, l.willms@jpberlin.de (Lueko Willms)
wrote:
>. Am 23.09.04
> schrieb robert@wagner.net.yourmammaharvests (Robert Wagner)
> bei /COMP/LANG/COBOL
> in 4tn5l09s2l89k4bn7rvdqolh71s7kaklul@4ax.com
> ueber Re: UNSTRINGing a CSV line (was: If you were inventing CoBOL...)
>
>RW>>> Parse-CSV-Row.
>RW>>> move 1 to CSV-Pointer
>RW>>> perform until CSV-Pointer greater than length(CSV-Row)
>RW>>> move spaces to Next-Token
Should be: move zero to item-length
[color=darkred]
>RW>>> if CSV-Row (CSV-Pointer:1) = '"' or "'"
>RW>>> add 1 to CSV-Pointer
>RW>>> unstring CSV-Row
>RW>>> delimited by CSV-Row(CSV-Pointer-1:1)
>RW>>> into Next-Token
Should be: TALLYING IN item-length
[color=darkred]
>RW> Your two suggestions are in conflict. Occurs Depending On cannot
>RW> be used on table items.
>
>RW>>> with pointer CSV-Pointer
>
> I don't see any OCCURS DEPENDING ON anywhere, and I did not even
>think of it.
I thought you would use OCCURS DEPENDING ON item-length to move the
data out. Now I see you planned to do it with:
move CSV-item(item-number)(1:item-length) to ...
I withdraw the comment.
|
|
|
|
|