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
 

 

How To select particular record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How To select particular record
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    Post subject:
Reply with quote

Below link might helpfull for you.

http://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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Jun 10, 2009 5:35 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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