Page 1 of 2

Repro from sequential to VSAM file handeling the duplicate

PostPosted: Wed Aug 25, 2010 7:41 pm
by ajuatsgp
I have a sequential file with data as:

0302082010000000000000015
0502082010000000000000005
0702082010000000000000017
0802082010000000000000012
2002082010000000000000023

I want to Repro it to a VSAM file which has data:


0112122010000000000000008
0212122010000000000000009
0412122010000000000000009
0512122010000000000000008
0702082010000000000000017
1012122010000000000000015
1212102010000000000000001
3112122010000000000000001

The digits in RED are key of the VSAM file.
But the record in BOLD is a duplicate record.

My requirement is such that after doing the Repro the record in BOLD should be 0702082010000000000000032. My requirement is such that the last 15 digits which is counts of those records should be added.

Re: Repro from sequential to VSAM file handeling the duplicate

PostPosted: Wed Aug 25, 2010 8:49 pm
by MrSpock
REPRO is not going to add two fields and sum them. Why aren't you looking for a solution using your SORT product?

Re: Repro from sequential to VSAM file handeling the duplicate

PostPosted: Wed Aug 25, 2010 10:09 pm
by ajuatsgp
Can u please help me...I mean how can I get the desired output.
Let me tell again input file is a sequential file and output is a VSAM file.
I can use any number of intermediate file if required

Re: Repro from sequential to VSAM file handeling the duplicate

PostPosted: Thu Aug 26, 2010 12:07 am
by dick scherrer
Hello,

Which sort product is used on your system?

The informational output from a sort shows the product . . .

Re: Repro from sequential to VSAM file handeling the duplicate

PostPosted: Thu Aug 26, 2010 5:24 am
by ajuatsgp
Hi,
DFSORT is used?
Still I am confused how to get the desired output.As my output file is a VSAM file.
Please help thanks.

Re: Repro from sequential to VSAM file handeling the duplicate

PostPosted: Thu Aug 26, 2010 5:41 am
by Frank Yaeger
DFSORT can use a VSAM file as output. Why do you think it can't?

Re: Repro from sequential to VSAM file handeling the duplicate

PostPosted: Thu Aug 26, 2010 7:33 am
by ajuatsgp
Hi,
If there is no matching key it should simply add a new record to the VSAM file.
In case of duplicate keys It should add the COUNT(i.e, thes last 15 digits) of the input sequential file to that of the output VSAM file and the record in the VSAM file should be updated with new count.
Input seq file:
Organization . . . : PS
Record format . . . : FB
Record length . . . : 25

Output VSAM file:
KSDS key length: 10
KSDS key location: 0
Average record size: 25
Maximum record size: 25

Re: Repro from sequential to VSAM file handeling the duplicate

PostPosted: Thu Aug 26, 2010 7:47 am
by dick scherrer
Hello,

Can you tell me how can I get my desired output?
You need to post the exact specifics of your requirement.

It will be better if you add at least one more duplicate and show the complete content of the output vsam file after your process has run. For example - what should happen with input sequential data that does NOT have a matching key on the input vsam file? Is this to be bypassed or added to the output vsam file?

If there are any other "rules" you need to post these as well. Mention the dsorg and lrecl of the files.

Re: Repro from sequential to VSAM file handeling the duplicate

PostPosted: Thu Aug 26, 2010 8:08 am
by ajuatsgp
Hi,
If there is no matching key it should simply add a new record to the VSAM file.
In case of duplicate keys It should add the COUNT(i.e, thes last 15 digits) of the input sequential file to that of the output VSAM file and the record in the VSAM file should be updated with new count.
Input seq file:
Organization . . . : PS
Record format . . . : FB
Record length . . . : 25

Output VSAM file:
KSDS key length: 10
KSDS key location: 0
Average record size: 25
Maximum record size: 25


Please let me know if you need any more info...

Re: Repro from sequential to VSAM file handeling the duplicate

PostPosted: Thu Aug 26, 2010 11:10 am
by ajuatsgp
Hi Dick,

Any solution for my problem???