Managing Metadata: Application and File Displays
By Art Greenhaus and Pam Haas
WebFOCUS developers need to know about the business information with which they are working where it has come from and what its characteristics are. WebFOCUS metadata interrogation capabilities give developers the ability within a WebFOCUS ad hoc report development environment to access and
display existing metadata layers from any data or application, even third-party tools, and can include, for example, data created and stored in an ETL solution, a data mart layer or proprietary enterprise source files. This functionality gives developers more insight into their information through the display of
metadata, ranging from application to file, field, and field-level descriptions located anywhere in the enterprise. Developers can access, pull and analyze descriptive information about any field, including calculated fields. The display plug-in enables this when they click on or hover over the data in question.
Display Options
You can display metadata information in WebFOCUS in two ways. To display metadata in WebFOCUS Quick Query, simply hover over the data in question to see the metadata. When using Report Assistant, click on the information to access and view field descriptions, view and change selection criteria,
select viewing options for the selected fields, and select join and report options. The metadata information accessed can be saved for future use.
Customizing the Display of Metadata
As of WebFOCUS 5.2.6, you can also customize the display of applications, files and field descriptions by placing FOCUS selection syntax (IF and WHERE commands) in FEX files that WebFOCUS uses when requesting a list of applications, files, or fields. You
then declare variables that point to the FEX files containing the selection syntax.
WebFOCUS now provides the following four variables:
 |
&&IBI_IF_APPS: can be set to a file containing syntax that defines which applications are displayed. The syntax is normally WHERE or IF selection statements on the value of the APP NAME attribute. |
 |
&&IBI_IF_FILE: can be set to a file containing syntax that defines which Master Files are displayed. The syntax is normally WHERE or IF selection statements on the value of the NAME or REMARKS attributes. |
 |
&&IBI_IF_FLDS: can be set to a file containing syntax that defines which fields are displayed. The syntax can be WHERE or IF selection statements on different field attributes, including the following: NAME,
FILENAME (as TBNAME), ALIAS, DESCRIPTION, or USAGE. |
 |
