View previous topic :: View next topic
|
Author |
Message |
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
HI can we covert column to rows using Sort ?
Eg :
111 2222
333 4444
555 6666
needs to converted to
111 2222 333 4444 555 6666 |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
cvishu,
You haven't given enough information. You need to explain the rules you want to use for converting columns to rows. Do you want to convert everything to ONE row as shown in your example? Or some other variation? How many rows can you have - how many columns - how big can the output row be? What is the RECFM and LRECL of the input file and expected output file? What is the starting position, length and format of each relevant field? |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
Lets say , my input is going to be of 80 bytes and o/p can go as fas as the
row size is needed.
Only single row for o/p , so my entire column in the input will be displayed in onle single row in the output.
Also could you please suggest any alternative for SPLICE option , i am not sure its supported in my office environment
Thnks to both of you for ur response |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
and o/p can go as fas as the row size is needed. |
No, it can't. . .
Everything has a limit. . . |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Also could you please suggest any alternative for SPLICE option , i am not sure its supported in my office environment |
Unlikely. SPLICE has been available with DFSORT since Feb, 2003!
Quote: |
Only single row for o/p , so my entire column in the input will be displayed in onle single row in the output. |
Too vague to answer. If you can't give a better description of what you want to do, then I can't help you. |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
dick scherrer wrote: |
Hello,
Quote: |
and o/p can go as fas as the row size is needed. |
No, it can't. . .
Everything has a limit. . . |
ok my input is going to have 30 columsn and the size of each colum is 10 byts so i need a output with record length 300 byts |
|
Back to top |
|
|
Lijo
New User
Joined: 24 Aug 2008 Posts: 41 Location: Cochin
|
|
|
|
Hello,
Quote: |
ok my input is going to have 30 columsn and the size of each colum is 10 byts so i need a output with record length 300 byts |
Doesn't this mean i/p is of 300bytes???
So, your output will be 300bytes*no of rows in i/p???
I wonder how a project can have such strange requirement |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
Quote: |
ok my input is going to have 30 columsn and the size of each colum is 10 byts so i need a output with record length 300 byts |
OOPS !! My bad !!
its actally 30 rorws in input the length of each row is 10 bytes , so output is
10*30 =>300 byts
eg:
aaaaaaaaaa
bbbbbbbbbb
.
.
.
zzzzzzzzzzz
Hope am clear now. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
Skolusu
Thank you |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct,2010), you can now use the new RESIZE operator of DFSORT's ICETOOL to do this quite easily like this:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (FB/10)
//OUT DD DSN=... output file (FB/300)
//TOOLIN DD *
RESIZE FROM(IN) TO(OUT) TOLEN(300)
|
For complete details on the new functions for DFSORT and DFSORT's ICETOOL available with the Oct, 2010 PTF, see:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242 |
|
Back to top |
|
|
|