how to create a configuration xml for webfocus …...however, the reportcaster application – that...

42
How to Create a Configuration XML for WebFOCUS Flex Map Viewer Using the ESRI Configuration by Mithu Datta The WebFOCUS GIS Adapter offers seamless integration between ESRI ArcGIS Server and WebFOCUS. It allows users to use a mapping interface to derive and visualize WebFOCUS Reports. Conceptually, it is a perfect marriage between business intelligence and location intelligence. Being able to view trends and patterns on a map allows us to analyze data on a different scale than what traditional business intelligence offers. Location intelligence lets us relate data based on location – for instance, finding a coffee shop by referencing the closest intersection. Information Builders used ESRI’s FLEX API for ArcGIS to develop the WebFOCUS Mapping Interface. A very comprehensive XML is necessary for users to create a map using the WebFOCUS GIS Adapter and define the various pieces of the puzzle – the mapping blocks with the WebFOCUS blocks. With the release of WebFOCUS 8, there is a utility that can be used to create this configuration XML. This article guides you through a simple creation of an XML file used to launch the WebFOCUS Flex Map Viewer. This utility can be launched either from the Business Intelligence Portal (Screen 1) or from within Developer Studio (Screen 2). Screen 1

Upload: others

Post on 30-Jul-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

How to Create a Configuration XML for WebFOCUS Flex Map Viewer Using the ESRI Configuration by Mithu Datta The WebFOCUS GIS Adapter offers seamless integration between ESRI ArcGIS Server and WebFOCUS. It allows users to use a mapping interface to derive and visualize WebFOCUS Reports. Conceptually, it is a perfect marriage between business intelligence and location intelligence. Being able to view trends and patterns on a map allows us to analyze data on a different scale than what traditional business intelligence offers. Location intelligence lets us relate data based on location – for instance, finding a coffee shop by referencing the closest intersection. Information Builders used ESRI’s FLEX API for ArcGIS to develop the WebFOCUS Mapping Interface. A very comprehensive XML is necessary for users to create a map using the WebFOCUS GIS Adapter and define the various pieces of the puzzle – the mapping blocks with the WebFOCUS blocks. With the release of WebFOCUS 8, there is a utility that can be used to create this configuration XML. This article guides you through a simple creation of an XML file used to launch the WebFOCUS Flex Map Viewer. This utility can be launched either from the Business Intelligence Portal (Screen 1) or from within Developer Studio (Screen 2).

Screen 1

Page 2: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 2 Here are the prerequisites for starting this utility:

1. FOCEXECs in an Application path on a Data Server. 2. WebFOCUS 8.0 3. An ArcGIS Server REST endpoint: This is where the map services are available.

Launch the utility. Then select a “New File” to start a new configuration (Screen 3).

Screen 3 Once loaded, it loads up all the available Data Servers. Expand a Reporting Server Node and an app where all your FOCEXECs are. Click OK (Screen 4).

Page 3: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 4 This brings up the utility New File Window (Screen 5).

Screen 5

Page 4: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

In the FOCEXEC tab, click “Add Focexec,” which is this symbol: This brings up a New Dialog window, “Create New Fex-Map Binding” (Screen 6).

Screen 6 Click the browse button to select a FOCEXEC. This opens an Open Dialog window (Screen 7).

Screen 7

Page 5: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Select a FEX and click “Open.” For the prompt value, type any text that you want the report to show up as in your Widget. Click the appropriate report type to select the kind of binding you wish (Screen 8):

• Report – Brings a WebFOCUS Report using selection in a map. • Map – Visualizes a WebFOCUS Report by symbolizing objects on a map. • Identify – Brings up a detailed report with a single click on an object in a map

Screen 8 This creates a new FEX entry for you. See Screen 9.

Page 6: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 9 Click on the Inbound Layers tab to define a layer from which you want to make your selection. Inbound defines layers from which WebFOCUS derives information. Click on the “Add Inbound Layer” button to get started (Screen 10).

Page 7: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 10 This brings up a new dialog window, “Create a new inbound layer” (Screen 11).

Page 8: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 11 Click the “Add” button. This brings up another Dialog window, “REST Service Connection Information.” This is where you define how you want to connect to ArcGIS Server. There should be a valid URL from an ArcGIS Server (Screen 12).

Screen 12

Page 9: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Click OK to bring up a list of map services hosted at this REST endpoint. Expand the REST endpoint to display a list of map services and then the selected map service to display a list of layers (Screen 13).

Screen 13 Click “Next” to continue to the next step of defining an inbound layer. In this step, you are going to define an attribute (field) that you would use for connecting an ArcGIS Map Service Layer to a WebFOCUS report. You need to define the focus field type here. If the field is of the alphanumeric type, you need to define the quote type here – single (‘) or double (“). Click “Next” to move on to the next step of defining an Inbound Layer (Screen 14).

