Wednesday, December 24, 2008

WebFOCUS Server Symbolic Variables

Within the WebFOCUS Reporting Server's profile logic, you can set symbolic variables that user programs can interrogate. For example, you could set a flag so that WebFOCUS programs know where they are running. This "where am I?" feature is useful when your test, development, production QA, and production environments may be slightly different and the programs must take into consideration some nuances.

Let's image putting the following statement in the WebFOCUS Reporting Server's profile (the edasprof.prf file):


Any program running on the server can now check this global variable to see what value the server has put there. In the example above, the programs could look at &&SYS_SERVER and know that they are on the development server.

Here is an example -- common code that programs could call to find the names and locations of company logo images:


- 'http://localhost/approot/baseapp/co_logo.jpg' ELSE

- 'http://localhost/approot/baseapp/co_logo_small.jpg' ELSE

- '/reports/images/co_logo.jpg' ELSE

- 'co_logo_small.jpg' ELSE
- IF &WFFMT IS 'HTML' THEN '/prod/images/co_logo.jpg' ELSE
- IF &WFFMT IS 'PDF' THEN 'co_logo_small.jpg' ELSE ' ';

By default, this common logic assumes reports run on the production server. If this is not the case, the server lets the program know that is on (in this example, anyway) the development server or on an developer's machine (using the default LOCALHOST name).

Here is another good idea for symbolics on the server.  Developers like to include debugging comments in their programs and often forget to remove them when promoting to production.  Using a WebFOCUS server symbolic, we can dynamically turn on and off debug commands depending upon which server is being used.  When running on the test server, turn on debugging.  When running production, however, turn those commands off.

On the production server, put this command in its profile:


On the test server, change it slightly to be this:


Inside all of your WebFOCUS programs, you can always have this command:


When running production, debug echos are turned off; in the test environment, they are turned on.

If you have any questions about WebFOCUS symbolic variables, let me know.

No comments:

About Me

My photo

I am a project-based consultant, helping data-intensive firms use agile methods and automation tools to replace legacy reporting and bring in modern BI/Analytics to leverage Social, Cloud, Mobile, Big Data, Visualizations, and Predictive Analytics. For several world-class vendors, I led services teams specializing in providing software implementation and custom application development. Based on scores of successful engagements, I have assembled proven methodologies and automated software tools.

During twenty years of technical consulting, I have been blessed to work with smart people from some of the world's most respected organizations, including: FedEx, Procter & Gamble, Nationwide, The Wendy's Company, The Kroger Co., JPMorgan Chase, MasterCard, Bank of America Merrill Lynch, Siemens, American Express, and others.

I was educated at Valparaiso University and the University of Cincinnati, graduating summa cum laude. In 1990, I joined Information Builders, the vendor of WebFOCUS BI and iWay enterprise integration products, and for over a dozen years served in branch leadership roles. For several years, I also led technical teams within Cincom Systems' ERP software product group and the custom software services arm of Xerox.

Since 2007, I have provided enterprise BI services such as: strategic advice; architecture, design, and software application development of intelligence systems (interactive dashboards and mobile); data warehousing; and automated modernization of legacy reporting.