scheduling a reportcaster job with a webfocus report€¦ · scheduling a reportcaster job with a...

24
Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an article on how to use a WebFOCUS report to schedule a ReportCaster job making use of ReportCaster Web Services and the Web Services Adapter. ReportCaster Web Services was created to allow the integration of custom- built applications developed in environments such as Microsoft .NET and Java with ReportCaster functionality. The Web Services Adapter lets WebFOCUS integrate with applications that are Web services- enabled through the use of a WebFOCUS report. If your company has licensed ReportCaster Web Services and the Web Services Adapter, then a WebFOCUS report can be written to integrate with ReportCaster functionality. In the majority of cases, the ReportCaster Web Services function addSchedule, which schedules a ReportCaster Job, would be used. The common question I receive is that once there is a Master File created, as per my autumn 2007 article, how does one know which fields in the Master File to use to schedule a particular ReportCaster Job, and what should be the values passed to the ReportCaster Web Services function? The first thing to remember is that values are passed to the input of a Web Service in the form of a WHERE/IF clause (e.g., WHERE fieldname EQ ‘value’). The meaning of each of the fieldnames and the valid values to be passed are all documented in the ReportCaster Web Services manual. The example below shows a section of the addSchedule Master File where the distribution of the WebFOCUS report is to be done via e-mail: GROUP=DISTRIBUTIONEMAIL, ALIAS=distribution, ELEMENTS=10, $ GROUP=DESTINATION, ALIAS=destination, ELEMENTS=5, $ FIELDNAME=DISTRIBUTIONFILE, ALIAS=distributionFile, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=DISTRIBUTIONLIST, ALIAS=distributionList, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ GROUP=DYNAMICADDRESS, ALIAS=dynamicAddress, ELEMENTS=4, $ FIELDNAME=PASSWORD1, ALIAS=password, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=PROCEDURENAME, ALIAS=procedureName, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=SERVERNAME, ALIAS=serverName, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=USERNAME, ALIAS=userName, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=SINGLEADDRESS, ALIAS=singleAddress, USAGE=A30, ACTUAL=A30,

Upload: others

Post on 19-Apr-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

  Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an article on how to use a WebFOCUS report to schedule a ReportCaster job making use of ReportCaster Web Services and the Web Services Adapter. ReportCaster Web Services was created to allow the integration of custom-built applications developed in environments such as Microsoft .NET and Java with ReportCaster functionality. The Web Services Adapter lets WebFOCUS integrate with applications that are Web services-enabled through the use of a WebFOCUS report. If your company has licensed ReportCaster Web Services and the Web Services Adapter, then a WebFOCUS report can be written to integrate with ReportCaster functionality. In the majority of cases, the ReportCaster Web Services function addSchedule, which schedules a ReportCaster Job, would be used. The common question I receive is that once there is a Master File created, as per my autumn 2007 article, how does one know which fields in the Master File to use to schedule a particular ReportCaster Job, and what should be the values passed to the ReportCaster Web Services function? The first thing to remember is that values are passed to the input of a Web Service in the form of a WHERE/IF clause (e.g., WHERE fieldname EQ ‘value’). The meaning of each of the fieldnames and the valid values to be passed are all documented in the ReportCaster Web Services manual. The example below shows a section of the addSchedule Master File where the distribution of the WebFOCUS report is to be done via e-mail: GROUP=DISTRIBUTIONEMAIL, ALIAS=distribution, ELEMENTS=10, $ GROUP=DESTINATION, ALIAS=destination, ELEMENTS=5, $ FIELDNAME=DISTRIBUTIONFILE, ALIAS=distributionFile, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=DISTRIBUTIONLIST, ALIAS=distributionList, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ GROUP=DYNAMICADDRESS, ALIAS=dynamicAddress, ELEMENTS=4, $ FIELDNAME=PASSWORD1, ALIAS=password, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=PROCEDURENAME, ALIAS=procedureName, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=SERVERNAME, ALIAS=serverName, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=USERNAME, ALIAS=userName, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=SINGLEADDRESS, ALIAS=singleAddress, USAGE=A30, ACTUAL=A30,