Page 10: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 14 In this step, you are going to define the type of filter the WebFOCUS report is going to use. The WHERE/IF statements and the type of parameter you used when you created the report generally define this. Click “Finish” here (Screen 15).

Screen 15

Page 11: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Now you have defined an inbound layer that you will be using to select from to generate a WebFOCUS report (Screen 16).

Screen 16 The Map viewer requires a helper service called Geometry Service, which is also available from the ArcGIS Server REST endpoint. Click on the Map Services tab to define this. You should see the map service you already used while you were defining the inbound layer (Screen 17).

Page 12: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 17 Click on the “New Map Service” button to open the “Add New Map Service” Dialog Window. Expand the REST endpoint to bring up a list of services on the ArcGIS Server. Select the “Geometry” service. This should be the same on all REST endpoints. If you need help publishing the service, please contact your administrator. Click OK (Screen 18).

Page 13: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 18 Click on the Settings tab to define a map title and a subtitle (Screen 19).

Screen 19

Page 14: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Click “Save” to save your file. This brings up the “Save As” Dialog Window. Name the file or leave it to default (esriconfig.xml) in the app path that you defined when the utility was first launched (Screen 20).

Screen 20 Click “Done” to exit the utility. Then test your XML by launching the Map Viewer. http://<appserver name>/ibi_apps/esri/flexmapviewer/FlexMapViewer.jsp?IBIAPP_app=<appname>&IBIESRI_infofile=<xml name>.xml& See Screen 21.

Page 15: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 21 Using Cluster Manager With ReportCaster by Jerry Snyder

The Cluster Manager (CLM) is a workload distribution facility in WebFOCUS that enables you to configure a cluster or clusters of Reporting Servers to optimize scalability. CLM monitors performance, provides statistics and performs dynamic load balancing.

But can you use CLM with ReportCaster? Starting with WebFOCUS 7.7, the answer is yes.

Typically a Reporting Server is defined as a hostname and the TCP port number. When a Reporting Server is configured in a WebFOCUS installation that includes ReportCaster, it is given a node name in both WebFOCUS and ReportCaster. The WebFOCUS Administration Console is used to define the Reporting Server to WebFOCUS (Screen 1).

Page 16: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 1

The ReportCaster configuration tool, as seen on Screen 2, is used to define the Reporting Server to ReportCaster.

Screen 2

Page 17: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

The WebFOCUS Administration Console allows you to also specify a cluster of Reporting servers managed by the CLM (Screen 3).

Screen 3

When a CLM node is configured, the port specified is not the TCP port of the Reporting Server. Instead, it is the HTTP port (Screen 4).

Screen 4

The ReportCaster configuration tool does not have the option to designate a Reporting Server node as a CLM. When you specify a host and port on the JDBC URL, it must be the TCP port of the Reporting Server. So how can ReportCaster communicate with a CLM server? The answer is through the odin.cfg file. Instead of using a host and port, the JDBC URL can also reference an odin.cfg file to communicate with a server.

Page 18: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

The syntax is jdbc:eda:\\cfg=path\odin.cfg;;server=server node name;

The two parameters that you must specify are the location of the odin.cfg file and node name of the CLM server.

After you configure the CLM nodes in WebFOCUS using the WebFOCUS Administration Console, the odin.cfg file in the WebFOCUS client directory contains the settings for the CLM nodes. If the ReportCaster Distribution server is installed on the same machine as WebFOCUS, the WebFOCUS client directory is accessible by ReportCaster. So this path can be used on the JDBC URL.

In the above example, a CLM server named CLMNODE1 was configured using the WebFOCUS Administration Console. With the Distribution Server installed on the same machine as WebFOCUS, a corresponding node can now be configured in ReportCaster in the same way you see it on Screen 5.

Screen 5

The odin.cfg contains the following information:

NODE = CLMNODE1

BEGIN

CLASS = CLUSTER

REMOTE_CLM_HOST = INFORMA-WIRM6SK

REMOTE_CLM_PORT = 34121

END

Page 19: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

The node name specified on the JDBC URL is matched to the odin.cfg file, and the CLM host and port are retrieved and used to communicate with the Reporting Server. The specified node name must be the same as the CLM node name configured on the Reporting Server, as shown on Screen 6.

Screen 5

If the Distribution Server is not installed on the same machine as WebFOCUS, it cannot access the WebFOCUS client directory. In this case, the odin.cfg file must be copied to a location accessible to the Distribution Server. Since both the ReportCaster application (installed with the WebFOCUS client) and the ReportCaster Distribution Server get their configuration information from the ReportCaster configuration file stored on the Distribution Server, the specified location must exist in both places.

Here is an example:

Suppose you install the Distribution Server on a separate Windows machine with a typical installation, and you have configured a CLM node named CLMNODE1 in WebFOCUS using the WebFOCUS Administration Console. To use this CLM node with ReportCaster, you could then copy the odin.cfg file from the WebFOCUS client directory to the Distribution Server configuration directory: ibi\WebFOCUS77\ReportCaster\cfg. Then, you would configure your CLM node in ReportCaster as

jdbc:eda:\\cfg= c:\ibi\WebFOCUS77\ReportCaster\cfg\odin.cfg;;server= CLMNODE1;

The ReportCaster Distribution server would now be able to find the odin.cfg file and communicate with the CLM server. However, the ReportCaster application – that is the scheduling tool – would

Page 20: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

not be able to find the odin.cfg file since the Distribution Server is installed on another machine. So you must create this location on the machine where WebFOCUS is installed.

Suppose WebFOCUS is installed on Unix and the Distribution Server is installed on Windows. As long as there is a path common to both installations you can reference the odin.cfg file using forward slashes. For example:

jdbc:eda:\\cfg= /ibi/WebFOCUS77/ReportCaster/cfg/odin.cfg;;server= CLMNODE1;

Using the ability to reference an odin.cfg file, you can combine the benefits of CLM with ReportCaster.

Leveraging R Packages Using WebFOCUS Dialogue Manager and R-Scripts By Ali Rahim

RStat is an extension of WebFOCUS that allows statisticians, analysts and R language programmers to harness the power of a robust data mining and modeling toolset, and to create reports for management.

RStat is built on the Open Source Engine R. For this reason, one of the biggest advantages to RStat users is that they can leverage the many packages that the R community provides freely – if for some reason RStat’s included functionality is not enough. As of this writing, there were more than 3,000 library packages within R, but RStat is built on approximately 10 percent of the total packages. So how does a customer leverage the additional packages?

This article describes a basic step-by-step process for integrating an R package with WebFOCUS Dialogue Manager. This article makes no recommendations with regard to which model to use within any particular industry; this would be left to the customer to decide. Also, this article does not address how to code in Dialogue Manager nor in R programming language, except for the basics in creating the step-by-step guide.

Implementation Requirements

The following will be needed in order to be able to create and run the application:

1. WebFOCUS Developer Studio

2. RStat – in this case it is RStat 1.3.1

3. R-2.12.1 which is installed with RStat 1.3.1

Page 21: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

4. R-Scripts – scoring and charting scripts

5. R packages: R2HTML, doBy, vcd and other dependent packages have to be installed in the R environment.

Functional Specification

The following is a functional breakdown of the steps:

1. Data prep – source the data from a WebFOCUS Report and save the file to the app folder.

2. Script execution – send the R scripts to the R engine.

3. Output display – display the scored data in a report and charts created by the R-Scripts.

Technical Specification

Using the Dialog Manager Technique and R scripting, this article also addresses how to achieve the following:

1. Source data from a WebFOCUS data source and save to a CSV file for use in the R-Script, which scores the data.

2. Execute the scripts. R-Script will use this newly created data source as input to run the functionality within the scoring.R file.

a. One of the R-Scripts will score some data and also create an output file.

b. Two of the R-Scripts will then create PNG and HTML combinations and also an output file.

3. The WebFOCUS code will then dynamically generate a Synonym for the output file to be used in a report.

4. The Report will output as a HTML.

5. Use the PNG and HTML files in a self-service app and display the scored output, and the HTML files with the charts and graphs.

Detailed steps

1. Let’s start with the source data:

TABLE FILE CUSTOMERDATA

PRINT

ID AGE EDUCATION MARITAL GENDER

OCCUPATION INCOME TOPBUYER

ON TABLE SET PAGE-NUM OFF

ON TABLE NOTOTAL

ON TABLE SAVE FILENAME

Page 22: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

'rscriptrstat/C_Customers.csv'

FORMAT COMT

END

2. Set the variable concatenating the R version, the App folder and R script. Execute the script and check for return code to see if the process completed. If it did not, go to Error Trap err1. This can be set with variables to make the application robust.

-SET &r = 'C:/ibi/RStat1.3.1/R-2.12.1/bin/i386/R HOME=c:/ibi/apps/rscriptrstat --no-save < c:/ibi/apps/rscriptrstat/scoring.R';

-RUN

-SET &RETCODE = SYSTEM(&r.LENGTH,&r,'D4');

-RUN

-IF &RETCODE1 NE 0 THEN GOTO :err1;

a. scoring.R

##############################################################################

# R file for scoring the Customer data for logistic Regression for top buyer.

##############################################################################

dataset <- read.csv("C:\\ibi\\apps\\rscriptrstat\\C_Customers.csv", na.strings=c(".", "NA", "", "?"), strip.white=TRUE, encoding="UTF-8")

glm <- glm(TOPBUYER ~ ., data=dataset, family=binomial(link="logit"))

