Tutorial: Creating and Executing SQL Against IMS

Goal

Author SQL and execute it against a selected IMS database connection.

Steps

  1. In your IMS project within the IMS Projects view, create or open a .sql file using the Add SQL file option. This button is indicated by a file with a plus symbol.

You can write your own SQL query with assistance from the IMS Explorer extension, or paste in a prepared query.

  1. Select the IMS Connection button from the status bar to target the desired database for your SQL query.
  2. Execute the SQL from the editor. This can be done in the following ways:
  • Clicking the extension's execute SQL action, located in the top-right of the SQL editor
  • Right-click in the SQL editor and select Run All SQL in File
  • Highlight a portion of SQL you wish to execute and right-click, select Run Selected SQL query
  1. Select your IMS database connection to execute your SQL query on.

A notification is given indicating SQL has been executed. Upon completion of the results, the SQL query history view opens with the query status.

Tips

  • Use table views and object browsing to confirm column/segment names before running queries.
  • If a SQL query does not complete or if a connection is not found, ensure that a valid IMS database connection has been selected. If problems persist, check the IMS Explorer extension notifications during execution of the SQL query or consult console logs for further troubleshooting.