View previous topic :: View next topic
|
Author |
Message |
umashankar subramani
New User
Joined: 06 May 2014 Posts: 3 Location: US
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
umashankar subramani
New User
Joined: 06 May 2014 Posts: 3 Location: US
|
|
|
|
Need output file with same heading as mentioned and need to split based on key starts from 5 - 9 |
|
Back to top |
|
|
umashankar subramani
New User
Joined: 06 May 2014 Posts: 3 Location: US
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Please learn to use the Code tags for readability. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|