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

How To select particular record


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Fri Jun 05, 2009 9:44 am
Reply with quote

Hi All,

Need Help!!!!

I have one file which is sorted flat file but in that file there are multiple records for the same say acct number eg
111111 ghkjk 000 ......
111111 ghkjk 012 ......
111111 ghkjk 012 ......

Now i want to select last record only out of these multiple instance of one record.
Please help me out to resolve this issue.

Thanks...
Back to top
View user's profile Send private message
maheshvamsi

New User


Joined: 22 Mar 2008
Posts: 39
Location: bangalore

PostPosted: Fri Jun 05, 2009 10:08 am
Reply with quote

Below link might helpfull for you.

ibmmainframes.com/viewtopic.php?p=187909&highlight=#187909
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Fri Jun 05, 2009 11:29 am
Reply with quote

Hey its working...thank you very much icon_smile.gif
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Tue Jun 09, 2009 2:58 pm
Reply with quote

sort the record in descending order so that the last record comes first and put sum fields = none

it should work
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: Wed Jun 10, 2009 5:35 am
Reply with quote

Hello,

If the file is already in the needed sequence and the last record of some group is needed, sorting descending will not necessarily work.

The good news is that there is a working solution. . . icon_smile.gif
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top