View previous topic :: View next topic
|
Author |
Message |
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
Does DFSORT has anything like this?
en.wikipedia.org/wiki/Cyclic_redundancy_check
with the crc checksum each record in a file gets a unique value
When you change the file and run the crc checksum again, you can see quickly which records have been changed, because there checksum is different |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
DFSORT does not have a built-in function like that. However, DFSORT can do arithmetic so perhaps you could "roll your own" (or perhaps not). |
|
Back to top |
|
|
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
Then you should know the algorithm inside the CRC checksum, I think Frank. Unfortunately I don't know.
I will go on searching
thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Then you should know the algorithm inside the CRC checksum, I think Frank. |
That makes no sense whatsoever. . .
Why should Frank know an algorithm that is not used in his product?
Do you know what a crc is? It was typically a hardware feature. . . .
If all you want is a check-digit, you can write your own. . . |
|
Back to top |
|
|
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
don't over-react
maybe i shhould have said: "Then I should know ... ."
Is a check digit the same?
I want to compare the file of today with yesterday and see if something is changed |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
here is a link to a bit of CRC philosophy
www.geocities.com/SiliconValley/Pines/8659/crc.htm
the objective of a check digit is the same..
but the algorithm is quite different and does not to obey a standard
for example check digits are of the general form...
given that a number is
D1 D2 D3 .... Dn 0 < Dx < 9
the the check digit(s) is/are usually calculated by
( D1*M1 + D2*M2 + D3*M3 + ... + Dn*Mn ) MODULO M
0 < Mx < 9 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
My reply wasn't/i didn't. Your reply was technically off base and appeared to be more than just a bit rude. This will often receive a similar reply.
Quote: |
maybe i shhould have said: "Then I should know ... ." |
Maybe, but i don't know why you should have known either After all, that is the topic you asked about |
|
Back to top |
|
|
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
Dick,
you say : If all you want is a check-digit, you can write your own. . .
How do I write a general check-digit? If I want to compare two records of FB 80? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I am probably mis-understanding something, but if you have 2 sets of records that do not already have a check-digit, is there a reason to use something other than SUPERC?
If the records already have a check-digit. . . ?
As i mentioned, i am probably mis-understanding something. . . |
|
Back to top |
|
|
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
the records don't have a chkdigit
superc is not allowed in production
I need to know which records have been changed |
|
Back to top |
|
|
Alain Benveniste
New User
Joined: 14 Feb 2005 Posts: 88
|
|
|
|
revdpoel,
Did you go to the "Smart DFSORT Tricks" paper at:
Use [URL] BBCode for External Links
and took a look at:
Create files with matching and non-matching records
You could find your solution ...
Alain |
|
Back to top |
|
|
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
thank you |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
FWIW, posting a requirement is usually more productive than posting a question about some potential solution for an undefined requirement.
I suspect that had the question originally been about how to compare 2 files rather than about implementing check digit/crc logic, Frank would have originally replied with something quite similar to what Alain posted.
I only mention this as it might have saved you couple of days |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Excellent point, Dick.
This kind of thing seems to happen quite often. Somebody gets a notion in their head about how something could be done and asks the wrong question leading to confusion and wasted time. Much better to describe the requirement in detail with examples so the "best" solution can be suggested. |
|
Back to top |
|
|
|