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

Need logic to read the last record


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maheshurstd

New User


Joined: 16 Feb 2006
Posts: 14

PostPosted: Mon Jun 26, 2006 12:22 pm
Reply with quote

Hi

My requirement is that i have some records in a VSAM file, i want to read only the last record using cobol program without having record key values.
& How to read only the first record using cobol program without having record key values.

would it be possible for to read the last record.if any one has the code please send it or tell me a way to do it.


Thanks in advance

Regards

Mahesh
Back to top
View user's profile Send private message
Jerry

New User


Joined: 16 Sep 2005
Posts: 42

PostPosted: Fri Jun 30, 2006 2:04 pm
Reply with quote

Hi Mahesh,

To read the first record, without the key value:
You could do this by reading the file sequentially.

To read the last record:
You could move high values to the key and use READPREV in COBOL or you could try Frank's link:

www-03.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html
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 How to split large record length file... DFSORT/ICETOOL 8
No new posts Error to read log with rexx CLIST & REXX 11
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
Search our Forums:

Back to Top