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

extracting records frm vsam file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 6966
Location: porcelain throne

PostPosted: Fri Jun 19, 2009 11:47 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top