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:
- Create a HOLD file in the Preprocessing Other component.
- Create a new Join component with two Joins.
- Use the Report component to create a new report in InfoAssist.
- Delete the Join in the Postprocessing Other component.
- Run the Reporting Object, then view the object source to verify
that the output is correct.
Example: Creating
a HOLD File With the Preprocessing Other Component
- 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.
- Right-click the Preprocessing Other component and select Edit.
- 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
- Click the Save button, then close the
text editor.
- 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
Example: Creating
a New Join Component With Two Joins
- Double-click
the Join component to open it.
The Join component displays the
EMPLOYEE table.
- Click the Add File button, then select
the WINFILE table and click OK.
- Click the Add File button, then select
the JOBFILE table and click OK.
- 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
- Click OK to close the Check dialog box.
- Close the component, clicking Yes to
save the current changes.
Example: Creating
a Report With the Report Component
- Double-click the
Report component.
InfoAssist launches.
- In the Data pane, from the Measures/Properties segment, drag
and drop the NEWCURR_SAL field onto the canvas.
- In the Data pane, from the Dimensions segment, drag and drop
the EMP_ID field onto the canvas.
- In the Data pane, from the Dimensions segment, drag and drop
the NEWHIRE_DATE field onto the canvas.
- 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.
- Close the component, saving your changes.
- Save the changes to the Reporting Object.
- 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.
Example: Deleting
the Join in the Postprocessing Other Component
- Right-click the Postprocessing Other component and select Edit.
- Type the following:
? JOIN
JOIN CLEAR *
? JOIN
- Close the component, saving your changes.
- Save the changes to the Reporting Object.
- 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.
- Right-click the report webpage and select View source.
- 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>EMPLOYEE WINFILE.SEG> WINFILE J0 J0 Y N
EMPLOYEE.PA>EMPLOYEE JOBFILE.JOB> JOBFILE J1 J1 Y N
0 NO JOINS CURRENTLY IN EFFECT
-->