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

How to sort the records leaving the first and the last


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

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Wed Aug 06, 2008 3:41 pm
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: 218
Location: India

PostPosted: Wed Aug 06, 2008 3:42 pm
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: 1287
Location: Chennai, India

PostPosted: Wed Aug 06, 2008 3:51 pm
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: 218
Location: India

PostPosted: Wed Aug 06, 2008 4:06 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Aug 06, 2008 4:08 pm
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: 1287
Location: Chennai, India

PostPosted: Wed Aug 06, 2008 4:23 pm
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: 218
Location: India

PostPosted: Wed Aug 06, 2008 5:09 pm
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: 1287
Location: Chennai, India

PostPosted: Wed Aug 06, 2008 5:11 pm
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 Developer


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

PostPosted: Wed Aug 06, 2008 10:41 pm
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:

Use [URL] BBCode for External Links

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:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Thu Aug 07, 2008 9:49 am
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 Developer


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

PostPosted: Thu Aug 07, 2008 10:10 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
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 JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top