Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
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: 7315

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: 10308
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: 1783
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 4 Tue Sep 19, 2017 1:39 pm
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm

Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us