KPG1_PSEED

Sets the PDA Random number seed

Description:

This routine sets the seed for the PDA random number routines to a non-repeatable value, and must be called prior to using any PDA random number routine. The seed is only set once in each process, and is set to a number which combines the process id and the current time.

The process id is included because the " time" system call (implemented by PSX_TIME) returns the time in seconds. On modern machines it is possible for an application to be called several times each second, resulting in the same seed being used each time if the seed is based only on the time.

Alternatively, a fixed seed can be used by assigning the seed value to environment variable STAR_SEED.

Invocation

CALL KPG1_PSEED( STATUS )

Arguments

STATUS = INTEGER (Given and Returned)
The global status.