Alice barcodes are of type Code 39. They consist of a letter prefix (R for resources, B for borrowers) followed by a 5 digit unique numeric, an alpha check character, and finally a four digit library code. Eg B00001K0133 The algorithm for generating the check character from the 5 digit code is: 1. Sum the digits of the 5 digit numeric 2. Divide sum by 11 3. Calculate remainder 4. Substitute this remainder by an alpha characters: 1=K 2=L 3=M 4=N 5=P 6=F 7=W 8=X 9=Y 0=J 10=A eg for B12345 0133 sum=15 remainder=4 check char=N so code is: B12345N library code is 0133, so complete alice code is B12345N0133 Sample program The BASIC progam below allows the user to create a text file containing a sequence of Alice barcodes. See the REM statements for details. DLTechnology July 1997 REM Alice barcodes are Code 39 type, but use a non-standard pattern REM for the check digit. This wizard will create a text file of codes REM which may be imported into dLabel or dIndex to create Alice barcodes REM when the Code type within dLabel or dIndex is set to Code 39. start: CLS PRINT "Alice barcode wizard for dLabel and dIndex" PRINT PRINT "Alice barcodes consist of a prefix letter, followed by a 5 digit" PRINT "number, followed by a check character (calculated by this wizard)" PRINT "followed by a four digit library code" PRINT INPUT "Enter Prefix letter then press "; pf$ IF LEN(pf$) <> 1 THEN INPUT "invalid Prefix letter - press a key to restart", xx$ GOTO start END IF start2: INPUT "Enter 5 digit start of sequence value"; sq$ IF LEN(sq$) <> 5 THEN INPUT "invalid 5 digit start of sequence - press a key to restart", xx$ GOTO start2 END IF start3: INPUT "Enter 4 digit final code"; fc$ IF LEN(fc$) <> 4 THEN INPUT "invalid 4 digit final code - press a key to restart", xx$ GOTO start3 END IF PRINT INPUT "full pathname of file to contain codes"; filn$ REM REM check length of strings INPUT "Number of codes required "; n REM open file OPEN filn$ FOR OUTPUT AS #1 REM start sequence loop istart = VAL(sq$) FOR i = 0 TO n - 1 ino = istart + i istr$ = RIGHT$("00000" + MID$(STR$(ino), 2), 5)'string for sequence x = 0 FOR j = 1 TO 5 x = x + VAL(MID$(istr$, j, 1)) NEXT j y = x MOD 11 IF y = 0 THEN ch$ = "J" ELSE ch$ = MID$("KLMNPFWXYA", y, 1) END IF code$ = pf$ + istr$ + ch$ + fc$ PRINT #1, code$ NEXT i CLOSE #1 PRINT PRINT "File "; filn$; " created - use FILE IMPORT in dLabel or dIndex to import the data" PRINT "Select 'Spreadsheet' as the file type" END