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

Random Read using Vsam KSDS file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
subhra das

New User


Joined: 01 Aug 2005
Posts: 9

PostPosted: Fri Sep 01, 2006 12:07 pm
Reply with quote

Hi,

I want to read from 20th record to 50th record from a VSAM KSDS file and write it to a file.

Can anybody tell me how to code this in program.

Thanks
Subhra
Back to top
View user's profile Send private message
Aji

New User


Joined: 03 Feb 2006
Posts: 53
Location: Mumbai

PostPosted: Fri Sep 01, 2006 1:54 pm
Reply with quote

hi
Fine tune the following logic.

working-storage section.
01 rec-no pic 99 value 0.
p1.
intialize key1.
start file1 key not < key1.
p2.
read file1 next record.
add 1 to rec-no.
if rec-no >= 20 and rec-no <= 50
write new-rec
end-if.

Aji Cherian
Back to top
View user's profile Send private message
subhra das

New User


Joined: 01 Aug 2005
Posts: 9

PostPosted: Fri Sep 01, 2006 3:16 pm
Reply with quote

Thanks a lot Aji .I'll code this and let you know the result.

Thanks
Subhra
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top