MVX CONNECT


The IMFEXEC MVX CONNECT command creates a new channel through a MainView Explorer session that allows the EXEC to interact with MainView products.

The token for this connection is returned in the channelName variable that is specified.

You must use this command as the first MVX command in an EXEC. Also, you must have a MainView Host Server task available and running somewhere in your IP network to establish a connection.

Command

Parameters

MVX CONNECT

channelName

PORT(nnnnn)

[HOST(hostName)]

[MSG | NOMSG]

The following table describes the parameters:

Parameter

Function

Notes

CHANNEL

specifies the name of a local variable that receives the identification token for the connection

1 to 32 alphanumeric characters

This variable name is used by other IMFEXEC MVX statements.

PORT

specifies the IP port number associated with the MVX Host Server to which the EXEC is connecting

1 to 5 digit port number

HOST

specifies the host name or IP address of the MVX Host Server to which the EXEC is connecting

optional

Specify a valid host name or V4 IP address that locates the MVX Host Server that you want to use. If you do not specify a value, the value of LOCAL is used.

Example

  • HOST(116.78.19.25)
  • HOST(LOCAL)
  • HOST(SYSTEMA)

MSG | NOMSG

specifies whether any diagnostic messages are written to the journal for each IMFEXEC MVX command issued through this connection

optional

MSG: Diagnostic messages for each IMFEXEC MVX command issued within this connection are written to the journal.

NOMSG: No diagnostic messages for each IMFEXEC MVX command issued within this connection are written to the journal (default).

The messages (if any) are also returned in variables LINE.0 through LINE.xx no matter what value is used here.

BMC recommends using the MSG keyword when you are first trying to create an EXEC, which enables you to receive diagnostic messages. BMC recommends using the NOMSG keyword when you are ready to move the EXEC into production.

Condition codes are listed in the following table:

Value

Description

0

A new channel connected successfully and the local variable received the identification token for the connection.

8

Due to an error, a channel did not connect.

16

During parsing, a syntax error was detected for one of the following reasons:

  • invalid keywords
  • missing channel parameter

20

Due to an error, socket initialization failed.

24

Due to an error, socket GETHOSTID failed.

28

Due to an error, socket SOCKET command failed for control session.

32

Due to an error, socket GETHOSTBYNAME command failed for control session.

36

Due to an error, socket SOCKET command failed for data session.

40

Due to an error, socket CONNECT failed for session; PORT number is probably invalid.

44

Due to an error, socket FCNTL failed for data session.

48

Due to an error, opening handshake has failed.

52

Due to an error, the command returned invalid or unexpected XML during the opening conversation.

56

Due to an error, socket, the command returned unexpected or invalid data during the opening handshake.

60

Due to an error, socket, the LOGON failed command.

Example

This example shows an EXEC that requests a new channel for subsequent IMFEXEC MVX requests. This example command connects to a MainView Host Server task listening on TCP/IP port 3940 and running on the local machine. The token for this channel is placed into the variable CHANNUM.

'IMFEXEC MVX CONNECT CHANNUM MSG PORT(3940) HOST(LOCAL)'

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*