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 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.
- Open a file that contains SQL statements in the COBOL, PL/I, SQL, or z Systems LPEX Editor.
- Right-click in the editor and select Associate Connection or use the
toolbar menu to select a connection:

- To choose or set a different connection for the source file, select a connection from the list.
-
To add a new Db2® for z/OS® connection:
- Open the Db2 connection list.
- Select Create a Db2 for z/OS connection. The new connection wizard opens.
-
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.