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 Usergroups Profile Log in to check your private messages Log in
 

 

Need to split the records with headings

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Need to split the records with headings
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue May 06, 2014 12:00 pm    Post subject: Reply to: Need to split the records with headings
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    Post subject: Reply to: Need to split the records with headings
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    Post subject:
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: 1238
Location: Richfield, MN, USA

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

Please learn to use the Code tags for readability.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Sat May 10, 2014 3:45 pm    Post subject: Reply to: Need to split the records with headings
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


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