HP3000-L Archives

June 2000, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
rollie amurao <[log in to unmask]>
Reply To:
rollie amurao <[log in to unmask]>
Date:
Fri, 30 Jun 2000 19:34:38 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
The idea of using the date/time stamp to generate a unique id/filename is
great but if you are concerned about duplicates (files created w/in the same
 min/second) then it might not ne kosher...

My idea is to use a "unique" filename server/command that uses a static
variable/counter to generate ... along the lines of this cmd file...

IF BOUND(CNTR) THEN
   SETVAR CNTR, (CNTR + 1)
ELSE
   SETVAR CNTR, 1
ENDIF
SETVAR X1, CHR(HPYEAR + 65)
SETVAR NEWFNAME, "!X1!HPDOY" + RHT("00"+"!CNTR",3)
ECHO !NEWFNAME
DELETEVAR X1

****
Converting the year to letter, (2000 as "A") ensures an alpha start till
2026...You can still figure out the create date easily (pseudo-julian).
Above will create 1-999 unique filenames a day - (expandable to 1-9999)

I hope this helps...

ATOM RSS1 RSS2