Previous Topic Next topic Print topic


To define an SQL call in Online Express

Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
  1. In Online Express, click File > Database Access. The Database Access Summary window appears.
  2. Click Edit > Create. The Attributes dialog box appears.
  3. From the Database Type drop-down list, click SQL for DB2 Option.
  4. If you want to change the call from a Query (default) to something else, click the Program Function drop-down list and click the program function you want to execute with the call. Program Functions are as follows:
    • Query - executes Obtain
    • Update - executes Modify
    • Add - executes Store
    • Delete - executes Erase
  5. If you want to specify a Subselect or Union query, click Details On and click the appropriate query type from the Query Type drop-down list. Query is the default.
  6. Click OK. The Record Selection dialog box appears, identifying all of the tables defined in your data view.
    Note: AppMaster Builder modifies your table names to tablename-REC, where tablename is the first eight characters of the original name.
  7. Check the boxes that identify the actions you want to perform on your data.
  8. Do one of the following:
    • If you have specified a Loop action and want to specify the order in which your loop calls group table rows for display:
      1. Click Next. The Add/Delete Fields for Order By dialog box appears.
      2. Check the fields you want to loop on.
      3. Click Next. The Order By dialog box appears.
      4. Specify the order in which your loop call groups table rows for display. This dialog box shows your table index column as the column on which to order your data. If your database definition contains multiple indexes, Online Express displays only the first index listed. If your call includes the Modify or Erase actions, the index must be unique.
      5. In the Loop Max field, type the maximum number of rows that the loop Obtains.
      6. In the Optimize For field, specify the number of rows stored in the buffer before sending data back to the program.
      7. Click Finish.
    • If you have not specified a Loop action and you want to select or delete table columns:
      1. Click Next. The Add/Delete Fields for Field Selection dialog box appears.
      2. Check the box that corresponds to each Field Name you want to select.
      3. Click Next. The Field Selection dialog box appears.
      4. From the Function drop-down list for each column, click the function you want to associate with each column.
      5. If you want to qualify one or more fields, click Next and check the boxes that correspond to the fields you want to qualify.
      6. Click Finish.
    • If you do not want to order your looping fields, select or delete table columns, or qualify fields, click Finish.
Note: If you specify a Union query type, see the Help topic To finalize a Union call in Online Express for information on completing the call.
Previous Topic Next topic Print topic