Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

$$CCD^XLFUTL(): Append Check Digit

Reference Type: Supported, Category: Utility Functions, Integration Agreement: 2622

Description

This extrinsic function returns a number appended with a computed check digit. To check if the original number corresponds with the appended check digit, use the $$VCD^XLFUTL(): Verify Integrity API.

Format

  $$CCD^XLFUTL(x)

Input Parameters

x:

(required) Integer for which the check digit is computed.
REF: See "The Taylor Report" in Computerworld magazine, 1975, for the algorithm.
NOTE: This Check Digit algorithm is considered obsolete. Developers are advised to consider other alternatives to validate data integrity. Alternatives include using:

  • AES Encryption/Decryption: $$AESENCR^XUSHSH and $$AESDECR^XUSHSH.
  • Secure Hash Algorithm (SHA) hashing: $$SHAHASH^XUSHSH or $$SHAN^XLFSHAN for strings.
  • Other SHA hash APIs can be used to validate data integrity for: files: $$FILE^XLFSHAN or $$HOSTFILE^XLFSHAN; routines: $$ROUTINE^XLFSHAN; globals: $$GLOBAL^XLFSHAN; and messages: $$LSHAN^XLFSHAN.

NOTE: Please refer to "The Taylor Report" in Computerworld magazine, 1975, for the algorithm.

Output

returns:

Returns the number with appended check digit.

Example 1

>S X=$$CCD^XLFUTL(99889)

>W X
998898

Example 2

>S X=$$CCD^XLFUTL(7654321)

>W X
76543214


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: June 16, 2018

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.