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
 

 

extracting records frm vsam file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
raki_new

New User


Joined: 10 Feb 2009
Posts: 26
Location: chennai

PostPosted: Fri Jun 19, 2009 11:32 am    Post subject: extracting records frm vsam file
Reply with quote

I need to extract records based on some specified no of 7byte in driver file from the master file

tell me the simplest way to do it

the problem is

it shud be a variable files as the record size varies
and it can have mutlple records

For ex:

Master file

1111111111XXXXXXX01ZZZZZZZZZ
1111111111XXXXXXX02ZZZZZZZ
1111111111yyyyyyyy02ZZZZZZZZZ
1111111111yyyyyyyy03ZZZZZZ
1111111111zzzzzzzzz04ZZZZZZZZZ
1111111111zzzzzzzzz05ZZZZZ
1111111111mmmmm06ZZZZZZZZZ
1111111111mmmmm07ZZZZZZZ
1111111111aaaaaaaa08ZZZZZZZZZ
1111111111aaaaaaaa07ZZZZZZZ

driver file:

XXXXXX
yyyyyyy
aaaaaaa

Output shud be:
1111111111XXXXXXX01ZZZZZZZZZ
1111111111XXXXXXX02ZZZZZZZ
1111111111yyyyyyyy02ZZZZZZZZZ
1111111111yyyyyyyy03ZZZZZZ
1111111111aaaaaaaa08ZZZZZZZZZ
1111111111aaaaaaaa07ZZZZZZZ

Both master and Output file are vsam files
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Fri Jun 19, 2009 11:47 am    Post subject:
Reply with quote

after the driver file has been sorted on key,
this could be done simply by DFSORT
or
'PROGRAMS' button at top of page and refer to the match skeleton program
which you could modify for you needs. The VSAM could be dynamically read and readnext.

if the vsam volume is very large (and the avgreclen) then the cobol solution would probably be more less resource intensive.
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 -> COBOL Programming 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