| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (7 out of 10)

Starting and Connecting to the Foreign Image

To use a foreign image once it exists, the image must be started as a process, and G2 must connect to the foreign image. The two ways to start a foreign image are:

Starting the Foreign Image as an External Process

To start the foreign image as a separate process:

The sample commands associate the operating system UNIX and Windows NT with the network type TCP/IP, and OpenVMS with DECnet. On some platforms, the opposite network type is also available. For example, entering a numeric-only value after fgntest.fgn directs the foreign image to use a TCP/IP network connection type. Entering another value, such as a series of alphanumeric characters, causes the image to use a DECnet network connection.

Connecting to an External Process Foreign Image

If you start a foreign image as an external process, you must connect to it from within G2 before using the foreign image.

To connect to a foreign image that is an external process:

  1. Pause G2 to be able to get to the Connect to Foreign Image menu choice.

  2. Choose:

    G2 displays the Text Editor with the statement Connect to Foreign Image, followed by a path name.

  3. Enter Control + x to remove the current text in the Editor and to display a set of prompts.

  4. Selecting the prompts, enter this command:

    and complete the connection-specification.

    The syntax for connection-specification to connect to a foreign image over a DECnet or TCP/IP connection is identical to the syntax for the ICP-connection-specification attribute of a G2 data interface object. For more information about this syntax, see Defining the Connection Details.

    The values you enter for the connection-specification arguments are determined by the values you used to start the foreign image process, as described in the previous section Starting the Foreign Image as an External Process.

Starting a Foreign Image From Within G2

You can start a foreign image from within G2.

To start a foreign image:

  1. Pause G2 to be able to get to the Connect to Foreign Image menu choice.

  2. Choose:

    G2 displays the Text Editor with the statement Connect to Foreign Image, followed by a path name.

  3. Enter the path name for the foreign image file so that the command appears as:

    where foreign.fgn is the name of the foreign image file, including a path if necessary. For example, to start the sample file created here, enter a command such as:

    Connecting to a foreign image from within G2 in this way starts the image and connects to it.

Connecting to a Foreign Image with a G2-Init File

Further, you can add a connect to external foreign image command to an initialization file as long as you arrange for the image to be running by the time G2 issues the connect to external foreign image command. For information about using an initialization file, see Using an Initialization File.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (7 out of 10)

Copyright © 1997 Gensym Corporation, Inc.