Page 2: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=TYPE, ALIAS=type, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=INLINEMESSAGE, ALIAS=inlineMessage, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=INLINETASKINDEX, ALIAS=inlineTaskIndex, USAGE=I11, ACTUAL=A11, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=MAILFROM, ALIAS=mailFrom, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=MAILREPLYADDRESS, ALIAS=mailReplyAddress, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=MAILSERVERNAME, ALIAS=mailServerName, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=MAILSUBJECT, ALIAS=mailSubject, USAGE=A100, ACTUAL=A100, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=SENDINGREPORTASATTACHMENT, ALIAS=sendingReportAsAttachment, USAGE=A5, ACTUAL=A5, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=ZIPFILENAME, ALIAS=zipFileName, USAGE=A30, ACTUAL=A30, MISSING=ON, ACCESS_PROPERTY=(NEED_VALUE), $ FIELDNAME=ZIPRESULT, ALIAS=zipResult, USAGE=A5, ACTUAL=A5, ACCESS_PROPERTY=(NEED_VALUE), $ The Group Name usually refers to the structure definition within the ReportCaster Web Services manual. Chapter 3 of that manual contains all of the structure definitions used by ReportCaster Web Services. Notice that for every GROUP definition in the Master File there is also an ELEMENTS setting defined. This means that there are ‘n’ number of GROUPS/FIELDNAMES below the GROUP definition that are used to define the GROUP. For example, the DESTINATION group has an ELEMENTS value equal to 5. Therefore, the DESTINATION group is made up of fields DISTRIBUTIONFILE, DISTRIBUTIONLIST, SINGLEADDRESS, TYPE, and the DYNAMICADDRESS GROUP. Since the DYNAMICADDRESS GROUP is made up of four fields (ELEMENTS=4), the PASSWORD1, PROCEDURENAME, SERVERNAME and USERNAME fields would also make up the DESTINATION definition. The ReportCaster Web Services manual is then used to understand the meaning of each of the fields and what are the valid values to be passed within the WHERE/IF clause. The DESTINATION structure and the DYNAMICADDRESS structure in Chapter 3 describes everything needed to understand the meaning of the fields within the DESTINATION GROUP definition: Name Type Description DistributionList String A list of one or many recipients stored within the

ReportCaster Address Book. Type must be set to “DISTRIBUTION_LIST”.

DistributionFile String A list of one or many recipients stored within a physical

Page 3: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

file accessible to the Distribution Server. Type must be set to “DISTRIBUTION_FILE”.

SingleAddress String A single recipient entered by the person scheduling a job when the job is created. Type must be set to “SINGLE_ADDRESS”.

DynamicAddress dynamicAddress A structure containing the definition of the Reporting Server procedure to run to obtain a list of one or more recipients. Type must be set to “DYNAMIC_ADDRESS”.

Type String Valid values are DISTRIBUTION_FILE DISTRIBUTION_LIST DYNAMIC_ADDRESS SINGLE_ADDRESS

Password String The value of the password required for authentication to the Reporting Server containing the WebFOCUS procedure that creates the dynamic distribution list.

ProcedureName String The name of the WebFOCUS procedure that produces the dynamic distribution list. Accepts a maximum value of 64 characters.

ServerName String The name of the Reporting Server that contains the WebFOCUS procedure that creates the dynamic distribution list.

UserName String The user ID to the Reporting Server that contains the WebFOCUS procedure that creates the dynamic distribution list.

Below is an example of the WHERE conditions necessary for a WebFOCUS report to be distributed via email to a specific email address: WHERE SINGLEADDRESS EQ '[email protected]' WHERE TYPE EQ 'SINGLE_ADDRESS' WHERE INLINEMESSAGE EQ 'This is the current sales report for 2010' WHERE MAILFROM EQ '[email protected]' WHERE MAILREPLYADDRESS EQ '[email protected]' WHERE MAILSERVERNAME EQ 'smtpServer' WHERE MAILSUBJECT EQ 'ReportCaster Job - Carinst' WHERE SENDINGREPORTASATTACHMENT EQ 'true' With Developer Studio 7.7, it is much easier to understand the fields contained within each structure as we show the GROUP definitions in a hierarchical view within the Report Painter (Screen 1).

