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

Sort only records beginning with notifier L3


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Tue Dec 14, 2010 8:24 pm
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
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
Reply with quote

Reddevil711,

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

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: 27
Location: SHENZHEN CHINA

PostPosted: Thu Dec 16, 2010 6:06 pm
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
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

Moderator Emeritus


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

PostPosted: Fri Dec 17, 2010 8:27 pm
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: 27
Location: SHENZHEN CHINA

PostPosted: Sat Dec 18, 2010 10:51 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 4
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
Search our Forums:

Back to Top