Code Comments
Programming Forum and web based access to our favorite programming groups... Am 23.09.04 schrieb robert@wagner.net.yourmammaharvests (Robert Wagner) bei /COMP/LANG/COBOL in j4e6l01ait5eplet99sk7jar962lglatrv@4ax.com ueber Re: UNSTRINGing a CSV line RW> Should be: TALLYING IN item-length No, you are confusing TALLYING IN and COUNT IN TALLYING counts the number of items moved to CSV-item(item-number) (in this example), while COUNT IN counts the number of characters examined for the single move, i.e. the length of Next-Token. like this: UNSTRING CSV-Line DELIMITED BY CSV-Line[CSV-Pointer - 1:1] INTO CSV-item-text(item-number) COUNT IN CSV-item-length(item-number) TALLYING IN item-number where CSV-item-text and CSV-item-length would be two items subordinate to a group item with an OCCURS clause long enough for a large number of items, e.g. like this: 01 CSV-item-table. 02 CSV-item OCCURS 200 TIMES. 03 CSV-item-length PIC 9(04) COMP. 03 CSV-item-text PIC X(256). 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)
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.