Previous Page | Next Page

Language Reference


CALL RANDSEED( seed <, reinit> ) ;

The RANDSEED subroutine sets the initial random seed for the RANDGEN subroutine.

The input arguments to the RANDSEED call are as follows:


is a number to be used to initialize the RANDGEN random number generator.


specifies whether or not the random number stream can be reinitialized after the first initialization, within the same PROC IML session.

The RANDSEED call creates an initial random seed for subsequent RANDGEN calls. If RANDSEED is not called, an initial seed is generated from the system clock. This call is normally used when it is desirable to reproduce the same random number stream in different PROC IML sessions. The optional reinit parameter controls whether the seed will be reinitialized within the same PROC IML session. If it is set to one, identical seeds will produce the same random number sequence; otherwise a second call to RANDSEED within the same PROC IML session is ignored. Normally you should not specify reinit, or you should set it to zero to ensure that you are working with an independent random number stream within your PROC IML session.

Previous Page | Next Page | Top of Page