Well, the default seed is the hardware TOD, so there will appear to be a 
pattern on the first one.
Since I'm running at a different time of day at the moment:

      RANDY    EXEC     A1  V 130  Trunc=130 Size=7 Line=0 Col=1 Alt=
           |...+....1....+....2....+....3....+....4....+....5....+...
     00000 * * * Top of File * * *                                   
     00001  /* */                                                    
     00002  Address Command                                          
     00003  Do 5                                                    
     00004       'PIPE RANDOM | TAKE 3 | SPECS 1-* C2X 1 | CONSOLE'  
     00005       'CP SLEEP 1 SEC'                                    
     00006  End                                                      
     00007  Exit                                                     
     00008 * * * End of File * * *                                   

     randy   
     70375293
     5293FD8C
     FD8C0A1D
        
     70393B6C
     3B6D7295
     729698AC
        
     703B2410
     2410E65A
     E65A218A
        
     703D0CFE
     0CFE5BDB
     5BDCB235
        
The first random number shows a pattern (x'70' for me, simply because of the 
time of day).
Then the 2nd and 3rd numbers are more truly random as expected.

But, I put the above in an EXEC, and it appears than unlike Rexx Random(), 
where the seed is set/defaulted during the first call of the exec, and the 
results seem much more random from that point on, with PIPE, each new call to 
RANDOM within the same EXEC starts over with the hardware TOD as a seed again.
Even in a REXX Filetype, using CALLPIPE instead of PIPE, the hardware TOD is 
re-used each time.

For Rexx Random():  The random number generator is global for an entire 
program; the current seed is not saved across internal routine calls.           
              

The same (global for an entire program) cannot be said of PIPE RANDOM. 

-----Original Message-----
From: CMSTSO Pipelines Discussion List [mailto:[email protected]] On 
Behalf Of Frank M. Ramaekers
Sent: Tuesday, July 20, 2010 7:34 AM
To: [email protected]
Subject: Re: PIPE to generate random passwords

Hmmm....doesn't seem quite so random:

pipe random | take 3 | spec 1-* c2x | console 
5AA27BD9                                      
7BDAB76A                                      
B769F1DD                                      
Ready; T=0.01/0.01 09:32:00                   
pipe random | take 3 | spec 1-* c2x | console 
5AD1683C                                      
683D4015                                      
4015D662                                      
Ready; T=0.01/0.01 09:32:24                   
pipe random | take 3 | spec 1-* c2x | console 
5AD4C33A                                      
C33961EB                                      
61EC6E78                                      
Ready; T=0.01/0.01 09:32:26                   
pipe random | take 3 | spec 1-* c2x | console 
5AE27547                                      
75488DBE                                      
8DBD32F6                                      
Ready; T=0.01/0.01 09:32:33                   
pipe random | take 3 | spec 1-* c2x | console 
5AE6E218                                      
E2181A7E                                      
1A7EAC1A                                      
Ready; T=0.01/0.01 09:32:36                   

(First one always started with 5A).

 
Frank M. Ramaekers Jr.
 
 

-----Original Message-----
From: CMSTSO Pipelines Discussion List
[mailto:[email protected]] On Behalf Of Dave Jones
Sent: Tuesday, July 20, 2010 9:06 AM
To: [email protected]
Subject: Re: [CMS-PIPELINES] PIPE to generate random passwords

How's this, Frank?

pipe random | take 3 | spec 1-* c2x | console

The output will be eight random characters, you could of course chop them up 
into shorter strings....

DJ
On 07/20/2010 08:18 AM, Frank M. Ramaekers wrote:
> Is there a way (in PIPEs, of course) to generate random passwords.
(6-8
> random valid characters)
>
>
>
>   Frank M. Ramaekers Jr.
>
>
>
> Systems Programmer
>
> MCP, MCP+I, MCSE&  RHCE
>
> American Income Life Insurance Co.
>
> Phone: (254)761-6649
>
> 1200 Wooded Acres Dr.
>
> Fax: (254)741-5777
>
> Waco, Texas  76701
>
>
>
>
>
>
> _____________________________________________________
> This message contains information which is privileged and confidential
and is solely for the use of the
> intended recipient. If you are not the intended recipient, be aware
that any review, disclosure,
> copying, distribution, or use of the contents of this message is
strictly prohibited. If you have
> received this in error, please destroy it immediately and notify us at
[email protected].

--
Dave Jones
V/Soft
www.vsoft-software.com
Houston, TX
281.578.7544

_____________________________________________________ This message contains 
information which is privileged and confidential and is solely for the use of 
the intended recipient. If you are not the intended recipient, be aware that 
any review, disclosure, copying, distribution, or use of the contents of this 
message is strictly prohibited. If you have received this in error, please 
destroy it immediately and notify us at [email protected].

Reply via email to