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: 29
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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