|
Hi Arnaldo,
Try this:
INPUT PROGRAM.
- string rancode (a15).
- LOOP #I = 1 TO 40000.
- loop #j = 1 to 15.
- compute substr(rancode,#j,1) = substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',trunc(uniform(36))+1,1).
- end loop.
- END CASE.
- END LOOP.
- END FILE.
END INPUT PROGRAM.
EXE.
Greetings
Jan
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Arnaldo Ferrari Nasi
Sent: Monday, June 06, 2005 2:03 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: generating alphanumeric random numbers
>Do you mean a dataset of one case with one variable. The variable having a
>length of 40,000 characters?
I mean one variable and 40000 cases
>Also, the work 'univocal' in a sentence with the words 'random numbers' is
>confusing.
I mean random numbers they can't be repeated (they have to appear one time
each).
> And, the word 'alphanumeric' in a sentence with the words
>'random numbers' is also confusing.
read figures, digits, numerals
they are composed by some letters and numbers, appearing in random order
> You should also specify the role of
>case in this job.
>For instance, is 'AEIOE42DD89DUYW' acceptable?
>Is 'AeIOE42dD89DUYW' acceptable?
Yes, I prefer they are not case sensitive
'AEIOE42DD89DUYW' = 'AeIOE42dD89DUYW'
Thanks a lot.
Arnaldo.
>>Hi list,
>>I have to generate a variable of 40.000 alphanumeric univocal random
numbers.
>>No format constraint.
>>Any idea?
>>Many thanks.
>>Arnaldo
|