Page 4: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Screen 1

Page 5: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Using Survival Analysis in RStat By Ali-Zain Rahim Information Builders has made multiple enhancements in version 1.2 of WebFOCUS RStat, our business intelligence and predictive analytics environment. Those enhancements include new modeling techniques, scoring routines, data manipulation capabilities, and performance and usability optimization. The new modeling techniques are in the branch of statistics called “survival analysis.” Survival analysis is a collection of methods for analyzing the occurrence and timing of an event based on the historical survival or event data. Survival analysis is a branch of statistics that in its basic form deals with death in biological organisms and failure in mechanical systems. In fact, survival analysis is just another name for time-to-event analysis. The key to survival analysis techniques is that they are explicitly designed to deal with missing data problems and time-dependent variables that predict the outcome under study. The uses in the survival analysis of today vary quite a bit. Applications now include time until onset of disease, time until stock market crash, time until equipment failure, time until earthquake, and so on. The best way to define such events is simply to realize that these events are a transition from one discreet state to another at an instantaneous moment in time. Of course, the term "instantaneous," which may be years, months, days, minutes, or seconds, is relative and has only the boundaries set by the researcher. Why Use Survival Analysis? A common goal in medical, biological or engineering research is to determine whether certain continuous (independent) variables are correlated with the survival or failure times. There are two major reasons why this research issue cannot be addressed via straightforward multiple regression techniques: First, the dependent variable of interest is most likely not normally distributed. Second, there is the problem of censoring; that is, some observations will be incomplete Survival analysis allows modeling multiple (or recurrent) events. This type of modeling fits very well in many situations. For example, people can go to jail multiple times, and the same goes for alcoholics who start and stop drinking, people who get married and divorced, and people who enter and leave unemployment services. Survival analysis attempts to answer questions such as, what is the fraction of a population that will survive past a certain time? Of those that survive, at what rate will they die or fail? Can multiple causes of death or failure be taken into account? How do particular circumstances or characteristics increase or decrease the odds of survival? Practical Applications of Survival Analysis Survival analysis encompasses a wide variety of methods for analyzing the timing of events. The typical event is death, which accounts for the name given to these methods. Also, the

Page 6: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

term “survival” is a bit misleading; you can use survival analysis to study times required to reach any well-defined endpoint. For this reason, survival analysis is also appropriate for many other kinds of events, such as criminal recidivism, divorce, child-bearing, unemployment, success of a particular group within social programs, product failure, and graduation from school. Some examples of studies conducted using Survival Analysis:

• Incubation times of certain diseases, such as AIDS and Hepatitis • Failure of parts or products in manufacturing, such as the time it takes for a ball-bearing

to wear • Life times of participants in particular programs • Remission duration of certain diseases in clinical trials • Repeating a negative behavior after receiving negative feedback to study causes of

events such as births and deaths, marriages and divorces, wars and revolutions, bankruptcies, arrests and convictions, and hospitalizations.

Example of Survival Analysis - Parametric To illustrate how survival analysis works in RState, we’ll look at an example using a child welfare dataset. The dataset represents children in foster care. The scores show time in the program (or exit from the program). The following steps load the dataset into RStat and execute the Survival Analysis Parametric model:

1. Load the child welfare dataset into RStat and click Execute. 2. Set the Time_in_Prog variable as TIME type (1). 3. Set the Exit_Program variable as STATUS type (2). 4. Set the Inst variable as IDENT type. 5. Set all other variables as INPUT type. 6. Select the “Survival” option for the Target Data Type. 7. Hit Execute. 8. Go to the Model Tab. 9. Select “Survival Analysis.” 10. Then “Parametric,” and run the model by clicking “Execute.”

