Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Multiple fields to single field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Multiple fields to single field
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Mon Apr 28, 2014 10:07 pm    Post subject: Reply to: Multiple fields to single field
Reply with quote

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

Moderator


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

PostPosted: Mon Apr 28, 2014 10:08 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10355
Location: italy

PostPosted: Mon Apr 28, 2014 10:13 pm    Post subject: Reply to: Multiple fields to single field
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    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Tue Apr 29, 2014 3:25 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm
No new posts Selecting a row from multiple tables! Vignesh Sid DB2 2 Thu Oct 26, 2017 6:09 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us