Creating Synonyms for JD Edwards EnterpriseOne
Before you can use the Adapter for JD Edwards EnterpriseOne, you must create synonyms for the data you will be reporting against using one of the data adapters that is supported on your platform, and set the paths required to access those synonyms:
- In the Windows environment, you can create synonyms using the Adapters for Db2, Oracle, or Microsoft SQL Server.
- In the IBM i environment, you can create synonyms using Db2.
Create Synonyms for JD Edwards EnterpriseOne
From the WebFOCUS Reporting Server browser interface or ibi Data Migrator desktop interface:
- Procedure
- Configure the adapter you wish to use to create synonyms for the JD Edwards EnterpriseOne data.
- Use the configured adapter to create synonyms for the JD Edwards EnterpriseOne tables you wish to use. During this process, you will select the tables for which you wish to create synonyms and specify the application in which the tables will be stored.
For details about configuration and synonym creation steps for supported data adapters, see Using the Adapter for Db2/Db2 Warehouse, Using the Adapter for Microsoft SQL Server, or Using the Adapter for Oracle.
Create Synonyms for JD Edwards EnterpriseOne Under IBM i
- Procedure
- From the WebFOCUS Reporting Server browser interface Application page, click Get Data.
- Double-click a Db2 connection.
The first of a series of synonym creation panes opens.
- Enter values for the parameters required by the adapter as described in Synonym Creation Parameters for JD Edwards Enterprise Under IBM i.
- After entering the parameter values, click Create Synonym.
The Status pane indicates that the synonym was created successfully. The synonym is created and added under the specified application directory.
Synonym Creation Parameters for JD Edwards EnterpriseOne Under IBM i
The following list describes the parameters for which you will need to supply values, and related tasks you will need to complete in order to create a synonym for the adapter. These options may appear on multiple panes. To advance from pane to pane, click the buttons provided, ending with the Create Synonym button, which generates the synonym based on your entries.
Select Synonym Candidates for Db2 (CON) Step 1
Restrict candidates for synonym creation based on the selected object type(s): Tables, Views, External SQL Scripts, and any other supported objects.
Choosing External SQL Scripts from the drop-down list enables you to represent an SQL Query as a synonym for read-only reporting. A Synonym candidate can be any file that contains one (and only one) valid SQL Query and does not contain end-of-statement delimiters (";" or "/") and comments.
Depending on the adapter, you can further restrict your search by choosing checkboxes for listed objects.
Type a string for filtering the Library (or Db2 Collection), inserting the wildcard character (%) as needed at the beginning and/or end of the string. For example, enter: ABC% to select tables or views whose owner IDs begin with the letters ABC; %ABC to select tables or views whose owner IDs end with the letters ABC; %ABC% to select tables or views whose owner IDs contain the letters ABC at the beginning, middle, or end.
Type a string for filtering the table, view, or object names, inserting the wildcard character (%) as needed at the beginning and/or end of the string. For example, enter: ABC% to select all tables, views, or objects whose names begin with the letters ABC; %ABC to select all whose names end with the letters ABC; %ABC% to select all whose names contain the letters ABC at the beginning, middle, or end.
Create Synonym for Db2 (CON) Step 2 of 3
Select the Cardinality checkbox to reflect the current cardinality (number of rows or tuples) in the table during metadata creation. Cardinality is used for equi-joins. The order of retrieval is based on the size (cardinality) of the table. Smaller tables are read first.
If the cardinality of the tables to be used in the application are dynamic, it may not be beneficial to choose this setting.
You can select the Build cluster using foreign keys checkbox to include within this synonym every table related to the current table by a foreign key. However, this option has been deprecated, as the recommended way to create a cluster is by using the Synonym Editor. The resulting multi-table synonym describes all of the foreign key relationships of this table.
On the IBM i platform, the One-part name checkbox is unchecked by default. The unchecked behavior generates a table name that includes the explicit name of the library containing the table. For example, if you specified a library on the first Create Synonym pane, a qualified name like the following is automatically created in the Access File:
TABLENAME=MYLIB/MYTABLE
With this explicit type of entry in the Access File, at run-time the library is directly located and searched for the table name. If you select the checkbox, the explicit library name is not stored in the metadata (Access File). When the synonym is generated, the library portion of the table name is omitted from the Access File, and appears as follows:
TABLENAME=MYTABLE
With this type of entry in the Access File, at run time the library path of the user is searched until the table name is located.
Only available when External SQL Scripts is selected from the Restrict objects type to drop-down menu. When selected, a SUBQUERY keyword is added to the Access File of the generated synonym. If the corresponding SQL string has valid syntax that can be used in the FROM statement of the generated SQL (what is known as a Derived Table), then the SQL SCRIPT will be processed as a subquery embedded into a FROM clause. This usage allows for more flexibility. For example, the synonym can be used as a target for a JOIN.
If the SQL SCRIPT has parameter markers, such as ? or :, or the syntax contains constructs that are invalid for a derived table, for example ORDER BY, then this keyword should not be selected. At runtime, if SUBQUERY=Y is present and it is determined that the SQL SCRIPT cannot be used in the FROM statement, the setting will be ignored, and a FOC1782 warning message will be issued. The default is selected (SUBQUERY=Y).
Select an application directory. The default value is baseapp.
If you have tables with identical table names, assign a prefix or a suffix to distinguish them. For example, if you have identically named human resources and payroll tables, assign the prefix HR to distinguish the synonyms for the human resources tables. Note that the resulting synonym name cannot exceed 64 characters.
If all tables and views have unique names, leave the prefix and suffix fields blank.
To change the data type mappings from their default settings, select this checkbox. The customizable mappings are displayed.
To specify that this synonym should overwrite any earlier synonym with the same fully qualified name, select the Overwrite existing synonyms checkbox.
Create Synonym for Db2 Step 3 of 3
The options are: YMD, YYMD, DMY, MDY, MDYY, DMYY, MYY,YYM. (YYMD is the default setting.) The selected format will be used only if the field is described as a DATE in the DataDictionary.
Select the Presumptive Joins checkbox to include additional DEFINEs (virtual fields) for presumptive join fields in the synonym.
The default setting is ON.
Select the Long Fieldname radio button (the default) to display the field descriptions as names on reports. Select the Short Fieldname radio button to use the JDE aliases as field names on reports. The default setting is Long Fieldname.
Enter the appropriate Language Code, which exists in the JDE F9292 file. (Leave the field blank for English.)
Select the UDC checkbox to ensure that UDC description fields are generated as DEFINEs (virtual fields) in the synonym. The default setting is ON.
Select the Combine UDC checkbox to Combine User Defined Code. The default setting is OFF.
Ensuring Master File Compatibility Between IBM i and Windows
Before you begin the configuration procedure, it is advisable to consider whether you have procedures that were designed to run on the IBM i platform, which you may wish to run in a Windows environment. If you anticipate this need, your first task is to synchronize the Master Files generated on Windows with those generated on IBM i using the amper variable &MFDCOMP in the jdegdinc.fex file.
The default variable setting is:
-DEFAULT &MFDCOMP='N';
To ensure matching field names on IBM i and Windows, revise the setting to:
-DEFAULT &MFDCOMP='Y';