RE: Anyone need a random number generator?

"Carlos Aguilera" <[email protected]>
Newsgroups gmane.comp.emulators.turnkey-mvs
Message-ID <F92B77723AA141E78F44F702EC770C4F@carlospvwynf59>
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 <mikestramba@
<mailto:[email protected]> gmail.com> 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.jaymosel
<http://www.jaymoseley.com/hercules/compilers/syscpk.htm>
ey.com/hercules/compilers/syscpk.htm

http://www.jaymosel
<http://www.jaymoseley.com/hercules/compiling/compile.htm>
ey.com/hercules/compiling/compile.htm



On 4/28/10, Ron Hudson <hudson.ra@gmail. <mailto:hudson.ra%40gmail.com> 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...
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.