Hi - For the split on the number of lines take the same principals you would
use in whatever your normal programming language is (I assume you are a
programmer) and do the same, ie a counter and a breakpoint.

In order to extract specific columns from the table instead of building the
pipe delimited line using the CHANGE command you can build it directly .
E.g. to extract columns 2 and 3

LINE := REC<2>:'|':REC<3>


You may want to keep the change of @vm to | in for each piece - or if you
want to extract a particular value you can use REC<2,3> for column 2 value 3
or for a sub value REC<2,3,9> for column 2 value 3 sub value 9.


Rgds Symeon.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dattatraya
Sent: 30 November 2009 05:01
To: [email protected]
Subject: [U2] How to Extract Selected multivalue colums


Dear All

I have a following program to extract pipe delimated data, but I want to
select only some columns how to do that? and how to split output file after
some records ( ie 10000 or 20000 ) .
-------------
OPEN 'CUSTOMER' TO FIL ELSE STOP 201 'CUSTOMER'
OPENSEQ 'CUSTOMER.CSV' TO CSVFIL ELSE NULL
WEOFSEQ CSVFIL
SELECT FIL
LOOP WHILE READNEXT ID DO
READ REC FROM FIL,ID THEN
LINE = '' : CHANGE(CHANGE(REC,@AM,'|'),@VM,'|') : '|':ID
WRITESEQ LINE ON CSVFIL ELSE CRT 'CAN NOT EWRITE TO CSV FILE'
END
REPEAT
---------------

Regards
Dattatraya

-- 
View this message in context:
http://old.nabble.com/How-to-Extract-Selected-multivalue-colums-tp26569624p2
6569624.html
Sent from the U2 - Users mailing list archive at Nabble.com.

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to