IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Multiple fields to single field


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mallik4u

New User


Joined: 17 Sep 2008
Posts: 75
Location: bangalore

PostPosted: Mon Apr 28, 2014 10:03 pm
Reply with quote

Hi,

Can any one help me on how to acheive the following using SORT in a single step?

INPUT file:
123 456 789
012 345 678

OUTPUT:
123
456
789
012
345
678

Appretiate your help!

Thanks
Mallik
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Apr 28, 2014 10:07 pm
Reply with quote

Look at the ICETOOL operator RESIZE.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Mon Apr 28, 2014 10:08 pm
Reply with quote

1.What is your input file length?
2.How many fields does 1 record contain (atmost)?
3.Will all the fields be filled always?
4.Is the field delimiter space?
5.What is your sort product ?
Back to top
View user's profile Send private message
mallik4u

New User


Joined: 17 Sep 2008
Posts: 75
Location: bangalore

PostPosted: Mon Apr 28, 2014 10:12 pm
Reply with quote

Thank you Bill and Pandora for quick reply.

Please find the details asked below:
1.What is your input file length?
14 characters
2.How many fields does 1 record contain (atmost)?
3 fields. Each field is 4 characters length.
3.Will all the fields be filled always?
Yes
4.Is the field delimiter space?
Yes
5.What is your sort product ?
Syncsort


Thanks,
Mallik
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Apr 28, 2014 10:13 pm
Reply with quote

here is a snippet that might help,

Code:
 ****** ***************************** Top of Data ******************************
 - - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  2 Line(s) not Displayed
 000003 //*
 000004 //ICE     EXEC PGM=SORT
 000005 //SYSPRINT  DD SYSOUT=*
 000006 //SYSOUT    DD SYSOUT=*
 000007 //SORTIN    DD *
 000008 123 456 789
 000009 012 345 678
 000010 //SORTOUT   DD SYSOUT=*
 000011 //SYSIN     DD *
 000012   OPTION COPY
 000013   OUTFIL BUILD=(1,3,/,5,3,/,9,3)
 000014 //*
 ****** **************************** Bottom of Data ****************************


modify according to Your need,
You might want to consider also the RESIZE control statement
Back to top
View user's profile Send private message
mallik4u

New User


Joined: 17 Sep 2008
Posts: 75
Location: bangalore

PostPosted: Mon Apr 28, 2014 10:24 pm
Reply with quote

Thank you enrico.
your sample code worked for me.

Thanks,
Mallik
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Tue Apr 29, 2014 3:25 am
Reply with quote

Quote:
2.How many fields does 1 record contain (atmost)?
3 fields. Each field is 4 characters length


You will have to be cautious when length becomes 4 for any of your field upon using the above sort card.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top