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: 6968
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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


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