Make sure you have a Time variable with Time type. Also, make sure you have a Status variable with Status type. Example: 10 steps for creating a basic scoring application There are multiple ways to start up RStat. The recommended way is to open a fex and pull the fields with which you would like to create the model into the Report Painter. The other way is to start up RStat from the Command menu and then RStat Predictive Modeling. The difference is that when you start RStat the first way, you have the fields loaded for you with the same data types from the master file(s).

Page 7: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Below is the example of how to create a scoring application and start RStat from a fex. We will run the Parametric Survival Model in this example. We are looking to model the time to an event. Note: The roles assigned to the variables with the target variable will be the time variable, and the risk variable will be the status variable. Step 1. Open up the fex in Report Painter with the fields (or create new one and pull in the fields) you want to use to create the model (Screen 1).

Screen 1

Page 8: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Step 2. Select the role type for each variable (target, risk, input, ident or ignore) and click “Execute.” In this case the Time_In_Prog is the time variable and the Exit_Prog will be the status. Also select the Survival Target Data Type (Screen 2).

Screen 2 Step 3. Click on the Model tab and execute either the COXPH or Parametric Survival models (Screen 3). The COXPH will create the risk model, while the Parametric will create the time model. To review the survival curve, run the COXPH model and click on the PLOT button.

Screen 3

Page 9: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Step 4. Export the model and save the C file (make sure to maintain the .C extension) Note: both Parametric and COXPH models will be named the same by default, so make sure you select a descriptive name for the model file (C file). See Screen 4.

Screen 4 Step 5. Go back to Developer Studio and click on the Command menu and the RStat Model Deployment selection to deploy your newly created Parametric Survival Model. See Screen 5.

Screen 5

Page 10: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Step 6. Select the file you just saved in Step 4 and then the server (and app folder) to which you want to deploy the model (Screens 6 and 7).

Screen 6

Screen 7 Step 7. When you select the server, click on “deploy” and you should get the following message to show you were successful: Success: C:\ibi\apps\childwelfare\hold_survival.c. If not, there might be an issue with the C file or maybe with your licenses if you are using Developer Studio 7.6.11 and are trying to deploy to a remote server.

Page 11: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Step 8. Once you have deployed, go to your Scoring report (Screen 8). This would be the fex that contains the fields for the data, to which you want to apply the model. It will also be a fex in the app folder to which you deployed your model. Create either a define field or a compute and click on the Functions button. When the new dialog box comes up, click the Retrieve Scoring Routines button. This will bring back the available models. Note: the name you give to the define/compute should also be the target field name you give in the functions dialog. Step 9. Select the model you just created and deployed. Select the fields that match the variables in the model. Click OK until you get back to the Report Painter (Screen 9).

Screen 9 Step 10. Run the report to make sure you are getting valid values (Screen 10).

Screen 10

Page 12: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Step 11. You can add your own cosmetic touches to the output/report. Screen 11 shows how to use the COXPH in a report. The screenshot shows how to use the risk score and create another compute/define apply business rules. For instance, if the survival score were greater than 1, then the child is likely to stay in the program longer as compared to the peers in the dataset. The higher the score, the more likely the child is to stay.

Screen 11 Screen 12 shows the “survival curves” if you run a COXPH model. The PLOT button creates a survival chart and a Scaled Schoenfeld Residuals graph. Survival Curve (only with COXPH):

Screen 12

Page 13: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

To understand the method of proportional hazards, first consider a "baseline" survival curve. This can be thought of as the survival curve of a hypothetical "completely average" subject – someone for whom each predictor variable is equal to the average value of that variable for the entire set of subjects in the study. This baseline survival curve doesn't have to have any particular formula representation; it can have any shape whatever, as long as it starts at 1.0 at time 0 and descends steadily with increasing survival time. The baseline survival curve is then systematically "flexed" up or down by each of the predictor variables, while still keeping its general shape. The proportional hazards method computes a coefficient for each predictor variable that indicates the direction and degree of flexing that the predictor has on the survival curve. Zero means that a variable has no effect on the curve. It is not a predictor at all; a positive variable indicates that larger values of the variable are associated with greater mortality. Knowing these coefficients, we could construct a "customized" survival curve for any particular combination of predictor values. More importantly, the method provides a measure of the sampling error associated with each predictor's coefficient. This lets us assess which variables' coefficients are significantly different from zero; that is, which variables are significantly related to survival. Screen 13 shows a Schoenfeld Curve (only with COXPH). It displays a graph of the scaled Schoenfeld residuals, along with a smooth curve.

