Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pasteur!ucbvax!AUDUCVAX.BITNET!SWANGER From: SWANGER@AUDUCVAX.BITNET Newsgroups: comp.os.vms Subject: RE: question on chaining images Message-ID: <8803201617.AA11429@ucbvax.Berkeley.EDU> Date: 15 Mar 88 21:08:00 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 32 > I am looking for a system service or run-time library routine that > will allow me to execute a second image. I want to do this in such > a way that the flow of control will pass entirely to the second image, > and will return to the first image at the calling point after the second image > completes. Neither CREPRC nor LIB$SPAWN seem to do this, which makes sense > since their purpose is to create another process altogether. I just want the > SAME process to start executing a second image. I'm sure I'm overlooking > something obvious... According to the VAX/VMS Run-Time Library Routines Reference Manual, the default action for LIB$SPAWN is to wait until the spawned command is finished before returning to the calling program. For example, if you wanted to execute the program SCULLEY.EXE from within the program OLSEN.EXE, and then wanted to continue running OLSEN at the next command when SCULLEY was finished, you could use the following command in your OLSEN source code (Fortran example given): istat = lib$spawn('RUN SCULLEY') When this command is executed, OLSEN will pause until SCULLEY is finished running. Then OLSEN will continue. --------------------------- JCL - The Big Lie ---------------------------------- David Swanger Academic Computing Services 200 L Building Auburn University, AL 36849 Telephone: 205-826-4813 |-----------------------------------------| | | SWANGER@AUDUCVAX (BITNET address) | My opinions are my own ... etc. | | | --------------------------------------------------------------------------------