Finding information on database development

Using database tools, you can import iSeries metadata (information about data) into your local project, sample the contents of the database, query the data with SQL statements, test the SQL statements, and embed the SQL statements into an ILE COBOL or ILE RPG program.

Prerequisites: The following tasks are prerequisites to the tasks on this page.
  1. Recommended: Establish up your own iSeries Data perspective.
  2. Required: Create an iSeries database connection.
After you have established a connection, you can create applications that use the data in various ways.
  1. Copy iSeries data definitions into your local project. This step is essential, because until you import the metadata (such as table and field definitions) into your local environment, you cannot use any of the workbench tools except those in the Data perspective. In the Database Explorer view, right-click the physical file (table) you want to import and click Copy to Project.

    See "Copying data definitions into a project" in the Help Contents, under Developing data access applications > Defining database objects.

  2. Sample the contents of the database by right-clicking on the table name in the Database Explorer view and selecting Sample Contents from the pop-up menu. This opens the DB Output view and displays the contents of the database table.

    See "Sampling the contents of a table" in the Help Contents, under Developing data access applications > Accessing and updating data.

  3. Query your iSeries data with SQL statements, using SQL query builder. Access the SQL query builder from the pop-up menu of the Statements folder in the Data Definition view.

    See "Working with SQL statements" in the Help Contents, under Developing data access applications > Accessing and updating data.

  4. Test the SQL statements in a local test environment. If you plan to embed the SQL statements into your ILE RPG, ILE COBOL or Java program, this step gives you the luxury of an isolated test environment so that you can perfect your SQL statement before embedding it. Execute a statement by right-clicking the statement name in the Data Definition view and selecting Execute.

    See "Executing an SQL statement" in the Help Contents, under Developing data access applications > Accessing and updating data > Working with SQL statements.

  5. Paste the SQL statements into your ILE COBOL, ILE RPG or Java program as embedded SQL. After you have tested an SQL statement, you can cut and paste it directly from the SQL source window of the SQL query builder into your source code in the Remote Systems LPEX Editor. This is even easier if you have defined your own iSeries Data perspective as described in the Prerequisites.

    See Embedding a statement in an application program.

You might want to accomplish the following additional tasks: