CalculateModulo10CheckDigit

Swiss - Calculate Modulo 10 Check Digit

Minor Business Rule

Object Name: B0000285

Parent DLL: CALLBSFN

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of this business function is to calculate the check digit modulo 10 for a given number.


Setup Notes and Prerequisites


Special Logic

This function has two input parameters. Only one of them has to be passed. If both are passed, first 

one (mnNumberToCalc15d0) will be used.

The first parameter type is MATH_NUMERIC [15] 

The second parameter type is STRING [30]

The intention to have two input parameters it to allow calculating the Check Digit Modulo 10 for 

numbers up to 15 digits or up to 30 digits.

If the number that you want to calculate the Check Digit Modulo 10 is granter than 15 digits, you 

need to pass this number using the second parameter (szNumberToCalc30). If this is the case, before 

calling the BF, move your numeric value into a string variable (e.g. DESC) and pass this string variable 

into szNumberToCalc30.



Technical Specification

INPUT PARAMETERS:

By default the program will take the 15 digits number mnNumberToCalc15d0.
If 15 digits number is not passed, then it will use the 30 digits number szNumberToCalc30.

If both numbers come in blank, the program will return no values back and cErrorFlag is set to 

'E'.


OUTPUT PARAMETRES (return):

  cCheckDigitModulo10       

It will return the resulting Check Digit Modulo 10

  mnNumberWithCheckDigit15  

It will return the Numeric Number with the check digit
just if the number is 14 digits or less.


  szNumberWithCheckDigit30  

It will return the Number with the check digit just if the number is 30 digits or less.

  cErrorFlag

'E' - error, no parameters passed

'S' - The number with check digit is granter than 15                                      

                     characters, then only the return variable                            

                               szNumberWithCheckDigit30 will have a value. 

mnNumberWithCheckDigit15 will have  or .


'W' - The number with check digits is granter than 30 characters, then  

mnNumberWithCheckDigit15 and szNumberWithCheckDigit30 will have  value. Only cCheckDigitModulo10 will 

return a value.


' ' - Not errors found.


Data Structure

D0000285 - Calculate Modulo 10 Check Digit

Parameter NameData ItemData TypeReq/OptI/O/Both
mnNumberToCalc15d0MN15D0MATH_NUMERICOPTINPUT

This is a generic field used as a work field in Everest.

szNumberToCalc30DESCcharOPTINPUT

A description, remark, name, or address.

cCheckDigitModulo10EV01charOPTOUTPUT

An option that specifies the type of processing for an event.

mnNumberWithCheckDigit15MN15D0MATH_NUMERICOPTOUTPUT

This is a generic field used as a work field in Everest.

szNumberWithCheckDigit30DESCcharOPTOUTPUT

A description, remark, name, or address.

cErrorFlagEV01charOPTOUTPUT

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

None