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
 
How to sort the records leaving the first and the last

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Wed Aug 06, 2008 3:41 pm    Post subject: How to sort the records leaving the first and the last
Reply with quote

Hi ,

I need to sort a Sequential file of RECFM=FB and LRECL=80
Here i should not sort the first and the last records.So the records between the first and Last records should be sorted.

Sort Fileds=(1,4,ch,a)

Input

AAAAA
CCCCC
BBBBB
XXXXX
DDDDD
ZZZZZ

Output
AAAAA
BBBBB
CCCCC
DDDDD
XXXXX
ZZZZZZZ
Back to top
View user's profile Send private message

sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Wed Aug 06, 2008 3:42 pm    Post subject: Reply to: How to sort the records leaving the first and the
Reply with quote

Typo Mistake : ZZZZZZZ
It should be ZZZZZ
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Aug 06, 2008 3:51 pm    Post subject: Reply to: How to sort the records leaving the first and the
Reply with quote

Sri,

Did you check the new DATASORT operator introduced in DFSORT? I think this can be done easily using the new operator?
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Wed Aug 06, 2008 4:06 pm    Post subject: Re: Reply to: How to sort the records leaving the first and
Reply with quote

Thanks Aaru for your suggestion But i do not have PTF installed.

Frank Rpely in that Link: Note that you will need z/OS DFSORT V1R5 PTF UK90013 (July, 2008) in order to use the new DATASORT operator
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 06, 2008 4:08 pm    Post subject:
Reply with quote

Have you searched the forum, as I do recall a request to do EXACTLY what you want to do.

I think HEADER and TRALER were in the title of the thread, or the text body, so should not be too difficult to find.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Aug 06, 2008 4:23 pm    Post subject: Reply to: How to sort the records leaving the first and the
Reply with quote

Sri,

Quote:
Here i should not sort the first and the last records.So the records between the first and Last records should be sorted.


whther The first and last records will always be AAAAA and ZZZZZ respectively????? If yes, as suggested search the forum as it has been discussed many times.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Wed Aug 06, 2008 5:09 pm    Post subject: Re: Reply to: How to sort the records leaving the first and
Reply with quote

Aaru wrote:
Sri,

Quote:
Here i should not sort the first and the last records.So the records between the first and Last records should be sorted.


whther The first and last records will always be AAAAA and ZZZZZ respectively????? If yes, as suggested search the forum as it has been discussed many times.


I got some code after some thorough search.
I made the changes as per my requirement and it worked fine.
Thanks Aaru and Expat.
Actulaly i missed that in my first Search.
icon_sad.gif
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Aug 06, 2008 5:11 pm    Post subject: Reply to: How to sort the records leaving the first and the
Reply with quote

You are welcome and good that it is working.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Aug 06, 2008 10:41 pm    Post subject:
Reply with quote

If you have z/OS DFSORT V1R5 PTF UK90013 (July, 2008), you can use the new DATASORT operater to do this kind of thing. See:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/

If you can't use DATASORT, you can use the older technique described in the "Sort records between a header and trailer " Smart DFSORT Trick at:

www.ibm.com/systems/support/storage/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Thu Aug 07, 2008 9:49 am    Post subject: Reply to: How to sort the records leaving the first and the
Reply with quote

Thank you Frank...I do not have z/OS DFSORT V1R5 PTF UK90013 so i have opted the second choice
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Aug 07, 2008 10:10 pm    Post subject:
Reply with quote

Quote:
I do not have z/OS DFSORT V1R5 PTF UK90013 so i have opted the second choice


Ask your System Programmer to install that PTF (it's free).
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

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