Alpha Video Training
Results 1 to 2 of 2

Thread: MSI_Plessey Check Digit

  1. #1
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default MSI_Plessey Check Digit

    This function returns the check digit required to print a MSI-Plessey barcode. I have seen conflicting instructions as to whether the start-stop characters are ( and ) or " and ". A complete string ready for printing with an MSI_Plessey barcode font would be

    "("+string to be coded+ply_ck(string to be coded+")"

    FUNCTION ply_ck AS N (AWG AS N )
    STNUM1 = ALLTRIM(STR(AWG,12,0))
    LNUM1 = LEN(STNUM1)
    ALTS = ""
    FOR I = LNUM1 TO 1 STEP -2
    ALTS = ALTS +SUBSTR(STNUM1,I,1)
    NEXT I
    ALTS = *REVERSE(ALTS)
    FMOD1 = VAL(ALTS)*2
    STNUM2 = ALLTRIM(STR(FMOD1,12,0))
    LNUM2 = LEN(STNUM2)
    ADD1 = 0
    FOR I = 1 TO LNUM2
    ADD1 = ADD1 + VAL(SUBSTR(STNUM2,I,1))
    NEXT I
    EVES = ""
    FOR I = LNUM1 - 1 TO 1 STEP -2
    EVES = EVES +SUBSTR(STNUM1,I,1)
    NEXT I
    EVES = *REVERSE(EVES)
    FMOD2 = VAL(EVES)
    STNUM3 = ALLTRIM(STR(FMOD2,12,0))
    LNUM3 = LEN(STNUM3)
    ADD2 = 0
    FOR I = 1 TO LNUM3
    ADD2 = ADD2 + VAL(SUBSTR(STNUM3,I,1))
    NEXT I
    TTL = ADD1 + ADD2
    ply_ck = if(mod(ttl,10)"0,10 - MOD(TTL,10),0)
    END FUNCTION

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: MSI_Plessey Check Digit

    Maybe not exactly right

    A complete string ready for printing with an MSI_Plessey barcode font would be

    "("+ALLTRIM(string to be coded)+PLY_CK(VAL(string to be coded))+")"

Similar Threads

  1. return of 2 digit dates
    By frank smith in forum Alpha Five Version 6
    Replies: 5
    Last Post: 09-19-2005, 08:24 AM
  2. How to set Alpha Five to diplay two-digit year
    By Howard G. Cornett in forum Alpha Five Version 5
    Replies: 3
    Last Post: 05-22-2003, 03:47 AM
  3. Can I force 7 digit Ph#, if 1st digit is filled?
    By Wanda Tucker in forum Alpha Five Version 5
    Replies: 7
    Last Post: 01-23-2003, 04:02 PM
  4. Calculate a check digit
    By Larry Harsh in forum Alpha Five Version 4
    Replies: 4
    Last Post: 05-16-2001, 06:32 AM
  5. adding a letter or digit a dos file
    By abe kravetz in forum Alpha Four Version 6 and Prior
    Replies: 3
    Last Post: 06-13-2000, 02:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •