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
 

 

I want to retrive the Last 50 records in the KSDS file

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

New User


Joined: 16 Apr 2006
Posts: 29

PostPosted: Mon May 29, 2006 12:07 am    Post subject: I want to retrive the Last 50 records in the KSDS file
Reply with quote

I want to retrive the Last 50 records in the KSDS file.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Mon May 29, 2006 6:32 am    Post subject:
Reply with quote

See the following Smart DFSORT Trick for one way to do that kind of thing:

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

New User


Joined: 21 Mar 2005
Posts: 22
Location: pune

PostPosted: Mon May 29, 2006 9:43 am    Post subject: Re: I want to retrive the Last 50 records in the KSDS file
Reply with quote

hi,
according to me , any how the KSDS has key value which is in Ascending order.
So make it into descending order and read 1st 50 recs and skip reamaining thing.
jus iam giving logic only. if u want indepth i will provide info on it.

Thanks
Hari
Back to top
View user's profile Send private message
philipraju
Warnings : 1

New User


Joined: 16 Apr 2006
Posts: 29

PostPosted: Mon May 29, 2006 11:47 am    Post subject: Hi, Bshakris
Reply with quote

Thanks For given logic,can u gives some depth idea with sample code and if any other alternatives r there for this one,pls let me know....



.......thank u
Back to top
View user's profile Send private message
philipraju
Warnings : 1

New User


Joined: 16 Apr 2006
Posts: 29

PostPosted: Mon May 29, 2006 11:48 am    Post subject: Hi, Franks
Reply with quote

thanks for given response
Back to top
View user's profile Send private message
senti

New User


Joined: 18 Aug 2005
Posts: 19

PostPosted: Mon May 29, 2006 12:05 pm    Post subject: Re: I want to retrive the Last 50 records in the KSDS file
Reply with quote

With fileaid too u can retrive last fifty records by setting the pointer to the last record.
Back to top
View user's profile Send private message
Nidhi_Bansal

New User


Joined: 17 May 2006
Posts: 4
Location: Noida

PostPosted: Mon May 29, 2006 5:05 pm    Post subject:
Reply with quote

In File-Aid, go to Option 3 (that is -Utilities), then again 3(Copy), then in the Selection Criteria, give T(Temporary),then give 1(Options), there you can give the number of records(n) to be selected and can give the VSAM Processing Option as Backward.
This would copy the last n records....
Back to top
View user's profile Send private message
sundaresanjs

New User


Joined: 29 May 2006
Posts: 18
Location: USA

PostPosted: Wed May 31, 2006 7:05 pm    Post subject:
Reply with quote

hi,

upto my reference i got an logic regarding the retrival of last n records in a vsam file.

the following steps are followed.

1. copy the vsam data in a ps file
2. sort the file in descending order
3. get the first n records.
4. delete the ps file

advantages

no need to sort the vsam file.



thanks

comments are welcome

regards,
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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