View previous topic :: View next topic
|
Author |
Message |
kvamsy
New User
Joined: 14 Apr 2009 Posts: 10 Location: chennai
|
|
|
|
Hi,
Is there any way to convert from Rows to columns as given below
Input
Code: |
Group
301 RDDD
302 ETH
305 RDDD
306 RDDD
307 RDDD
310 RDDD |
Output
301302305306307310 until 20 groups in one column.... I know it can be done using cobol arrays concept, i want know if this can be possible using DFsort or icetool. If yes, Please let me know..
Code'd |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have a look at ICETOOL's RESIZE operator. Search the forum for examples, the manual, google.
Is that your entire file, or is there other data as well? |
|
Back to top |
|
|
kvamsy
New User
Joined: 14 Apr 2009 Posts: 10 Location: chennai
|
|
|
|
Bill Woodger wrote: |
Have a look at ICETOOL's RESIZE operator. Search the forum for examples, the manual, google.
Is that your entire file, or is there other data as well? |
Just an example, but i have group from 3 - 5 and RDDD starts from 75 position.
file consists of 1800 rows.. I want only 20 groups in each column. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
This would seem to do what you ask for....
Code: |
//MAKELNG EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//OUT1 DD SYSOUT=*
//TOOLIN DD *
RESIZE FROM(IN1) TO(OUT1) TOLEN(60) USING(CTL1)
//CTL1CNTL DD *
OPTION COPY
OMIT COND=(1,6,CH,EQ,C'GROUP ')
INREC BUILD=(1,3)
//IN1 DD *
GROUP
301 RDDD
302 ETH
305 RDDD
306 RDDD
307 RDDD
310 RDDD
|
Output is:
|
|
Back to top |
|
|
kvamsy
New User
Joined: 14 Apr 2009 Posts: 10 Location: chennai
|
|
|
|
Bill Woodger wrote: |
This would seem to do what you ask for....
Code: |
//MAKELNG EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//OUT1 DD SYSOUT=*
//TOOLIN DD *
RESIZE FROM(IN1) TO(OUT1) TOLEN(60) USING(CTL1)
//CTL1CNTL DD *
OPTION COPY
OMIT COND=(1,6,CH,EQ,C'GROUP ')
INREC BUILD=(1,3)
//IN1 DD *
GROUP
301 RDDD
302 ETH
305 RDDD
306 RDDD
307 RDDD
310 RDDD
|
Output is:
|
Thanks a lot.... |
|
Back to top |
|
|
|