View previous topic :: View next topic
|
Author |
Message |
raki_new
New User
Joined: 10 Feb 2009 Posts: 26 Location: chennai
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|