Good Morning Gurus,
Following is my requirement
Source Data
==========
col1|col2|col3|col4
1|A|05-06-2013|15.6
2|B|07-08-2013|26.7
3|C|09-10-2013|37.8
4|D|11-12-2013|48.9
Target Data
=========
col1|1|2|3|4
col2|A|B|C|D
col3|05-06-2013|07-08-2013|09-10-2013|11-12-2013
col4|15.6|26.7|37.8|48.9
I tried below mentioned Unix command (program) to Transpose the data,
(i.e., Rows to Columns & Columns to Rows)
"awk -F "|" '{for (f = 1; f <= NF; f++)a[NR, f] = $f}NF > nf { nf = NF }END {for (f = 1; f <= nf; f++)for (r = 1; r <= NR; r++)printf a[r, f] (r==NR ? RS : FS)}' ABC.txt > ABC_transpose.csv"
where ABC.txt is my source and ABC_transpose.csv is my target set
I am able to get the expected result set in expected format but I am curious to know if this can be achieved directly by using parallel job
-KK
Implementing Transpose functionality in Datastage 8.5
Moderators: chulett, rschirm, roy
Implementing Transpose functionality in Datastage 8.5
Thanks & Regards
KB
KB
-
- Participant
- Posts: 50
- Joined: Tue Jan 19, 2010 4:14 am