Screen 13

Page 14: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Schoenfeld residuals are useful in assessing proportional hazards assumption, examining… or time trend or lack of proportionality. The Schoenfeld residuals(r) are defined only at event times. There is one residual for each covariate in the Cox model. A non-zero slope is an indication of a violation of the proportional hazard assumption. In principle, independent of time, a plot that shows a non-random pattern against time is evidence of violation of the independence assumption.

Page 15: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

A Time Out to Save Your Data By Mark Derwin As a developer, you always want your applications to end cleanly. Disconnects, abnormal terminations, and errors can lead to unsaved data, corrupt databases, and hanging agents. When users enter data onto a screen and hit “Save,” the last thing they want to see is that the session has timed out. The technique I am about to describe takes the worry out of that. If you have ever used an online banking system, and have been idle too long, a message pops up on your screen asking if you need more time. That is what we are going to do here. A nice thing about this technique is that you can either create a JS procedure and embed it in your forms or edit the MNTONLOAD.JS procedure and place it in there. Anything placed in that file is automatically included in every executed Maintain procedure. The only thing you have to do is place the button on your form. I have my timer.js procedure set up to look for an object on my forms named ButtonX. If this is a naming convention that you already use, change it to anything you like. Just remember to change the JavaScript procedure to reflect your name. After my application is created, I add my button (Screen 1).

Screen 1 The text and the color of the button do not matter. The JavaScript procedure will take care of that. Bring up the Properties for the button. Change the name to ButtonX. Next, change the Visible property to 0 – No. Since we are dealing with JavaScript, case does matter. We don’t want the button to show up at runtime.

Page 16: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Next, I create my timer.js and embed it onto the form: Timer.js var sTimer=70 // Control id of the button used var id = "ButtonX"; var control = document.getElementById(id); control.value=sTimer; display(); function display(){ var done = 0; sTimer -= 1; if( sTimer <= 0 ) done = 1; if( sTimer <= 10 ) { control.style.visibility = 'visible'; control.style.backgroundColor = "red"; control.value="Do you need more time? \n Click to continue"; } else control.value=sTimer; if( !done ) { setTimeout("display()",1000) ; } else { IWCTrigger("WINEXIT"); window.opener=self; window.close(); } } That’s it. Now when you run, if the user is idle for more than one minute, what you see on Screen 2 appears.

Screen 2

Page 17: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Unless the user clicks on the button, the application ends gracefully and the agent closes. I have the sTimer value set at 70. That only allows for the user to be idle for 60 seconds before the button appears, and 10 seconds after that before disconnect. Raise that value, in seconds, to whatever value you want. It is also a good idea to place the following in your edasprof.prf to ensure that you won’t get an error when trying to close the browser: MNTCON EXIT_WARNING OFF If you want this functionality in all of your Maintain applications, on all of your forms, add the display function and other variables to the MNTONLOAD.JS file. This way it will always be included and all you will have to do is create ButtonX on the form.

Page 18: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Developer Studio 7.6.10 Cluster Nodes Enhancements By Maria Volant In Developer Studio 7.6.10, when working against a WebFOCUS environment that has a cluster node configuration, developers have the option to display the alternate nodes that are used in the cluster node configuration. This can be done by selecting the “Show Cluster Node Alternates” checkbox located on the Explorer tab of the Developer Studio Options dialog box, as shown in Screen 1.

