I need to come up with an equivalent in BASIC to UniVerse's type 18 file
hashing algorithm.  I understand that IBM treats this as proprietary but
I was hoping someone could shed some light on how I might pull this off
in BASIC.  The following code works fine until the length of the ID
exceeds eight characters ....


GROUP = 0
LEN.ID = LEN(ID)

FOR NC = 1 TO LEN.ID

        GROUP = GROUP * 10 + SEQ(ID[NC, 1])

NEXT NC

IF GROUP THEN GROUP = MOD(GROUP, FILE.MODULUS) + 1


Thanks.

Perry Taylor
Zirmed, Inc.

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for
the sole use of the intended recipient(s) and may contain confidential and
privileged information.  Any unauthorized review, use, disclosure or
distribution is prohibited. ZirMed, Inc. has strict policies regarding the
content of e-mail communications, specifically Protected Health Information,
any communications containing such material will be returned to the
originating party with such advisement noted. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies of
the original message.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to