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
 

 

Sort only records beginning with notifier L3

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

New User


Joined: 04 Jun 2010
Posts: 25
Location: Pune

PostPosted: Tue Dec 14, 2010 11:43 am    Post subject: Sort only records beginning with notifier L3
Reply with quote

Sample specific user data
Record is as follows:

L145757377737
L24575737783DEFG
L3457573772916200101
L3457573780536200102
L3457573779476200103
L145757377
L245757377811ABCD
L3457573779646200105
L3457573779646200104
L3457573779646200106


Now we have a request to sort only records beginning with notifier L3 in ascending based on record position 17-3..ie.e
for record L3457573779646200106
sort based on last 3 digits '106'
is such specific sorting possible ?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Dec 14, 2010 8:24 pm    Post subject:
Reply with quote

Hello,

Show the actual output you want from the posted sample input.

Mention the recfm and lrecl of the files.
Back to top
View user's profile Send private message
RedDevil711

New User


Joined: 04 Jun 2010
Posts: 25
Location: Pune

PostPosted: Wed Dec 15, 2010 8:40 am    Post subject: SORT/DFSORT
Reply with quote

Hi,
Provided with such an input file record data:

L145757377737
L24575737783DEFG
L3457573772916200101
L3457573780536200102
L3457573779476200103
L145757377
L245757377811ABCD
L3457573779646200105
L3457573779646200104
L3457573779646200106



The actual output file data should be as follows :

L145757377737
L24575737783DEFG
L3457573772916200101
L3457573780536200102
L3457573779476200103
L145757377
L245757377811ABCD


L3457573779646200104
L3457573779646200105
L3457573779646200106

note how the part of record highlighted in red changes in order
based on the value of the last three digits from input file
The file is of LRECL = 80 , RECFM is FB
and the last three fields are populated only for a record whose qualifier begins with "L3".Let me know if u need any other inputs
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Dec 16, 2010 12:12 am    Post subject:
Reply with quote

Reddevil711,

See the "Sort groups of records" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
giraffe

New User


Joined: 09 Nov 2010
Posts: 28
Location: SHENZHEN CHINA

PostPosted: Thu Dec 16, 2010 6:06 pm    Post subject:
Reply with quote

Hi, what i wanna know is whether you just need a inner sort for each group of 'L3' records, or a global sort for all 'L3' records and dispose the ordered 'L3' records in the original 'L3' positions.

e.g.
input file records:
L145757377737
L24575737783DEFG
L3457573772916200101
L3457573779646200104
L3457573780536200102
L145757377
L245757377811ABCD
L3457573779646200105
L3457573779476200103
L3457573779646200106

output file records:
L145757377737
L24575737783DEFG
L3457573772916200101
L3457573780536200102
L3457573779476200103
L145757377
L245757377811ABCD
L3457573779646200104
L3457573779646200105
L3457573779646200106
Back to top
View user's profile Send private message
RedDevil711

New User


Joined: 04 Jun 2010
Posts: 25
Location: Pune

PostPosted: Fri Dec 17, 2010 9:54 am    Post subject:
Reply with quote

Hi ,
I need an sort on individual 'L3' group of records under one 'L2'

Not the entire global sort on 'L3' group
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Dec 17, 2010 8:27 pm    Post subject:
Reply with quote

Hello,

Did you read and follow the "how to" that Skolusu provided for you?

If not, why not. . .

If you did, what happened?
Back to top
View user's profile Send private message
giraffe

New User


Joined: 09 Nov 2010
Posts: 28
Location: SHENZHEN CHINA

PostPosted: Sat Dec 18, 2010 10:51 am    Post subject:
Reply with quote

Hi, dick, I think there's some diference between this trick and Devil's problem, since we must keep non-L3 records in order...
Hi, Devil, can you make sure the 17-3 content of non-L3 records are spaces, if so, I think we can add a high value to this positions temporarily(change it back after sort with IFTHEN) and then employ the 'Sort groups of records' to fulfill that, don't forget OPTION EQUALS!
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 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


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