Creating IMS connections

Overview

The IMS Explorer for VS Code extension allows you to create and manage IMS database connections directly within Visual Studio Code. Use the following steps to create a new IMS database connection using the IMS Connections view.

Creating an IMS database connection

Step 1. Open the IMS Connections view

  1. If it is not already, open the IMS Connections from the activity bar.
  2. The tree view displays existing connections and folders.

Step 2. Create a new IMS database connection

  1. In the IMS Connections view, click the Add IMS Connection(s) button. This is indicated with a plus symbol.
  2. Select the type of IMS database connection or click Add IMS DB Connection.
  3. Specify a name for the new database connection.
  4. The ims.connections.json project file opens and contains the new database connection contents.

The following example shows contents for a newly created ims.connections.json:

{
  "profiles": {
    "imsdb": {
      "databaseConnectionName": {
        "dataStoreServer": "",
        "portNumber": 0,
        "databaseName": ""
      }
    }
  },
  "autoStore": true
}
  1. Provide the remaining information for dataStoreServer, portNumber, and databaseName. Save your changes.
    • dataStoreServer: The name or IP address of the data store server (IMS Connect)
    • portNumber: The TCP/IP server port number to be used to communicate with IMS Connect
    • databaseName: The location of the database metadata representing the target IMS database

The database connection is shown in the IMS Connections view. You may be prompted to enter a password to authenticate your IMS database connection.

Step 3. Verify and use the connection

  • Click the Connect button in the VS Code status bar to choose or verify the active connection. This button is indicated by a link icon.

Successful connections will be indicated in the IMS Connections view with a green database icon.

Creating an IMS command connection

An IMS command connection is used to execute IMS type-1 and type-2 commands against an IMS system. Command connections are configured separately from database connections and require the IMS Connect host and port for the target IMS system.

Step 1. Open the IMS Connections view

  1. Open the IMS Connections view from the activity bar.

Step 2. Add a command connection

  1. Click the Add IMS Connection(s) button (plus symbol).
  2. Select Add IMS Command Connection.
  3. Specify a name for the new command connection.
  4. The ims.connections.json file opens with a new entry under the imsconnects profile.

The following example shows a basic command connection entry:

{
  "profiles": {
    "imsconnects": {
      "myCommandConnection": {
        "dataStoreServer": "imshost.example.com",
        "portNumber": 9989,
        "imsId": "IMS1",
        "imsPlexName": "PLEX1"
      }
    }
  }
}
  1. Provide values for the following properties and save your changes.
    • dataStoreServer: The hostname or IP address of the IMS Connect server
    • portNumber: The TCP/IP port number used to communicate with IMS Connect
    • imsId: The identifier of the target IMS system
    • imsPlexName: The name of the IMS plex the target IMS system belongs to

Step 3. Use the command connection

Once the command connection is configured, it can be selected when executing commands from a Commands folder in an IMS project. See Executing IMS Commands for more information.

Multi-factor authentication

When connecting to an IMS database that requires multi-factor authentication (MFA), you are prompted to provide an MFA or TOTP token. The connection is established after the token is successfully validated.

Reconnecting to an active connection

If you modify an IMS connection that is currently in use, a notification is provided allowing you to re-establish the connection.

Optional: Configuring SSL certificates

SSL certificate attributes can be added to a database profile in ims.connections.json to establish a secure connection to IMS. For full attribute details, see Configuring IMS connections.

{
  "profiles": {
    "imsdb": {
      "databaseConnectionName": {
        "dataStoreServer": "",
        "portNumber": 0,
        "databaseName": "",
        "sslConnection": true,
        "sslKeyStoreLocation": "/path/to/keystore.jks",
        "sslTrustStoreLocation": "/path/to/truststore.jks",
        "sslKeyStorePassword": "<keystore-password>",
        "sslTrustStorePassword": "<truststore-password>",
        "sslSecureSocketProtocol": "TLS"
      }
    }
  }
}