Associating a source file or script with a Db2 connection

You can associate any local or remote COBOL, PL/I, or SQL file with a Db2 for z/OS connection by using the Db2 for z/OS > Associate Connection menu option. You can also use this menu option to change the Db2 connection that is associated with a file or to create a Db2 connection for the file.
  1. Open a file that contains SQL statements in the COBOL, PL/I, SQL, or z Systems LPEX Editor.
  2. Right-click in the editor and select Associate Connection or use the toolbar menu to select a connection:
    Associate Connection toolbar menu
  3. To choose or set a different connection for the source file, select a connection from the list.
  4. To add a new Db2® for z/OS® connection:
    1. Open the Db2 connection list.
    2. Select Create a Db2 for z/OS connection. The new connection wizard opens.
    3. From the Remote z/OS system list, select a z/OS system connection and click Next. The Db2 for z/OS Connection Properties window opens. For more information about setting properties for a new Db2 for z/OS connection, see the related information.
      Tip: If the z/OS system where the database is located is not in the list, select Create z/OS connection to add it. This action opens the New Connection wizard. For more information about creating a connection to a z/OS system, see the related information.