Creating a Reporting Object Which Uses a HOLD File

Suppose your company has a data warehouse and you need a Reporting Object that uses an extract from that data warehouse. In your Preprocessing Other component, you create a HOLD file from that data warehouse, and then you use that HOLD file in each Reporting Object component. You delete the HOLD file in the Postprocessing Other component so it is not mistakenly used again the next time the Reporting Object is used.

This task has the following steps:

  1. Create a HOLD file in the Preprocessing Other component.
  2. Create a new Join component with two Joins.
  3. Use the Report component to create a new report in InfoAssist.
  4. Delete the Join in the Postprocessing Other component.
  5. Run the Reporting Object, then view the object source to verify that the output is correct.

Top of page

Example: Creating a HOLD File With the Preprocessing Other Component
  1. Create a Reporting Object with the BASEAPP and IBISAMP selected as the application paths and the EMPLOYEE table selected as the MASTERFILE.

    For more information on creating a Reporting Object, see How to Create a Reporting Object.

  2. Right-click the Preprocessing Other component and select Edit.
  3. Type the following code:
    APP HOLD IBISAMP
    TABLE FILE EMPLOYEE
    PRINT EMPLOYEE.EMPINFO.DEPARTMENT AS 'NEWDEP'
    EMPLOYEE.EMPINFO.CURR_SAL AS 'NEWCURR_SAL'
    BY EMPLOYEE.EMPINFO.EMP_ID AS 'EMP_ID'
    BY EMPLOYEE.EMPINFO.HIRE_DATE AS 'NEWHIRE_DATE'
    ON TABLE HOLD AS WINFILE FORMAT FOCUS INDEX EMP_ID
    END
  4. Click the Save button, then close the text editor.
  5. To verify that the component works properly, select the Preprocessing Other component and click the Run button.

    The following output is produced:

    0 NUMBER OF RECORDS IN TABLE= 12 LINES= 12


Top of page

Example: Creating a New Join Component With Two Joins
  1. Double-click the Join component to open it.

    The Join component displays the EMPLOYEE table.

  2. Click the Add File button, then select the WINFILE table and click OK.
  3. Click the Add File button, then select the JOBFILE table and click OK.
  4. Click the Run Join button in the toolbar to verify the Join.

    The following output is produced in the Check dialog box:

    SET XRETRIEVAL=OFF
    APP HOLD IBISAMP
    TABLE FILE EMPLOYEE
    PRINT EMPLOYEE.EMPINFO.DEPARTMENT AS 'NEWDEP'
    EMPLOYEE.EMPINFO.CURR_SAL AS 'NEWCURR_SAL'
    BY EMPLOYEE.EMPINFO.EMP_ID AS 'EMP_ID'
    BY EMPLOYEE.EMPINFO.HIRE_DATE AS 'NEWHIRE_DATE'
    ON TABLE HOLD AS WINFILE FORMAT FOCUS INDEX EMP_ID
    END
    SET XRETRIEVAL=ON
    JOIN
    EMPLOYEE.EMPINFO.EMP_ID IN EMPLOYEE TO MULTIPLE WINFILE.SEG01.EMP_ID IN WINFILE
    TAG J1 AS J1
    END
    JOIN
    EMPLOYEE.PAYINFO.JOBCODE IN EMPLOYEE TO MULTIPLE JOBFILE.JOBSEG.JOBCODE
    IN JOBFILE TAG J2 AS J2
    END
  5. Click OK to close the Check dialog box.
  6. Close the component, clicking Yes to save the current changes.

Top of page

Example: Creating a Report With the Report Component
  1. Double-click the Report component.

    InfoAssist launches.

  2. In the Data pane, from the Measures/Properties segment, drag and drop the NEWCURR_SAL field onto the canvas.
  3. In the Data pane, from the Dimensions segment, drag and drop the EMP_ID field onto the canvas.
  4. In the Data pane, from the Dimensions segment, drag and drop the NEWHIRE_DATE field onto the canvas.
  5. In the Data pane, from the Dimensions segment, drag and drop the NEWDEP field onto the canvas.

    The report displays as a table with four columns.

  6. Close the component, saving your changes.
  7. Save the changes to the Reporting Object.
  8. To verify that the component works properly, right-click the Reporting Object and select Run.

    The report you created in InfoAssist appears in the browser.


Top of page

Example: Deleting the Join in the Postprocessing Other Component
  1. Right-click the Postprocessing Other component and select Edit.
  2. Type the following:
    ? JOIN
    JOIN CLEAR *
    ? JOIN
  3. Close the component, saving your changes.
  4. Save the changes to the Reporting Object.
  5. To verify that the Reporting Object works properly, select the object and click the Run button.

    The report you created in InfoAssist appears in the browser.

  6. Right-click the report webpage and select View source.
  7. Scroll to the bottom of the source window.

    The following comment displays:

    <!--
    0 NUMBER OF RECORDS IN TABLE= 12 LINES= 12
    0 NUMBER OF RECORDS IN TABLE= 12 LINES= 12
    0 HOLDING HTML FILE ON PC DISK ...
    JOINS CURRENTLY ACTIVE
    HOST                           CROSSREFERENCE
    FIELD        FILE      TAG     FIELD     FILE      TAG AS ALL WH
    -----        ----      ---     -----     ----      --- -- --- --
    EMPLOYEE.EM&gt;EMPLOYEE        WINFILE.SEG&gt; WINFILE J0 J0 Y N
    EMPLOYEE.PA&gt;EMPLOYEE        JOBFILE.JOB&gt; JOBFILE J1 J1 Y N
    0 NO JOINS CURRENTLY IN EFFECT
    -->


WebFOCUS