View previous topic :: View next topic
|
Author |
Message |
alexshan
New User
Joined: 06 Apr 2007 Posts: 5 Location: China
|
|
|
|
We are trying to pull a large number of records (2 million accounts) from a large data set(VSAM). I have one file(VSAM/NON-VSAM) that contains these 2 million account numbers. Can I do this using DFSORT? It's like a table lookup function, except in this case, the table is just a bit on the huge side. Thanks for any insight you can
provide me. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
the above has been cut and pasted from Smart DFSORT tricks which also provides a fairly self explanatory example.
So I'm not sure why the question.
Gerry |
|
Back to top |
|
|
alexshan
New User
Joined: 06 Apr 2007 Posts: 5 Location: China
|
|
|
|
gcicchet wrote: |
Hi,
the above has been cut and pasted from Smart DFSORT tricks which also provides a fairly self explanatory example.
So I'm not sure why the question.
Gerry |
the example at Smart DFSORT tricks JCL only works at Non-Vsam
but I want pull some records from a Vsam
So I post them,ask this question
thanks for ur reply |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use that trick with a VSAM file ... just copy the VSAM file to a nonVSAM file first. |
|
Back to top |
|
|
alexshan
New User
Joined: 06 Apr 2007 Posts: 5 Location: China
|
|
|
|
Frank Yaeger wrote: |
You can use that trick with a VSAM file ... just copy the VSAM file to a nonVSAM file first. |
it's a large data set....really large at my environment
it takes too many spaces when copy from VSAM to Non-VSAM
and long time...
So,I want pull some records directly from the VSAM master file
thank you for your reply |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
The problem is that you can't use concatenation with a VSAM file.
How about copying the VSAM file to a nonVSAM file on tape rather than disk?
This might be a case where it's better to write a program or exit (E15 or E35) that pulls the recods rather than using a DFSORT trick. It won't take as much space, but it might still take a "long time" depending on how you're pulling the records. |
|
Back to top |
|
|
alexshan
New User
Joined: 06 Apr 2007 Posts: 5 Location: China
|
|
|
|
Frank Yaeger wrote: |
The problem is that you can't use concatenation with a VSAM file.
How about copying the VSAM file to a nonVSAM file on tape rather than disk?
This might be a case where it's better to write a program or exit (E15 or E35) that pulls the recods rather than using a DFSORT trick. It won't take as much space, but it might still take a "long time" depending on how you're pulling the records. |
I see...
anyway,I perfer DFSORT to do this kind of job thanks to its efficiency
So I recombine the small file (store the account number) as sort sysin
(include cond=...)
then use it pull record from the VSAM Master File
thank you for your help |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
So I recombine the small file (store the account number) as sort sysin (include cond=...) |
You originally said:
Quote: |
We are trying to pull a large number of records (2 million accounts) from a large data set(VSAM). |
which I interpreted as meaning that you had 2 million account numbers that you wanted to pull. Of course, you can't specify 2 million INCLUDE conditions so I didn't suggest that. If you're using INCLUDE to do this, then you must have a significantly smaller number of account numbers to pull (thousands or less). |
|
Back to top |
|
|
alexshan
New User
Joined: 06 Apr 2007 Posts: 5 Location: China
|
|
|
|
Frank Yaeger wrote: |
which I interpreted as meaning that you had 2 million account numbers that you wanted to pull. Of course, you can't specify 2 million INCLUDE conditions so I didn't suggest that. If you're using INCLUDE to do this, then you must have a significantly smaller number of account numbers to pull (thousands or less). |
"2 million" this figure is appropriate
Therefore, I have just mentioned approach is not very appropriate...
So it seems now that conver the VSAMtoNon-VSAM is the fastest solution
right? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I would suspect so. |
|
Back to top |
|
|
|