Re: Anyone need a random number generator?
Ron Hudson <[email protected]>
| Newsgroups | gmane.comp.emulators.turnkey-mvs |
|---|---|
| Message-ID | <[email protected]> |
Hi Carlos I am not sure what to do with your suggested code, does it go at the end of my deck? FORTHCL has a LKED step built in, but parts may need overrides. The code from FORTHCL is here: http://www.jaymoseley.com/hercules/compiling/cprocs4.htm#FORTHCL I do see that I need to end my fortran code with a '//' On Wed, Apr 28, 2010 at 10:40 AM, Carlos Aguilera <[email protected]>wrote: > > > You Need a linkage editor step like > > > > //LK1 EXEC PGM=IEWL,PARM='MAP,RENT,REUS,REFR,NCAL',COND=(0,LT) > > //PRINT DD SYSOUT=* > > //IN DD DSN=mylib,DISP=(OLD,DELETE) > > //SYSLMOD DD DISP=SHR,DSN=linklib.LIB <<=== LINK TARGET > > //SYSUT1 DD UNIT=VIO,SPACE=(TRK,(5,5)) > > //SYSLIN DD * > > NAME PDS85(R) <<=== LOADMOD name > > > > > > > > Carlos Aguilera > > > ------------------------------ > > *From:* [email protected] [mailto:[email protected]] *On > Behalf Of *Ron Hudson > *Sent:* Wednesday, April 28, 2010 1:00 PM > *To:* [email protected] > *Subject:* Re: [turnkey-mvs] Anyone need a random number generator? > > > > > > So I need to replace "forthc" in the compile line with "forthcl" ? > > And that will produce an object file that can be linked in to other > programs at their > compile time? > > On Wed, Apr 28, 2010 at 9:52 AM, Mike Stramba <[email protected]> > wrote: > > > > Your JCL doesn't have any link edit content, so the executable or the > object is not going to be written anywhere. > > http://www.jaymoseley.com/hercules/compilers/syscpk.htm > > http://www.jaymoseley.com/hercules/compiling/compile.htm > > > > On 4/28/10, Ron Hudson <[email protected] <hudson.ra%40gmail.com>> > wrote: > > //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... > > > > > >