IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CRC checksum in DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Wed Nov 19, 2008 1:53 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Nov 19, 2008 2:06 am
Reply with quote

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
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Wed Nov 19, 2008 2:47 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Nov 19, 2008 2:59 am
Reply with quote

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
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Wed Nov 19, 2008 4:08 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 19, 2008 4:26 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Nov 19, 2008 8:03 am
Reply with quote

Hello,

Quote:
don't over-react
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 icon_smile.gif After all, that is the topic you asked about icon_wink.gif
Back to top
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Thu Nov 20, 2008 3:28 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 20, 2008 7:38 am
Reply with quote

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
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Thu Nov 20, 2008 11:38 pm
Reply with quote

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
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Fri Nov 21, 2008 12:18 am
Reply with quote

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
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Fri Nov 21, 2008 12:53 am
Reply with quote

thank you
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 21, 2008 4:33 am
Reply with quote

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 icon_wink.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Nov 21, 2008 7:10 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts SH256/MD5 Checksum in Mainframes JCL JCL & VSAM 14
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
Search our Forums:

Back to Top