Release 5.3 Internal Change Execution of Managed Reporting Procedures (FEXs)
By Susan Trommer
Managed Reporting customers have told us that line-number references in FOCUS error messages for Managed Reporting requests are incorrect, making debugging very difficult and time-consuming. In addition, the WebFOCUS Client SAVE_FEX trace was not helpful because of the internal
recursive processing Managed Reporting requests that add many comment lines and additional labels to the code in the FEX written to and run by the WebFOCUS Server. To address this issue there is a change in Release 5.3 to the way the client processes and submits Managed Reporting requests to the server. This change
is only implemented for the servlet. It is not implemented for the CGI or ISAPI.
To understand the benefits of this change in Release 5.3, it is important to first understand the pre-5.3 behavior. In pre-5.3 WebFOCUS releases the recursive processing of a Managed Reporting request is performed to integrate all the associated files (-INCLUDES, WebFOCUS Stylesheet, CSS,
images) stored in Managed Reporting to incorporate them into a single procedure (FEX).
Creating the single-procedure FEX includes the addition of 32 labels when executing My Reports based on Reporting Objects to flush the WebFOCUS Server label cache. The server caches the last 32 labels used so the 32 labels that are added prevent a label name conflict or navigation to the incorrect label.
Then the WebFOCUS Client evaluates that code for amper variables to prompt for. After gathering the parameter information entered by the user the procedure (FEX) is written to the server to the agent temporary directory and then executed by the server. So the end result is a procedure (FEX) that is executed by the
WebFOCUS Server, which does not have the same line references as the actual procedure (FEX) stored in Managed Reporting that the user selected to run.
In Release 5.3 this issue is address by writing each procedure (FEX) associated (-INCLUDEd) with an MR request that is stored in the Managed Reporting Repository to the WebFOCUS Server in the agent’s temporary directory. Within this processing the WebFOCUS Client (servlet only) will insure the
uniqueness of each FEX name it is writing to the agent’s temporary directory. It is possible for a Reporting Object and a My Report to have the same name because they are stored in different directories within the Managed Reporting Repository.
I’ve often been asked how the client assigns the actual physical filename (HREF value in the Properties option for a Managed Reporting procedure) based on the name you provide. So let me digress for a moment to explain this. You can skip the next two paragraphs if you already know this internal information.
When creating MR procedures (FEXs) the WebFOCUS Client (servlet or CGI) creates the physical filename with a maximum of eight characters because of legacy MVS support having the maximum filename length of eight characters. The filename is created based on the name/description the user provides by taking the first
eight characters that are not spaces or special characters. If this name does not already exist in the Managed Reporting Repository directory to which it is being written, the procedure (FEX) is created with that name. If that physical filename already exists, the client randomly generates an eight-character name.
Standard Reports and Other Files (that are FEXs or HTML) are stored in the /app directory within the domain directory, and Reporting Objects are stored in the /mrv subdirectory within the domain directory. End user My Reports and/or Custom Reports are stored in the
directory created for that user. Since it is typical for a user to save a My Report based on a Reporting Object using the same name/description of the Reporting Object, the percentage is very high that the user’s My Report and Reporting Object have the exact same physical procedure (FEX) name.
In Release 5.3, when executing a Managed Reporting procedure, the WebFOCUS Client determines the files within Managed Reporting Repository that will be written to the server. These include:
 |
INCLUDE references within the MR FEX that are not prefixed by MRNOEDIT label and/or included within a MRNOEDIT BEGIN and MRNOEDIT
END code block |
 |
References within Stylesheet code: |
| |
• |
Stylesheet (.sty) files reside in MR repository |
| |
• |
Cascading Stylesheet files (.css) that reside in MR repository |
| |
• |
Drill-down to other FEX in MR repository (Standard Reports or end user Custom Reports in same domain as main MR request) |
| |
• |
Images that reside in MR repository and are referenced in by app/imagename.ext. |
 |
WebFOCUS Client will change internal references to remove ‘app/’ and/or ‘user/’ context references that will not be relevant when the procedures are executed by WF Server. (user is the actual MR repository directory
and .htm filename created the first time an MR user logs into Managed Reporting.) Then the WebFOCUS Client will identify whether there is any filename duplication and will change the eighth character of the Reporting Object name to a number between 0 and 9 so that there is no filename duplication in the
set of procedures (FEXs) written to the WebFOCUS Server. Since this file duplication verification adds overhead to processing, the client in Release 5.3 will not create My Reports with the same name as the Reporting Object on which it is based. |
 |
The WebFOCUS Client will process this set of procedures (FEXs) for parameters to prompt for when the procedure being run has the "Prompt for Parameters" property selected and the site has not turned off the Managed Reporting dynamic parameter prompting feature. See the Managed
Reporting Developer Guide for information on the Managed Reporting dynamic parameter prompting feature and limitations that apply. |
 |
The Managed Reporting procedures (FEXs) are then written to the WebFOCUS Server along with the driver procedure (FEX) that the WebFOCUS client creates. |
When the WebFOCUS Server executes the procedures, it will respect normal search path processing and FOCUS language rules. Note that if you are including any procedures located on the server using the MRNOEDIT capabilities, you must take care to have name uniqueness within the set of
procedures written to the server from Managed Reporting and those that are being included by the Managed Reporting request that reside on the WF Server. To prevent procedure name uniqueness issues, include a reference to the application in which the procedure resides on the server. The syntax for the Managed
Reporting procedure is as follows: -MRNOEDIT INCLUDE APPNAME/FOCEXEC
Where APPNAME is the name of the WebFOCUS application on the WebFOCUS Server and FOCEXEC is the procedure name within that application.
I hope this article has educated you regarding the internals of Managed Reporting. The internal changes made in Release 5.3 make it easier for you to identify and resolve problems related to the FOCUS error messages returned by the WebFOCUS Server when running Managed Reporting procedures. This information will be
included in the Release 5.3 "Upgrade Considerations" document.

|