pr <- predict(glm, type="response")

write.csv(cbind(dataset, pr), file="C:\\ibi\\apps\\rscriptrstat\\SCORED_OUTPUT.csv", row.names=FALSE)

b. boxplot.R – creates boxplots for age and income

#############################################################

# R file to create boxplot (Age, Income)

#############################################################

require(R2HTML,quietly = TRUE)

require(vcd,quietly = TRUE)

dataset <- read.csv("file:///C:/ibi/apps/rscriptrstat/CUSTOMERDATA.csv", na.strings=c(".", "NA", "", "?"), strip.white=TRUE, encoding="UTF-8")

##################

Page 23: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

#Boxplot for Age

##################

ds <- rbind(data.frame(dat=dataset[,][,"Age"], grp="All"),

data.frame(dat=dataset[,][dataset$TopBuyer=="0","Age"], grp="0"),

data.frame(dat=dataset[,][dataset$TopBuyer=="1","Age"], grp="1"))

png("C:/ibi/apps/rscriptrstat/Boxplot_Age.png")

# Plot the data, grouped appropriately.

bp <- boxplot(formula=dat ~ grp, data=ds, col=rainbow_hcl(3), xlab="TopBuyer", ylab="Age", varwidth=TRUE, notch=TRUE)

# The 'doBy' package provides the 'summaryBy' function.

require(doBy, quietly=TRUE)

# Calculate the group means.

points(1:3, summaryBy(dat ~ grp, data=ds, FUN=mean, na.rm=TRUE)$dat.mean, pch=8)

# Add a title to the plot.

title(main="Distribution of Age by TopBuyer", sub=)

dev.off()

HTMLInsertGraph("Boxplot_Age.png",file="C:\\ibi\\apps\\rscriptrstat\\Boxplot_Age.html",append = TRUE)

#####################

#Boxplot for Income

#####################

#Subset the data for a boxplot of the variable Income with the appropriate groups.

ds <- rbind(data.frame(dat=dataset[,][,"Income"], grp="All"),

data.frame(dat=dataset[,][dataset$TopBuyer=="0","Income"], grp="0"),

data.frame(dat=dataset[,][dataset$TopBuyer=="1","Income"], grp="1"))

png("C:/ibi/apps/rscriptrstat/Boxplot_Income.png")

# Plot the data, grouped appropriately.

bp <- boxplot(formula=dat ~ grp, data=ds, col=rainbow_hcl(3), xlab="TopBuyer", ylab="Income", varwidth=TRUE, notch=TRUE)

# The 'doBy' package provides the 'summaryBy' function.

require(doBy, quietly=TRUE)

# Calculate the group means.

Page 24: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

points(1:3, summaryBy(dat ~ grp, data=ds, FUN=mean, na.rm=TRUE)$dat.mean, pch=8)

# Add a title to the plot.

title(main="Distribution of Income by TopBuyer", sub=)

dev.off()

HTMLInsertGraph("Boxplot_Income.png",file="C:\\ibi\\apps\\rscriptrstat\\Boxplot_Income.html",append = TRUE)

c. Distribution.R – creates histograms for age and income

##########################################################################

#R file to create distribution plots (Histogram,Cumulative)

##########################################################################

require(R2HTML,quietly = TRUE)

require(vcd,quietly = TRUE)

dataset <- read.csv("C:\\ibi\\apps\\rscriptrstat\\CUSTOMERDATA.csv", na.strings=c(".", "NA", "", "?"), strip.white=TRUE, encoding="UTF-8")

##################

#Histogram for Age

##################

# Generate just the data for a histogram of the variable 'Age'.

ds <- rbind(data.frame(dat=dataset[,][,"Age"], grp="All"),

data.frame(dat=dataset[,][dataset$TopBuyer=="0","Age"], grp="0"),

data.frame(dat=dataset[,][dataset$TopBuyer=="1","Age"], grp="1"))

png("C:\\ibi\\apps\\rscriptrstat\\Hist_Age.png")

# Plot the data.

hs <- hist(ds[ds$grp=="All",1], main="", xlab="Age", ylab="Frequency", col="grey90", ylim=c(0, 383.156065087403), breaks="fd", border=TRUE)

dens <- density(ds[ds$grp=="All",1], na.rm=TRUE)

rs <- max(hs$counts)/max(dens$y)

lines(dens$x, dens$y*rs, type="l", col=rainbow_hcl(3)[1])

dens <- density(ds[ds$grp=="0",1], na.rm=TRUE)

rs <- max(hs$counts)/max(dens$y)

lines(dens$x, dens$y*rs, type="l", col=rainbow_hcl(3)[2])

dens <- density(ds[ds$grp=="1",1], na.rm=TRUE)

rs <- max(hs$counts)/max(dens$y)

lines(dens$x, dens$y*rs, type="l", col=rainbow_hcl(3)[3])

