Perry, in Unidata there is the RECORD command which will return the group
number to which a record will hash. Unidata does not support type 18 files
so I don't know what you will have access to in Universe. If the command
exists, you could create and empty file with the appropriate modulo and then
execute the RECORD command against this file with whatever aid you choose to
use. I can't speak for the overhead in executing this command repeatedly.

Rich Sammartino
 
Richard Sammartino
Systems Analyst
School District of Philadelphia
440 N Broad Street
Philadelphia,  Pa 19130
Phone: (215) 400-5086
Fax:   (215) 400-4411 


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Perry Taylor
Sent: Wednesday, February 13, 2008 9:00 AM
To: u2-users@listserver.u2ug.org
Subject: [U2][UV] Type 18 File Hashing Algorithm

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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to