Ron Hudson
2010-04-28 16:34:01 UTC
//MYLIB JOB CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),NOTIFY=HUDSON
//COMPILE EXEC FORTHC,REGION.FORT=384K
//FORT.SYSLIN DD DSNAME=MYLIB,DISP=(MOD,PASS)
//FORT.SYSABEND DD SYSOUT=A
//FORT.SYSIN DD *
C RANDOM NUMBER GENERATOR
FUNCTION IRND(ISEED)
IY = IABS(MOD(1103515245 * ISEED + 12345,2**15))
IRND = IY
RETURN
END
Well yes, it's a bog-standard linear congruential pseudo random number
generator.
This is only a semi free offer however (or should I say it's another
opportunity to
help the newbie)
I am trying to compile this so I can call it from other programs. I can run
the
above job without any errors, but in the listing I see
mylib deleted
and I don't see any new files in my catalog (but perhaps it would be better
if it were someplace "all my users" could access)
I even made a first attempt by editing the //fort.syslin which did not have
a
disposition parameter before.
Ron...
//COMPILE EXEC FORTHC,REGION.FORT=384K
//FORT.SYSLIN DD DSNAME=MYLIB,DISP=(MOD,PASS)
//FORT.SYSABEND DD SYSOUT=A
//FORT.SYSIN DD *
C RANDOM NUMBER GENERATOR
FUNCTION IRND(ISEED)
IY = IABS(MOD(1103515245 * ISEED + 12345,2**15))
IRND = IY
RETURN
END
Well yes, it's a bog-standard linear congruential pseudo random number
generator.
This is only a semi free offer however (or should I say it's another
opportunity to
help the newbie)
I am trying to compile this so I can call it from other programs. I can run
the
above job without any errors, but in the listing I see
mylib deleted
and I don't see any new files in my catalog (but perhaps it would be better
if it were someplace "all my users" could access)
I even made a first attempt by editing the //fort.syslin which did not have
a
disposition parameter before.
Ron...