From:	CSBVAX::MRGATE!GG.SPY@ISUMVS@SMTP  3-APR-1988 14:00
To:	ARISIA::EVERHART
Subj:	Re: Chaining Images (THE ANSWER)


Received: from CUNYVM.CUNY.EDU by KL.SRI.COM with TCP; Mon 28 Mar 88 08:09:13-PST
Received: from ISUMVS.BITNET by CUNYVM.CUNY.EDU ; Mon, 28 Mar 88 11:08:49 EST
Date:      Mon, 28 Mar 88 09:26:36 CST
To:        <INFO-VAX@KL.SRI.COM>
From:      "Dr. FrankenWylbur" <GG.SPY%ISUMVS.BITNET@CUNYVM.CUNY.EDU>
Subject:   Re: Chaining Images (THE ANSWER)

> From:         Carl J Lydick <carl@CitHex.Caltech.Edu>
> Subject:      RE: Chaining images... THE source
> Comments: To: SUTTON%BRANDEIS.BITNET@CitHex.Caltech.Edu,
>               info-vax@CitHex.Caltech.Edu
>
>  > I got a message a few minutes ago (I wonder how many days it will be before
>  > this message gets to people), saying that it is not possible in a practical
>  > sense to "chain images".  That is, "CALL" one image from another as  if  it
>  > were  just  a  subroutine.   I  didn't think it was possible either until a
>  > message came in referring everyone to the LIB$FIND_IMAGE_SYMBOL routine (my
>  > apologies  to  the  person  who  posted it, I don't remember your name).  I
>  > wanted to see if it REALLY did  what  the  manual  seemed  to  say  it  did
>  > (sometimes  the routine descriptions which don't include examples are vague
>  > or I'm simply too dumb to understand without an example).  I looked in  the
>  > Master  Index to see if there were any references to the routine other than
>  > the description in the RTL  manual.   There  were  none  and  therefore  no
>  > examples (I assume) in the manuals.
>
> I'm one of the people who referred you to LIB$FIND_IMAGE_SYMBOL.  Let me point
> out  again  that  this  works only with SHAREABLE images.  This means that you
> can't chain most images that are linked to be run via a command from  the  DCL
> level.   However,  I've  discovered  that  it is possible to run at least some
> shareable images via a DCL command; for example, TEST1, below, can be run that
> way, as well as by being called from TEST0).  Here's a complete example of how
> to use LIB$FIND_IMAGE_SYMBOL from a VAX C program, including  both the calling
> and the called program.
>

     [some C code omitted here]

  Since I did not see my previous response to this question, here goes again...

   There is a system service to map in a new image, it is called SYS$IMGSTA,
its use from user programs is UNSUPPORTED (but, would that stop the likes of
us?).  It is documented in "VMS Internals and Data Structures", lacking a copy
of that book, you can get a good idea of how to use it from the Pascal
definition file SYS$LIBRARY:STARLET.PAS.

John Hascall
Iowa State University Computation Center
GGUUU@ISUMVS.BITNET, GVJPH@ISUVAX.BITNET

