Browse Prior Art Database

Use of Base 36 Numbering for Creating Unique File Names

IP.com Disclosure Number: IPCOM000101170D
Original Publication Date: 1990-Jul-01
Included in the Prior Art Database: 2005-Mar-16
Document File: 3 page(s) / 91K

Publishing Venue

IBM

Related People

Diedrich, RA: AUTHOR

Abstract

There is often a need to automatically generate a unique name for a computer file or library. While the system date and time can be used to generate a unique string, that string is often too long for a file name. One solution is to use parts of the string to minimize the probability of collisions. Described is a technique which allows the contents of the entire date-time string to be contained in a file name.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 55% of the total text.

Use of Base 36 Numbering for Creating Unique File Names

       There is often a need to automatically generate a unique
name for a computer file or library.  While the system date and time
can be used to generate a unique string, that string is often too
long for a file name.  One solution is to use parts of the string to
minimize the probability of collisions.  Described is a technique
which allows the contents of the entire date-time string to be
contained in a file name.

      A file name can be generated that contains all the information
from the computer date-time stamp.  The method of generating the file
name is:
1.  Compute the number of milliseconds since a fixed date and time.
This does not have to be completely accurate as long as the number
generated is unique.  See Fig. 1 for a sample algorithm.
2.  Convert this number to a base 36 number (0..Z) Fig. 2 shows an
example PL/I program for generating a 6- digit base 36 number for the
number of milliseconds since midnight.  Fig. 3 shows an example PC
Pascal program for generating an 8-digit base 36 number for the
number of hundredths of a second since January 1, 1980.

      Since most computer systems allow file names to contain both
numbers and letters, the technique is generally applicable.

      Fig. 3 illustrates various combinations of dates and times and
the length of the resulting file name.  If the computer operating
system requires that a file name start with a letter, the base 3...