Screen 1 When the “Show Cluster Node Alternates” option is selected and the cluster node is expanded, all the available Reporting Server nodes that are part of the cluster node configuration are displayed in the tree. See Screen 2.

Page 19: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Screen 2 This allows developers to work against the individual reporting server nodes. A developer may also access the Web Console for a reporting server node that is part of the Cluster Configuration by selecting the reporting server node and clicking the WebFOCUS Reporting Server Console icon in the Developer Studio Explorer toolbar. When the “Show Cluster Node Alternates” option is not selected – this is the default – only the CLUSTER node itself is available in the tree. When it is expanded, all the applications, which all the reporting server nodes share through their common approot, are displayed under the Applications folder that is directly under the cluster node, as shown in Screen 3.

Page 20: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Screen 3 In this case, when developers perform tasks under the applications, such as creating, editing, or running procedures, as well as viewing, creating or editing metadata, it is the Developer Studio communication layer that controls which reporting server node the request is sent to for processing. To add a Cluster Node to a WebFOCUS environment:

• Log into the WebFOCUS Administration Console of the remote environment as administrator.

• Navigate to “Reporting Servers, Remote Services.” • Click “New.” • Provide the name for the cluster node and select the Cluster CLASS option. • Click “Next.” • Enable the checkboxes for the existing reporting server nodes that will be part of the

Cluster node, as shown in Screen 4. • Click “Save.”

Page 21: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

Screen 4 After the cluster node is created, the following information is added to the WebFOCUS Client odin.cfg file: NODE = CLUSTER BEGIN CLASS = CLUSTER ALTERNATE = 76XSRV,76XSRV1 DESCRIPTION = END More information on the cluster nodes enhancements can be found in the Developer Studio 7.6.10 Summary of New Features.

Page 22: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

I Know My Data’s There, But My Request Can’t Find It By Art Greenhaus How many people have ever experienced this scenario? You’re accessing a data system that has been up and running for a long time. Someone has asked you for detail on something that is included in a larger report. So you create a procedure, using selection to screen for the desired items. Unfortunately, you get zero records. Perplexed, you look at the raw data and, lo and behold, the desired data is there. So, you go back to your code, looking for some logic error. Everything looks fine. To try and narrow down the problem, you manually create an extract and use that. Now, everything works. Is FOCUS broken? Is the problem data volume-dependent? What’s going on? I recently encountered this very problem. My data was an extract, produced on an IBM mainframe. It was then sent to my PC via FTP for further processing. Therein lay the problem. When the data was extracted, the HOLD file created was sorted by the BY field and the HOLD MFD showed a SEGTYPE of S1, indicating the file was sorted low to high by the first field. After being downloaded, the MFD still showed a SEGTYPE of S1. However, not all sorts are created equal. On IBM mainframes, the sort sequence is EBCDIC. In EBCDIC, numbers sort after letters (among other differences). Unix and PC systems sort in ASCII. In ASCII, numbers sort before letters. Normally, this difference doesn’t really matter, but here it does, and here’s why: When accessing sequential files, there’s no “quick” way to access anything, through indices or other means. You must start at the first record, and continue to the last record. With large files, this can be resource-intensive. Think of looking up a name in a telephone directory (remember those?) by starting at page 1 and proceeding to the end, until the desired record is found. Not very efficient, is it? Now, just like in a telephone directory, if we know that the records are sorted (in a directory, by last name), then we know that if we pass where the desired record could possibly be, we can stop, since the record could not occur later in the file because it is sorted. We use this knowledge when an external “fixed format” file has a SEGTYPE of ‘Sn’ (low-to-high sort on first ‘n’ fields) or ‘SHn’ (high-to-low sort). Once we pass where the desired record can no longer occur, we stop. In my case, the field on which I was searching was the first field, an alpha field with a length of seven characters. Because the sort sequence was not the same as the one used by the operating system (EBCDIC instead of ASCII), when WebFOCUS encountered the first record (which began with an alpha), the assumption was that my desired record (which began with a numeric) could no longer be in the file. And that caused retrieval to stop.

Page 23: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

