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

Need to split the records with headings


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
umashankar subramani

New User


Joined: 06 May 2014
Posts: 3
Location: US

PostPosted: Tue May 06, 2014 5:00 am
Reply with quote

Hi... help me to get this in JCL SORT/ICETOOL
I have input file key starts from 5-9. LrecL = 20

1111AAAAA11111111111
1111BBBBB11111111111
1111CCCCC11111111111
1111DDDDD11111111111
1111EEEEE11111111111
2222AAAAA22222222222
2222BBBBB22222222222
2222CCCCC22222222222
2222DDDDD22222222222
2222EEEEE22222222222
3333AAAAA33333333333
3333BBBBB33333333333
3333CCCCC33333333333
3333DDDDD33333333333
3333EEEEE33333333333


I need output file as
Heading1
1111AAAAA11111111111
2222AAAAA22222222222
3333AAAAA33333333333

heading2
1111BBBBB11111111111
2222BBBBB22222222222
3333BBBBB33333333333

heading3
1111CCCCC11111111111
2222CCCCC22222222222
3333CCCCC33333333333

Heading4
1111DDDDD11111111111
2222DDDDD22222222222
3333DDDDD33333333333

heading5
1111EEEEE11111111111
2222EEEEE22222222222
3333EEEEE33333333333
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: Tue May 06, 2014 12:00 pm
Reply with quote

Well, you'll need to SORT on the key.

Are you saying you want different headings, or you just want headings on key-break? Can you post some actual examples of the headings you want?
Back to top
View user's profile Send private message
umashankar subramani

New User


Joined: 06 May 2014
Posts: 3
Location: US

PostPosted: Sat May 10, 2014 12:20 am
Reply with quote

Need output file with same heading as mentioned and need to split based on key starts from 5 - 9
Back to top
View user's profile Send private message
umashankar subramani

New User


Joined: 06 May 2014
Posts: 3
Location: US

PostPosted: Sat May 10, 2014 12:26 am
Reply with quote

I have input file key starts from 5-9. LrecL = 20

1111AAAAA11111111111 - KEY1
1111BBBBB11111111111 - KEY2
1111CCCCC11111111111 - KEY3
1111DDDDD11111111111 - KEY4
1111EEEEE11111111111 - KEY5
2222AAAAA22222222222 - KEY1
2222BBBBB22222222222 - KEY2
2222CCCCC22222222222 - KEY3
2222DDDDD22222222222 - KEY4
2222EEEEE22222222222 - KEY5
3333AAAAA33333333333 - KEY1
3333BBBBB33333333333 - KEY2
3333CCCCC33333333333 - KEY3
3333DDDDD33333333333 - KEY4
3333EEEEE33333333333 - KEY5



KEY1 - AAAAA
KEY2 - BBBBB
KEY3 - CCCCC
KEY4 - DDDDD
KEY5 - EEEEE

I need output file as

Heading1
1111AAAAA11111111111
2222AAAAA22222222222
3333AAAAA33333333333

Heading2
1111BBBBB11111111111
2222BBBBB22222222222
3333BBBBB33333333333

Heading3
1111CCCCC11111111111
2222CCCCC22222222222
3333CCCCC33333333333

Heading4
1111DDDDD11111111111
2222DDDDD22222222222
3333DDDDD33333333333

Heading5
1111EEEEE11111111111
2222EEEEE22222222222
3333EEEEE33333333333
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sat May 10, 2014 1:14 am
Reply with quote

Please learn to use the Code tags for readability.
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: Sat May 10, 2014 3:45 pm
Reply with quote

You're going to have to add the headings yourself in OUTFIL with the Slash Operator (/).

Use IFTHEN=(WHEN=GROUP to set a sequence number, then test that with IFTHEN=(WHEN=(logical expression). If 1, then output multiple records using the Slash Operator, to provide the headings and your first line of data.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top