Page 25: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

# Add a rug to the plot to highlight density distribution.

rug(ds[ds$grp=="All",1])

# Add a legend to the plot.

legend("topright", c("All", "0", "1"), bty="n", fill=rainbow_hcl(3))

# Add a title to the plot.

title(main="Distribution of Age by TopBuyer", sub=)

dev.off()

HTMLInsertGraph("Hist_Age.png",file="C:\\ibi\\apps\\rscriptrstat\\Hist_Age.html",append = TRUE)

#######################

#Cumulative for Income

#######################

# Generate just the data for an Ecdf plot of the variable 'Income'.

ds <- rbind(data.frame(dat=dataset[,][,"Income"], grp="All"),

data.frame(dat=dataset[,][dataset$TopBuyer=="0","Income"], grp="0"),

data.frame(dat=dataset[,][dataset$TopBuyer=="1","Income"], grp="1"))

# The 'Hmisc' package provides the 'Ecdf' function.

require(Hmisc, quietly=TRUE)

png("C:\\ibi\\apps\\rscriptrstat\\Cumulative_Income.png")

# Plot the data.

Ecdf(ds[ds$grp=="All",1], col="#E495A5", xlab="Income", ylab=expression(Proportion <= x), subtitles=FALSE)

Ecdf(ds[ds$grp=="0",1], col="#86B875", lty=2, xlab="", subtitles=FALSE, add=TRUE)

Ecdf(ds[ds$grp=="1",1], col="#7DB0DD", lty=3, xlab="", subtitles=FALSE, add=TRUE)

# Add a legend to the plot.

legend("bottomright", c("All","0","1"), bty="n", col=rainbow_hcl(3) , lty=1:3, inset=c(0.05,0.05))

# Add a title to the plot.

title(main="Distribution of Income by TopBuyer", sub=)

dev.off()

HTMLInsertGraph("Cumulative_Income.png",file="C:\\ibi\\apps\\rscriptrstat\\Cumulative_Income.html",append = TRUE)

Page 26: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

3. Create the MAS file for the output file from the Scoring.R process.

4. Create a report on the Scored Dataset to show the scored values.

5. Create a HTM page to launch the Dialogue Manager application and display the output.

Page 27: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Summary

RStat lets you run and create scoring routines to be included in WebFOCUS. However, there may be techniques, and even functionality within RStat such as charting, which cannot be exported. For this reason, you may want to explore the WebFOCUS Dialogue Manager with the R-Script technique.

Points to remember

Here are some basic points to remember for those interested in WebFOCUS Dialogue Manager and R-Script solutions:

1. What is their environment? 32bit – 64bit; O/S.

2. Is the data been prepared to work with the script?

3. How big is the data?

4. Do you wish to utilize WebFOCUS to source the data or provide Train datasets in consumable format for the R-Script?

5. If R-scripting, do you have the resources, such as statisticians and R-Script programmers?

6. The key to the Dialog Manager is the execution of the R-script. Below is the code needed to run the R-script. This code consists of the location of the R engine install, the Home (App path) and the location of the R-script. Notice all these can be in separate locations, so you can bunch all R-scripts in one folder for better organization and control. The SET statement passes the concatenated string to the WebFOCUS “System” command, which basically works like sending a command line in windows.

Page 28: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

-SET &r = ‘C:/ibi/RStat1.3.1/R-2.12.1/bin/i386/Rterm HOME=c:/ibi/apps/ rscriptrstat --no-save < c:/ibi/apps/ rscriptrstat/<SOME r-script FILE>.R'; -RUN -SET &RETCODE = SYSTEM(&r.LENGTH,&r,'D4'); -*Run the script with the R engine -SET &RETCODE = SYSTEM(&r.LENGTH,&r,'D4'); -IF &RETCODE NE 0 THEN GOTO :err1; -RUN

Page 29: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Achieving Low Latency Through DataMigrator File Listener by Daniel Chang

In a typical Business Intelligence (BI) environment, the cycle starts when a business event takes place. For instance, a file is written to the server and sent via FTP for further processing. An Extract-Transform-Load (ETL) routine then delivers the event record to the data warehouse. Finally, analytical processing turns the data into information to help the decision-making process and a business decision leads to a corresponding action. During each cycle, the data warehouse tables are refreshed and the process is repeated.

Populating the data warehouse has been a batch process, taking place daily, weekly, or monthly; however, as businesses try to stay ahead of their competitors, business requirements have become more demanding with shrinking batch windows. Nowadays, data warehouse users seek current and up-to-date BI information, so the time elapsed between the event and its consequent action needs to be minimized in every way possible.

DataMigrator offers many solutions to reduce various data latency challenges, including Change Data Caputre for relational tables and VSAM structures and the File Listener. For instance, if you have source files that are transferred by FTP from various locations throughout the day and need to be processed immediately, you can do so by using the File Listener in DataMigrator.