&&IBI_EXTDESC: can be set to a file containing syntax that defines how descriptions set in external files are displayed. This may involve creating a join from a selected Master File to an external file containing descriptions for fields in the Master File. |
The variables can be set in either the WebFOCUS Client or the WebFOCUS Reporting Server.
To set variables on the server, define variables at the end of the server profile:
C:\ibi\srv52\wfs\etc\edasprof.prf
Example:
-SET &&IBI_IF_FILE=
- 'C:\FocExcludes\excludeapps.fex';
-SET &&IBI_IF_FILE=
- 'C:\FocExcludes\excludefiles.fex';
To set variables on the WebFOCUS Client, define variables in the site.wfs file:
C:\ibi\client52\wfc\etc\site.wfs
In site.wfs, you must use the \ character to escape characters such as & and \. If you define multiple variables, you must start each variable on a new line, indicated by \n. The variables are
stored in the WFS variable _site_profile. To use multiple lines in the WFS file, end all but the last with the continuation character \\=. The section defining the variables must begin with the _site_profile line shown here:
_site_profile = \\=
\n-SET \&\&IBI_IF_FILE= \\=
\n- 'C:\\FocExcludes\\excludeapps.fex'; \\=
\n-SET \&\&IBI_IF_FILE=
\n- 'C:\\FocExcludes\\excludefiles.fex';
If you change variable settings in site.wfs, you must restart your Web and/or application servers for them to take effect. Changing variables in edasprof.prf does not require a restart.
Note: A variable set on the server is overridden by a variable set in WebFOCUS Client. The files containing syntax can be located anywhere and have any name you choose. However, avoid names and directories with spaces. Placing the files outside of the root ibi directory is convenient for using them when you upgrade
or reinstall. Examples in this document use the following directory:
C:\FocExcludes
If a variable is defined, the contents of its file are applied when WebFOCUS requests a list of applications, files or fields. If a variable is not defined, all applications, files, or fields are returned. Note: If you are unfamiliar with FOCUS syntax, see the Creating Reports With WebFOCUS Language manual.
Customizing the Display of Applications
The &&IBI_IF_APPS variable lets you specify a file that can limit which applications are displayed in WebFOCUS Development tools. For example, you can stop the ibisamp directory from appearing in Developer Studio or Managed Reporting.
To customize which applications appear, create a FEX file in a text editor and specify WHERE or IF selections on the value of the APPNAME attribute. For example, you can create a file called excludeapps.fex and enter the
following to hide the IBISAMP application:
WHERE APPNAME NE 'ibisamp'
Be sure to use the correct case for the directory.
Go to the following page on your Web server to run an ad hoc procedure to test your syntax:
http://webserver/ibi_html/homepage/adhoc.htm
Enter the following to test your file:
APP ENABLE
APP LIST HOLD
TABLE FILE FOCAPPL
PRINT APPNAME
-INCLUDE path_to_file
END
where:
path_to_file is the full path to the file containing your syntax, as seen from the data server.
Click Run. A list of desired applications appears if your syntax is correct. If not, troubleshoot accordingly.
If your syntax is correct, edit edasprof.prf or site.wfs to declare and set the &&IBI_IF_APPS variable to the FEX file you just created.
Example:
-SET &&IBI_IF_APPS=
- 'C:\FocExcludes\excludeapps.fex';
Customizing the Display of Files
The &&IBI_IF_FILE variable lets you specify a file that can limit which files are displayed in WebFOCUS Development tools. For example, you can hide Master Files for sample data, including GGORDER, GGPROD, and GGSALES.
To customize which files appear, create a FEX file in a text editor and specify WHERE or IF selections on the value of the NAME or REMARKS field. For example, create a file called excludefiles.fex and
enter the following to hide files that begin with gg*:
WHERE NAME NOT LIKE 'GG%'
Use upper case for file names regardless of their case in the file system.
Go to the following page on your Web server to run an ad hoc procedure to test your syntax:
http://webserver/ibi_html/homepage/adhoc.htm
Enter the following to test your file:
SQL FMI SET FILECASE UPPER
TABLE FILE SYSTABLE
PRINT NAME
-INCLUDE path_to_file
END
where:
path_to_file is the full path to the file containing your syntax, as seen from the data server.
Click Run. A list of desired files appears if your syntax is correct. If not, troubleshoot accordingly.
If your syntax is correct, edit edasprof.prf or site.wfs to declare and set the &&IBI_IF_FILE variable to the FEX file you just created.
Example:
-SET &&IBI_IF_FILE=
- 'c:\FocExcludes\excludefiles.fex';
Customizing the Display of Fields
The &&IBI_IF_FLDS variable lets you specify a file that can limit which fields appear in WebFOCUS Development tools. You can hide fields containing sensitive date, content that cannot be displayed (concatenated fields like an alpha for JOIN
purposes), or intermediate fields (fields to calculate other fields (unsigned packed bytes). For example, you can hide the DEALER_COST field in the sample car.foc database.
To customize which fields are displayed, create a FEX file in a text editor and specify WHERE or IF selections on the value of field attributes such as NAME, ALIAS, DESCRIPTION, or USAGE. For example, create a file called
excludefields.fex and enter the following to hide the DEALER_COST field of car.foc:
WHERE NAME NE 'DEALER_COST'
Go to the following page on your Web server to run an ad hoc procedure to test your syntax: http://webserver/ibi_html/homepage/adhoc.htm
Enter the syntax similar to the following to test your file:
TABLE FILE SYSCOLUM
PRINT NAME ALIAS COMPUTE DESCRIPTION/A3000 = REMARKS;
-* any other fields needed
IF TBNAME EQ testfile
ON TABLE HOLD AS WF$HOLD
END
TABLE FILE WF$HOLD
PRINT testfield
-INCLUDE path_to_file
END
where: testfile is a Master File (minus the .mas extension) you wish to test your field selection against. The case should match the case in the file system. For example:
car
testfield is a field or fields you wish to display in the test results. For example:
NAME
path_to_file is the full path to the file containing your syntax, as seen from the data server. Click Run. A list of desired fields appears if your syntax is correct. If not, troubleshoot accordingly. If your syntax is correct, edit edasprof.prf or site.wfs to declare and set the &&IBI_IF_FLDS variable to the FEX file you just created.
For example:
-SET &&IBI_IF_FLDS=
- 'c:\FocExcludes\excludefields.fex';
Customizing the Display of External Descriptions
The &&IBI_EXTDESC variable lets you display field descriptions held in external files. For example, if instead of describing fields in the same table or Master File in which the fields appear, the descriptions might be stored in a separate table. You can use the &&IBI_EXTDESC variable to specify FOCUS syntax to join and display these descriptions in WebFOCUS Development Tools. To display external descriptions, create a FEX file in a text editor and specify syntax to JOIN and display the syntax. You should refer to the
Creating Reports with WebFOCUS Language manual for the syntax necessary to JOIN and display the descriptions. In the following example, FIELDDESCX.DAT is an external file and each record is 'filename || fieldname' followed by desc.
FILEDEF XXX DISK C:\FIELDDESCX.DAT
DEFINE FILE WF$HOLD ADD
FNFLD/A132 = FILENAME || NAME ;
XDESCRIPTION/A3000 =
DECODE FNFLD(XXX ELSE ' ');
DESCRIPTION = IF XDESCRIPTION NE ' ' THEN XDESCRIPTION ELSE DESCRIPTION;
END
Go to the following page on your Web server to run an ad hoc procedure to test your syntax.
http://webserver/ibi_html/homepage/adhoc.htm
Enter the syntax similar to the following to test your file:
TABLE FILE SYSCOLUM
PRINT FILENAME NAME ALIAS
COMPUTE DESCRIPTION/A3000 = REMARKS;
-* any other fields needed
IF TBNAME EQ testfile
ON TABLE HOLD AS WF$HOLD
END
-INCLUDE path_to_file
TABLE FILE WF$HOLD
PRINT NAME DESCRIPTION/A80
END
where:
testfile is a Master File (minus the .mas extension) you wish to test your field selection against. The case should match the case in the file system. For example:
car
path_to_file is the full path to the file containing your syntax, as seen from the data server. Click Run. A list of desired fields appears if your syntax is correct. If not, troubleshoot accordingly. Edit edasprof.prf or site.wfs to declare and set the &&IBI_EXTDESC variable to the FEX file you just created. For example:
-SET &&IBI_EXTDESC=
- 'c:\FocExcludes\externaldesc.fex';
|