× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think you need to set COSEED to something vaguely random before you
start.  I combine the day number, job number and time as a start point
but there's probably a better way.

255a d BigNum          s             11  0
255a d SmallerNum      s              9  0

255a C                   If        Not SetSeed
     C                   TIME                    XXTMDT
255a C     XXSS          IFNE      0
255a
255a C     Z1JobN        Mult      XXMMSS        BigNum
255a C     BigNum        Div       XxDay         SmallerNum
255a
255a **  Need to use smallernum to control overflow as the max in
255a **  a 10i field is 2147483647
255a
255a c                   Z-Add     SmallerNum    Seed
255a c                   Else
255a C                   Z-Add     Z1JobN        Seed
255a C                   EndIF
255a C                   Eval      SetSeed = *On
255a C                   EndIf
255a
255a **  CEERAN0 generates a pseudo-random number between 0 and 1.
Factor
255a **  up to a 6 digit number once done.  Leave the seed for the next
call
255a
255a c                   CallB     'CEERAN0'
255a c                   Parm                    Seed
255a c                   Parm                    Number
255a c                   Parm                    Feedback         12

Cheers
Robin



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.