In DataMigrator 7.7 release, the File Listener has been enhanced to support both Direct Load and Data Flows. Plus, these flows can now be scheduled to run. Previous versions required users to monitor and manually terminate the agent. But in the new release, the flow automatically completes when a file or time limit is reached and an email message can be sent on completion. In the forthcoming release, 7.7.04, flows can also be scheduled to start when the server starts to ensure they are always running.

Steps to setup and use the File Listener are fairly intuitive; to implement and run a real time flow, the following steps are required:

1. Create an application directory to receive files and, optionally, another application directory to archive a copy of the files processed. This can be accomplished from Data Management Console (DMC) by right-clicking Application Directories and selecting New, then Application Directory. Note that a mapped application directory can also be used.

Page 30: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 1

2. Create a synonym with File Collection Parameters to control how the file listener processes files. This synonym corresponds to the layout of the source files that will appear in the designated directory.

Page 31: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 2

This creates a synonym that listens on the "listen" directory for files with names that start with "dmord" and an extension of "dat" polling every five seconds until 60 seconds have passed without a new file. As files are processed, they are archived to a directory "archive." Files are processed as they arrive until five files are processed.

3. Create a Direct Load Flow that uses the File Listener source. As mentioned previously, a flow with a File Listener source can be either a Data Flow or a Direct Load Flow.

Page 32: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 4

4. Run the flow and place the source files, which can be transported by FTP. When the flow completes, you should see a report like the image below that shows the total number of rows processed.

Screen 5

Page 33: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Sample of the target table would look something like this:

Screen 6

With the Discard option set to Archive, after each file is processed, it is copied to the archive directory as can be seen here:

Screen 7

Page 34: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Enhancing Properties in the Maintain Development Environment by Mark Derwin

When creating forms in the Maintain Development Environment (MDE), the creator has control over the way the form objects appear. When you place an object on the form, you control the font, color and its position, as well as whether it is visible and can be edited. However, not all properties that can be assigned to an object are displayed on the properties sheet. The techniques described in this article explain how to dynamically change existing properties and assign them to objects missing them from their property sheet.

ToolTip

The tooltip property is very helpful for providing information about an object and what the user is meant to do with it. Almost all of the objects in the MDE have ToolTipText as part of their property sheet, but the ListBox, ComboBox and JS Grid does not. To add it, use this code:

winform show_inactive form1;

Winform set Form1.Combobox1.ToolTipText To "Select category from ComboBox"

Winform set Form1.Listbox1.ToolTipText To "Select title from ListBox"

Winform set Form1.Grid1.ToolTipText To "Select moviecode from New Grid"

Winform Show Form1;

If you want to operate on form objects before a form is displayed, you must issue a Winform show_inactive form command. If you don’t, Maintain does not know anything about the objects on the form, which means you will get an error. The syntax of the Winform Set command is as follows:

Winform Set Formname.objectname.property TO value;

Here, value can be a literal in quotes, or a variable. Please note that here I am talking about the new JS Grid available in Release 7.7 and higher. The older Active-X grid does not allow this property to be set.

Back Color

Before Release 7.7 there was no easy way to change the back color of a GroupBox. This property has been included in the MDE as of Release 7.7, but if you are developing an application before that release, you can use this syntax to change the back color of the object:

Page 35: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Form1.GroupBox1.SetBackColor(0, 225, 255)

This syntax works the same as the Winform Set command and also requires a show_inactive command to be issued before it. This technique can be applied to any object on the form if you want to dynamically stress which object should have the user’s focus.

Row Height

When creating an HTMLTable you can change the height of the header, but the height of the data rows is automatically determined by the font you are using. If you are adding objects to the cells or just want the rows to be bigger, you can use this command to dynamically change the row height:

Form1.HTMLTable1.RealBodyRowHeight = 46;

The standard height is 23 pixels, so using a multiple of 23 ensures that the data appears correctly in the HTMLTable.

CSSClass

When a Maintain form is displayed at runtime, it is displayed as HTML. A stylesheet can be applied to change the look and feel of the form. Before Release 7.7 if you wanted to apply a stylesheet (or CSS file) to the form, you could use this code:

compute Form1.cssname = "/approot/demo/style.css";

In Release 7.7 and higher, the CSSName is a form property and can be assigned inside the MDE. If you want to go further and assign a class to an individual object, you can use this code:

winform set Form1.Text1.CSSClass to "subpanel";

Here, subpanel is a class inside my stylesheet. This property is being added to the MDE in release 8.0.

These are just a few things that can be done with Maintain code to dynamically change the display of your form. Just about every property on an objects property can be changed at runtime with the Winform Set command, and we are adding more with each release of Maintain.

Page 36: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