This can only happen under very special circumstances:

1. Testing on the first field (we only use this facility on the MAJOR sort field). 2. The first field is ALPHA (numerics sort correctly). 3. The field is a mixture of alphabetic and numeric characters or if all alphabetic

characters are in mixed case. 4. The sort is different from what is used by the operating system, or the records are not

really sorted. 5. the SEGTYPE is ‘Sn’ or ‘SHn’(n>=1) ,indicating sorted records.

Once the problem became obvious, there were several options to overcome it. First, we could have changed the SEGTYPE to S0 or blank (unsorted records). This could be done at file creation time, by having the first two sorts as the same field, with the first NOPRINTed (BY A NOPRINT BY A). If the first sort field is NOPRINTed, the records are assumed to not be sorted across the entire file. Alternatively, on the receiving side, the SEGTYPE in the MFD could be changed with an editor. A second way would be to not test on the value of the first field, but do some manipulation of it. For example, instead of saying WHERE key EQ ‘ABCD’, I could code WHERE EDIT(key,’9999’) EQ ‘ABCD’. Because we’re not doing a selection on the full key, we search the entire file. A third method, and perhaps the easiest, is to turn this efficiency OFF, allowing the search to traverse the entire file. This is controlled by a SET parameter called FIXRETRIEVE. If we SET FIXRETRIEVE=OFF, every search of sequential files will go through the entire file. Alternatively, we can disable this efficiency selectively, by using the syntax ON TABLE SET FIXRETRIEVE OFF in the request. While my problem was the result of a file transfer, there are other ways it can occur. Prior to creation of the MORE command to concatenate report outputs, users accomplished virtually the same thing by first creating a HOLD file (from the first output), and then appending subsequent report outputs to that output. This causes the case where the SEGTYPE says ‘Sx’, but that can only be guaranteed for output from the first request. Imagine if my output was BY COUNTRY, and the first request retrieved FRANCE. If a subsequent request retrieved ENGLAND, a search would never find ENGLAND because searching would stop once FRANCE was encountered.

Page 24: Scheduling a ReportCaster Job With a WebFOCUS Report€¦ · Scheduling a ReportCaster Job With a WebFOCUS Report By Efrem Litwin In the Autumn 2007 WebFOCUS Newsletter, I wrote an

The Premier Educational Event in Business Intelligence and Integration Information Builders Annual Summit User Conference empowers you to reach your peak professional development by taking advantage of the benefits of data quality management, advanced information access, personalized reporting, and dashboards. Summit 2010 is the most comprehensive training available on Information Builders WebFOCUS, FOCUS, and iWay Software solutions. Devoted to our customers, developers, and executives worldwide, Summit provides the most innovative coaching, the best networking, and the enhanced skills for handling today's critical business issues.

• Discover WebFOCUS 8, our upcoming release  • Develop your strategy for managing data quality and master data  • Discuss our solutions one-on-one with company executives and product experts  • Learn how to make everyone in your business a better analytical decision-maker  • Explore new products/features and review tips, techniques, and best practices  • Network with hundreds of your peers in the Information Builders user community  • Understand the relevance of new technologies, such as search, real-time monitoring,

and predictive analytics  

June 5-9, 2010 in Kissimmee, Florida  Register at http://www.informationbuilders.com/events/summit/index.html Focal Point Information Builders Developer Center – More Than a Message Board More than 4,700 developers from almost every profession and industry are collaborating on original, elegant solutions to complex, technical issues right now. Focal Point, Information Builders' online community, isn’t just a Web-based bulletin board; it’s an interactive network for problem-solving and sharing tips and techniques with your peers. Become a Focal Point member to: 

• Peruse more than 13,000 different topics for answers to your questions on FOCUS, WebFOCUS, and iWay Software solutions  

• Create a new topic for discussion and address your specific issue  • Display your technical prowess by posting a solution  • Stay informed on the latest developments in Information Builders’ solutions  

Membership is free, but the information is priceless! Register today: http://forums.informationbuilders.com