View previous topic :: View next topic |
Author |
Message |
krk123 Beginner

Joined: 03 Jun 2003 Posts: 58 Topics: 19
|
Posted: Fri Nov 07, 2003 3:31 pm Post subject: Conditional repro. |
|
|
Hi,
I am trying copy records from a very big flat file to a VSAM file. I am using repro to copy. Is there anyway we can specify a condition while copying i.e I am looking for something like
SORT FIelds=copy
include cond=(10,5,ch,eq,c'xxxxx).
Is this possible to do with repro.
regards,
KRK123 |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Nov 07, 2003 4:06 pm Post subject: |
|
|
Krk,
Why would you not want to use SORT??
Anyway, REPRO does have conditional copying capability. But, it is limited to ranges. That is, you can copy records between FROMKEY and TOKEY or, between FROMADDRESS and TOADDRESS and, between FROMNUMBER to TONUMBER. Niether of these will help you.
So, the answer is NO. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Fri Nov 07, 2003 4:28 pm Post subject: |
|
|
KRK123,
You can use DFSORT to copy the large flat file to a VSAM file. Just specify SORTIN as the flat file and SORTOUT as the VSAM file. That will allow you to use the DFSORT INCLUDE statement you want. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Nov 07, 2003 4:39 pm Post subject: |
|
|
Cogito,
you are partially correct. If the input file is KSDS or ISAM(no longer supported) then you can use repro with include cond.
The technique is to code the same key for both the FROMKEY & TOKEY
for ex:
Code: |
REPRO IFILE(IN) OFILE(OUT) FROMKEY('AAAAAA') TOKEY('AAAAA')
|
In this case you can just copy the key aaaaa.
This will not work for KRK as his input file is a flat file which means DSORG is PS which is accessed via QSAM mode.
Krk use sort to copy it to vsam as sort products are highly optomized for I/O. Just make sure that you have defined the vsam file as REUSE.
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Nov 07, 2003 4:52 pm Post subject: |
|
|
Kolusu,
I am aware of that technique. As his input is PS, I did not post it.
I should have posted it to maintain some "generality". _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
krk123 Beginner

Joined: 03 Jun 2003 Posts: 58 Topics: 19
|
Posted: Sat Nov 08, 2003 6:44 pm Post subject: |
|
|
Cogito, Kolusu & Frank thanks a lot for your help and your time. I will use DFSORT.
Regards,
krk123 |
|
Back to top |
|
 |
|
|