WebFOCUS Slices: Editing and Chaining by Josette Dumont-Smith

In the September/October 2011 issue of WebFOCUS Newsletter, I introduced you to WebFOCUS Slicers with my article “Slicers: A New WebFOCUS Feature,” which focused on creation and functions. Picking up where we left off, in this issue I will describe the process of editing and chaining slicers.

As you may recall, users can access slicers through InfoAssist by clicking on a tab that appears between the Data and Layout tabs.

Editing Slicer Groups

When you bring up the “Edit Slices” screen, the left side of the content area has an entry for each slicer group. When a slicer group is selected, its properties appear on the right-hand side (Screen 1).

Screen 1

Page 37: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

The Group Name text input box is used to rename the group. Group names are not unique and may not contain HTML or JavaScript. As an alternative, they can be encoded to avoid execution. Slicers can be reordered, removed, set as required, and edited in the selected group. Clicking a row selects that whole row. Items can be arranged using the controls. The slicer order can be moved up and down or deleted. The Required column indicates that a selection must be made prior to running the report. Required only applies to runtime, not preview.

Chaining Slicers

Slicers can be cascaded, or “chained.”

Using a hierarchy database file, when a slicer is used (value selected), a number indicating its location in the cascade appears next to the label. That number is auto-incremented starting at 1.1. It is also a superscript with a font size of 9 and about three pixels higher than the label that appears after the asterisk for a required field, as shown on Screen 2.

Screen 2

All controls across all groups are cascaded and start with nothing selected. Changing the selection in earlier controls clears subsequent controls.

Using the Slicers group shown on Screen 2, the following may occur: The first selection is CAR, making it the first control in the cascade. This will filter COUNTRY and MODEL to show values only for that CAR. The next selection is COUNTRY, making it the second control in the cascade. This will filter to show values only for CAR and MODEL. The next selection is MODEL, making it the third control in the cascade.

This will filter to show only COUNTRY and CAR for that MODEL.

If the selected CAR changes, the COUNTRY and MODEL controls are removed from the cascade and reset to no selection.

Page 38: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Resetting the cascade will clear all slicer selections, and all controls are removed from the cascade.

Resetting all slicers in one group from the cascade will clear all slicer selections for controls in that group, and all controls in that group are removed from the cascade. The selection in the remaining slicers is not changed, and additional values become available. To reset an individual slicer, click the clear icon on an individual slicer’s panel. This clears the selection for that individual slicer and the slicer is removed from the cascade, but the selection in the remaining slicers is left unchanged.

Interacting with Slicers

Each slicer displayed on a ribbon has “label” and “relationship” properties.

Label: The label for a slicer is the column title by default. If no column title exists, the fieldname is used. This can be changed in the Edit Slicers dialog.

Relationship (Operator): As in WebFOCUS OLAP (which slicers have replaced), the user can change the relationship operator. This is done using a visual menu, except for alpha fields. The currently selected relationship appears selected both next to the control and in the menu.

Selecting a new relationship changes the condition that is being applied to both the report and the cascade logic, and it may change the control in use on the ribbon. The list of available operators is dependent on the field type.

Alpha fields have only two operators. Clicking the operator swaps to Equal (Screen 3) and Not Equal (Screen 4).

Screen 3 Screen 4

Numeric/Date fields have Equal, Not Equal, Less Than, Greater Than or Equal To, Less Than or Equal To, In Range and Not In Range (Screen 5).

Page 39: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Screen 5

Updating the Preview

By default, slicer selections do not automatically update the preview. An option exists in the Options group on the ribbon and on the title bar of each group panel. When used, an update of the preview with the slicer selections is applied. Slicer selections are automatically propagated to the preview when the preview is forced to update by an action, such as adding a new field. Auto update can be enabled in the General section of the Edit Slicers dialog. Auto update means that the preview is updated when the slicer for which you make a selection loses focus.

Stay tuned for more information on slicers in future editions of WebFOCUS Newsletter.

WebFOCUS 8 Tools Consolidation by Susan Trommer

