Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check digit in cobol

Status
Not open for further replies.

awolfe76

Programmer
Jun 2, 2003
1
US
I have code given to me by a customer written in cobol. It is used to create a check digit at the end of a row of digits. It is either mod 7 or mod 10. I am not very familiar with cobol and was wondering if anyone had any examples of either so maybe I could compare the code and see which it is. Also i will be converting this to VB so if you have any examples of VB check digit it would be greatly appreciated.
 
If working storage contains a literal or numeric constant with a value of repeating 12's (..121212) most likely it's a Modulus 10 weighted. As there are many variants of Modulus 7 & 10, and a myriad of diverse Cobol coding styles possible, it's rather risky to id from source code alone without a good working knowledge of the language. I highly recommend that you obtain further detail from the client. If not doable, at least obtain a significant data sample containing known good check digits, then use "process of elimination" to determine the type.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top