Note: This article is a summary of the information available in the WebFOCUS 8 Tools Consolidation Statement (https://techsupport.informationbuilders.com/tech/wbf/wbf_rln_8_tools_consolidation.html)

available from the Information Builders InfoResponse Online(https://techsupport.informationbuilders.com) Web site. To provide advanced notice of the WebFOCUS 8 Tools Consolidation, a CTSS Advisory email notification was distributed on November 30, 2011 to InfoResponse Online subscribers.

Information Builders continues to enhance its WebFOCUS product line and add new capabilities and tools to meet customers' requirements. In recent years, this has meant applying new technologies to provide a rich, modern Web-based experience for users of WebFOCUS. To this end, WebFOCUS Release 8 consolidates several legacy tools and interfaces as well as some stabilized product options.

Page 40: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

The legacy Web tools consolidation includes the retirement of the Report Assistant, Graph Assistant, Power Painter and Advanced Graph Assistant tools. Information Builders has a policy of ensuring that our customers receive upgrades and new features as a standard part of their maintenance contracts.

In this case, Information Builders is extending that program. Customers who have licensed Report Assistant and Graph Assistant under the Analytical Reporter or other licensing arrangements, are entitled upon upgrading to Release 8 to trade in those licenses for no-cost InfoAssist Basic licenses.

InfoAssist Basic, a subset of WebFOCUS InfoAssist, contains the capabilities found in Report Assist and Graph Assist. Contact your local Information Builders representative regarding Power Painter and Advanced Graph Assistant capabilities, which require the WebFOCUS InfoAssist license.

The Web consolidation also includes the retirement of the following Java Applet based interfaces and tools, which will eliminate the requirement to have a specific release of the Java VM present on each end-user machine:

• Managed Reporting (MR) Applet User Interface

• Reporting Object Applet Tool

• Alert Wizard Applet Tool

• Publish Utility Applet Tool

• Applet-based Graphs, Graph Editor (accessible from Applet-based graphs), and Old Graph Engine (GRAPH32)

• ReportCaster Applet Interface and Scheduling Wizard

For Developer Studio, the Graph Assistant and the Managed Reporting Publish Utility are retired. The Developer Studio Graph option will utilize InfoAssist charting. The Developer Studio HTML Composer tool is available to create HTML launch forms for Managed Reporting procedures. Customers who have active licenses for Developer Studio will receive this functionality as part of their standard maintenance contract.

The functionally stabilized product options that have been consolidated and discontinued as of Release 8 are the following:

• WebFOCUS CGI and ISAPI client communication for WebFOCUS Self-Service applications. Applications using the CGI or ISAPI client should be converted to use the WebFOCUS Servlet.

• Two-way Email is discontinued due to lack of usage and the availability of the WebFOCUS Mobile Favorites Product offering.

• ReportCaster Java Bean API is superseded by the ReportCaster Java API available as of Release 5.3. See the ReportCaster API manual for information on the ReportCaster Java API.

Page 41: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

See the following product notifications for additional information for each of the consolidation areas including functionality available to evaluate in Release 7.7.x:

• WebFOCUS 8 Managed Reporting Applet-based Tools Consolidation https://techsupport.informationbuilders.com/tech/wbf/wbf_rln_8_mr_appletbased_tools_consolidation.html

• WebFOCUS 8 Applet-based Graphs and Graph Engine Consolidation https://techsupport.informationbuilders.com/tech/wbf/wbf_rln_8_appletbased_graph_consolidation.html

• WebFOCUS 8 ReportCaster Tools and Distribution Options Consolidation https://techsupport.informationbuilders.com/tech/wbf/wbf_rln_8_rcaster_tools_distoptions_consolidation.html

• WebFOCUS 8 Report and Graph Tools Consolidation https://techsupport.informationbuilders.com/tech/wbf/wbf_rln_8_report_graph_tools_consolidation.html

• WebFOCUS CGI and ISAPI Client Depreciation and Support Statement https://techsupport.informationbuilders.com/tech/wbf/wbf_rln_77_cgiisapi_letter.html

• ReportCaster Two-Way Email Discontinued as of WebFOCUS 8 https://techsupport.informationbuilders.com/tech/wbf/wbf_rln_8_rcaster_2wayemail_consolidation.html

• ReportCaster Java Bean API Discontinued as of WebFOCUS 8 https://techsupport.informationbuilders.com/tech/wbf/wbf_rln_8_rcaster_javabeanapi_consolidation.html

Page 42: How to Create a Configuration XML for WebFOCUS …...However, the ReportCaster application – that is the scheduling tool – would not be able to find the odin.cfg file since the

Information Builders Summit 2012 – Integration, Information, and Integrity Information Builders’ annual Summit User Conference is the premier user event for customers, developers, and executives worldwide! Summit 2012, which promises to be our most exciting event ever, has one main objective: to meet our customers’ needs with more product and technology presentations, networking, and relationship-building opportunities. 160 Education Sessions featuring:

• 28 Case Studies

• 16 Tips & Techniques

• 10 Best Practices

• 44 Labs

• 12 Education Sessions

• 4 Strategic Management Sessions

• 9 Integration & Information Sessions

• 9 Advanced Analytics Sessions

• 12 Product Highlight Sessions

• 10 WebFOCUS 8 Sessions

Get Social for Summit 2012 on Facebook! http://www.facebook.com/events/270499783004717/ Join the Information Builders Focal Point Community With more than 6,000 members globally Focal Point is your forum for questions and discussions relating Information Builders’ full line of solutions. Registration is free but the information is priceless! Register today and create a profile: http://forums.informationbuilders.com/eve/forums .