WebFOCUS Language

Topics:

The following are release considerations and product changes for the WebFOCUS reporting language.

Change to Default Processing of Joins to Flat Files

The default value for the ENGINE INT CACHE SET command has changed from OFF to ON.

In fixed format or delimited sequential files, any field can be a cross-referenced field. However, both the host and cross-referenced file must be retrieved in ascending order on the named (key) fields, if the command ENGINE INT CACHE SET OFF is in effect. In this situation, if the data is not in the same sort order, errors are displayed and a many-to-many join is not supported.

However, if ENGINE INT CACHE SET ON is in effect, the files do not have to be in ascending order and a many-to-many join is supported. ON is now the default value. Therefore, the number of rows returned from a join may be different than in the prior release.

You can revert to the behavior from prior releases by including ENGINE INT CACHE SET OFF in edasprof.

A delimited file used as the cross-referenced file in the join must consist of only one segment. If the join is based on multiple fields, a fixed format sequential file must consist of a single segment. If the cross-referenced fixed format sequential file contains only one segment, the host file must have a segment declaration.

Expression Handling: Rounding With Internally Used Packed Fields

Continuous improvement to our expression handler, providing more efficient and more accurate results, may expose some rounding differences when using packed fields. Enhancements have improved the accuracy of the calculations when working with packed numbers. Rounding of a packed field is done at the time of storage, thus changing the actual number. This is different from precision-based fields which round when they are displayed, ensuring that the original number is retained. Therefore, there may be slight rounding differences with packed numbers apparent in this release, but they are an improvement over previous releases.

Raised Limit for RECAP Phrases in Non-FML TABLE Requests

The limit of non-FML RECAP phrases is now 64 ON sortfield RECAP phrases per sort field. In prior releases, seven RECAP phrases were supported for each sort field plus one ON TABLE RECAP phrase.

Conversion of Alphanumeric Strings to Numbers

The latest version of WebFOCUS has been improved to handle the conversion of alphanumeric strings to numbers automatically on assignment in an expression. For example, if the character string '12345' is assigned to an integer field, you will no longer get a FOC282 conversion error.

(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: %1
The left-hand side of the expression has a different format from
that yielded by the right-hand side of the expressions.  Alpha
fields may have the wrong length or a format may be needed after
the fieldname.

The string will be converted to an integer as specified in the format of the receiving field. If the character string is not purely numeric, for example, '$12345', the conversion will fail and the value 0 will be assigned. Since this is now a runtime error, rather than a parsing error as in the case of the FOC282, the new FOC1130 error message can be seen in the browser view source.

(FOC1130) FORMAT CONVERSION ERROR FIELD/KEY %1%2%3%4
An error occurred attempting to convert the
specified field from its ACTUAL to USAGE
format. Either the ACTUAL format is described
incorrectly or the data may be invalid. Check the MFD.

In the past, a FOC282 error would be generated and the request would be aborted. The new behavior allows the request to run and is consistent with our longstanding user function behavior, which returns 0 in the case of failure in the user function. If your output now includes an entire column or row of zeroes, it would be wise to verify the output, as it may be indicative of FOC1130 runtime errors.

One area to be aware of is the use of column notation in a request that includes COMPUTEs or NOPRINTed fields that will change the numbering of the columns. SET CNOTATION=ALL/PRINTONLY/EXPLICIT should be used in these cases to make sure that the column numbers you are requesting are the correct corresponding columns in the internal matrix.

Change to Use of Prefix in JOIN AS Commands

In a series of JOIN commands without tag names, when the same file is used multiple times, the join name is used as a prefix for duplicate field names. One example of this type of JOIN sequence is a recursive join.

In prior releases, if you prefixed a field with a join name within a JOIN command, the JOIN was added to the table of joins whether the need for the prefixed name could be established or not. If the prefixed name could be resolved at run time, the request would run without error. In the current release, unresolved prefixed names in a JOIN command generate an error message and terminate processing as soon as the JOIN command is issued.

The following request produces three data sources:

  • File ALLEMP contains employee IDs and Manager IDs.
  • File HOLDEMP contains employee IDs and employee names.
  • File HOLDZIP contains employee IDs and zip codes.

The following request creates these data sources.

DEFINE FILE EMPLOYEE
ZIP/A20=GETTOK(ADDRESS_LN3,20,-1,' ',20,'A20');
END
TABLE FILE EMPLOYEE
PRINT LAST_NAME
  COMPUTE MANAGER_ID/A9=IF MANAGER_ID NE ' ' AND
     DEPARTMENT EQ LAST DEPARTMENT THEN MANAGER_ID ELSE EMP_ID;
BY DEPARTMENT
ON TABLE HOLD AS ALLEMP
END
TABLE FILE EMPLOYEE
PRINT SEG.EMP_ID
BY EMP_ID
ON TABLE HOLD AS HOLDEMP FORMAT FOCUS INDEX EMP_ID
END
TABLE FILE EMPLOYEE
SUM   ZIP
BY EMP_ID
ON TABLE HOLD AS HOLDZIP FORMAT FOCUS INDEX EMP_ID

JOIN commands will be used to generate the following structure using these files.

The following request generates the JOIN structure and issues a TABLE request against it.

JOIN EMP_ID IN ALLEMP TO EMP_ID IN HOLDEMP AS J1
JOIN J1EMP_ID  IN ALLEMP TO EMP_ID IN HOLDZIP AS J3
JOIN MANAGER_ID IN ALLEMP TO EMP_ID IN HOLDEMP AS J2
JOIN J2EMP_ID IN ALLEMP  TO EMP_ID IN HOLDZIP AS J4
TABLE FILE ALLEMP
PRINT EMP_ID MANAGER_ID
   LAST_NAME J2LAST_NAME
   J3ZIP  J4ZIP
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END

Running the request in the current release generates the following message.

(FOC370) THE FIELDNAME USED IN JOIN CANNOT BE FOUND IN THE FILE: J1EMP_ID
BYPASSING TO END OF COMMAND

In prior releases, this request would run without error. However, since the need for the prefixed field name J1EMP_ID in JOIN J3 was not established by the time that JOIN command was issued, in the current release the error is produced and the request is terminated.

Now, reverse the second and third JOIN commands.

JOIN CLEAR *
JOIN EMP_ID IN ALLEMP TO EMP_ID IN HOLDEMP AS J1
JOIN MANAGER_ID IN ALLEMP TO EMP_ID IN HOLDEMP AS J2
JOIN J1EMP_ID  IN ALLEMP TO EMP_ID IN HOLDZIP AS J3
JOIN J2EMP_ID IN ALLEMP TO EMP_ID IN HOLDZIP AS J4
TABLE FILE ALLEMP
PRINT EMP_ID MANAGER_ID
   LAST_NAME J2LAST_NAME
   J3ZIP  J4ZIP
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END

The prefixed field name J1EMP_ID is now needed to establish whether the EMP_ID field referenced in JOIN J3 refers to the EMP_ID field from JOIN J1 or from JOIN J2. Similarly, a prefixed EMP_ID field is needed in JOIN J4. The output is shown in the following image.

Report With Data Visualization Bar Graphs

The new HTML approach to generating data visualization bar graphs may cause a change in the display. The new approach, as also used by AHTML, defines the colored bar graphs with HTML tags, rather than images.

As a result:

  • Printing is not supported.
  • The zero indicator bar is now present in all reports. Previously, it was only present when negative values were represented.
  • The height of the bar has become slightly larger.

As a workaround, to revert back to legacy functionality, issue the following SET command:

SET HTMLDATABARS = {ON|OFF}

where:

ON

Produces the new HTML-based data visualization bar graphs. This is the default value.

OFF

Produces the legacy image-based data visualization bar graphs.

Upgrading HTML Pages for Modern Browsers

To meet the latest HTML5 and browser standards, the following enhancements have been implemented to generated HTML tags:

  • Standard tags are the default behavior.
    • On the Reporting Server, the default setting for HTMLCSS is ON.
    • For procedures created by WebFOCUS tools, the default setting for HTMLCSS is ON.
  • Added a document type designation to identify which browser mode will operate best.
    • The HTML5 DOCTYPE has been inserted for the highest level of functionality.
    • In certain features, HTML4 mode supports the legacy interactive functionality.
  • The default for embedding images into HTML pages has been changed to embed a 64-bit encoded image, rather than generating a web archive.

Converting WebFOCUS StyleSheet Syntax to CSS Tags

HTMLCSS is an attribute identifying that the report will be styled using an internal WebFOCUS StyleSheet.

  • With HTMLCSS ON, report styling defined in the WebFOCUS internal StyleSheet is inserted into the HTML page using standard HTML tags. Styling is further affected by settings from external sources, such as external CSS or browser defaults.
  • With HTMLCSS OFF, enhanced styling defaults to settings from external sources, such as external CSS or browser defaults.

The following table identifies the WebFOCUS styling attributes that are not supported with HTMLCSS OFF. For these attributes, the defaults are set by the browser or any external CSS in place. With HTMLCSS ON, the WebFOCUS styling will be applied, causing changes in how the report presents.

Attribute

HTMLCSS ON

HTMLCSS OFF

FONT

Defined font face

Browser default

FONT SIZE

Defined font size

Browser default

WRAP

As defined in the procedure

Browser default

SQUEEZE

As defined in the procedure

Always removes trailing spaces

WIDTH

As defined in the procedure

Browser default

BORDERS

Displays borders

Displays grids only

GRID

Displays grids

No styling

MARGIN

Defined margins

Browser default

POSITION=n

In headings and footings, position designated values or text designated units from left margin

Concatenates all elements without trailing spaces

The following are usage notes for HTMLCSS ON:

  • Changes in FONT face and SIZE caused by respecting the internal StyleSheet will cause reports to grow in width and height, based on the defined font attributes.
  • When GRID and COLOR (font color) are used together, the defined color is applied to both the font and the internal grid lines of the cell.
  • JUSTIFY = CENTER is supported at the report level with HTMLCSS ON.
  • The vertical alignment of data within a row that contains multiple lines will shift from the browser default to aligning to the top of the cell.
  • With HTMLCSS OFF, images are positioned at the start of a cell and the text flows around them. With HTMLCSS ON, the image and the text can be positioned by StyleSheet syntax and spaces inserted within the report.
  • In heading and footing text, field values can be concatenated with all internal spaces removed. With HTMLCSS OFF, a text string is trimmed with no trailing space so "Category<CATEGORY" will present as "CategoryCOFFEE". With HTMLCSS ON, a trailing space is retained when the text string is trimmed, so the text string will present as "Category COFFEE".
  • With HTMLCSS OFF, the color of the hyperlink is set by the browser. With HTMLCSS ON, the hyperlink color can be set within the style sheet. With HTMLCSS ON:
    • Hyperlink color will take precedence over font color. Prior to Release 8.2 Version 01, when a font color was set for the whole report or a specific area, hyperlinks presented in the report color, rather than hyperlink blue.
    • In Release 8.2 Version 01, support for customizing a hyperlink color (HYPERLINK-COLOR) is available. For more information, see the Creating Reports With WebFOCUS Language manual.
  • Positioning of peer graphs may shift within the report.

Document Type Designation to Identify Browser Mode

DOCTYPE is a declaration placed at the top of each HTML page to provide browsers with information on what type of document to expect.

The addition of the HTML5 DOCTYPE will cause all pages to be viewed in Internet Explorer 11 in Standards Mode or the highest available mode for the selected browser. This upgraded standard allows enhanced functionality in the WebFOCUS interactive features, including:

  • Cascading Multi-drill menus with styling (DRILLMENUITEM)
  • Expand By Row Accordion Reports (EXPANDBYROW)
  • Freeze Horizontal Frames (HFREEZE)
  • HTML Table of Contents (HTMLTOC)

The following interactive features will continue to operate with an HTML4 DOCTYPE:

  • Accordion by Column (EXPANDABLE)
  • On Demand Paging (WEBVIEWER)
  • OLAP

Note: For the above HTML4 interactive features, the legacy menus (blue and red) will appear, rather than the new cascading menus.

Changes in behavior:

  • With HTML5 pages, the external CSS tags have become case sensitive.
  • There may be a slight adjustment of margins on the report page, based on browser defaults.

Change to AnV Fields When Output to a Delimited Format

When an AnV field is used in a request that generates a delimited file as output (FORMATS COM, COMT, TAB, TABT, and DFIX), trailing blanks in the AnV field are now retained. To have them removed, issue the SET HLDCOM_TRIMANV=ON command.

Changes to the HTMLEMBEDIMG and HTMLARCHIVE Commands (HTML/DHTML)

The following are release considerations and product changes for the HTMLEMBEDIMG and HTMLARCHIVE commands:

  • The default value for HTMLEMBEDIMG has changed from AUTO to ON.
  • Embedded images are now supported in all WebFOCUS-supported browsers across all platforms.
  • Due to this change, most requests will generate a .htm file, not a .mht file, with embedded images. For images placed at the REPORT level with absolute references, HTMLARCHIVE (and PDF) places images relative to the top of the page, while HTMLEMBEDIMG places images relative to the top of the table.

DHTML Output Format

In DHTML format reports using ACROSSTITLE=SIDE and BORDERS at the REPORT level, attributes assigned to the STYLE keyword, including BOLD and UNDERLINE, are now applied.

Change to ACROSS Column Limit

The limit on the number of ACROSS columns has been removed. The limit on the number of ACROSS keys remains the same. Total sort keys (BY and ACROSS) has a maximum of 128.

Enhancement for JPG Compression

By default, the algorithm used to compress JPG images has been enhanced from FLATE to DCT. The DCT setting gives you control over the balance of image quality verses image size.

DCT (Discrete Cosine Transform) is a compression method, introduced in WebFOCUS Release 8.2 Version 01, which allows for the designation of the percentage of quality to be retained within the compressed image. In some images, quality loss is not noticeable when higher degrees of compression are applied. Generally, the higher the compression applied, the lower the image quality.

The default setting has been changed from FLATE at 100% to DCT at 75%.

For more information on the SET JPEGENCODE and SET JPEGQUALITY commands, see the Developing Reporting Applications manual.

Changes to Report Backcolor

The following are release considerations and product changes for report backcolor:

  • An enhancement has been implemented to standardize how all reports present alternating backcolor. It should now consistently present the colors in the order defined in the StyleSheet. This may cause a change in behavior for reports that previously presented the colors in reverse order.
  • For alternating backcolor in a report, you can define two colors in the order they should be presented. In releases prior to Release 8.2 Version 01, features that require a second pass for styling (for example, borders, TABLASTPAGE, and SQUEEZE=ON) presented alternating colors starting with the second color, followed by the first color. As of Release 8.2 Version 01, all features work consistently, presenting the first color and then the second color. This may cause the alternating pattern to change in some instances.

Change to the HTMLCSS Command (HTML/DHTML)

The following are release considerations and product changes for HTMLCSS:

  • The default value for the HTMLCSS parameter has changed to ON. All core WebFOCUS styling is activated by this change.
    • Due to this change in the default, you must add the SET HTMLCSS=OFF command to the procedure to provide continued support for external cascading style sheet styling.
    • When HTMLCSS=ON, and grids are enabled, the inner gridlines inherit the color applied to the font defined in each cell.
    • When HTMLCSS=ON and SQUEEZE=OFF, the em font measurement is used. The em font measurement is based on the point size of the font, which is the height of the character set including ascenders, descenders, and gap spacing. An em font measurement is wider than the largest letter in the font, usually a capital M or W, because it is not a measurement of width. Given these font measurement considerations, for requests with SQUEEZE=OFF, the following is recommended for the column width calculation to be the largest column value or the width of the column title, whichever is larger:
      • Use proportional font.
      • Add the SET HTMLCSS=OFF command to the procedure.
    • When HTMLCSS=OFF and SQUEEZE=OFF, use a proportional font, since each proportional font character is the same size. The column width will be the largest column width calculation or the width of the column title, whichever is larger.

Enhancement to the SET EXTENDNUM Command

The SET EXTENDNUM enhancement ensures that data values within a report no longer present as asterisks if the value is larger than the defined format. With the default value of EXTENDNUM=AUTO, report columns will automatically expand to fit the largest data value.

Column alignment is affected by the EXTENDNUM default in the following ways:

  • For styled table-based formats (HTML, EXL2K, and XLSX), column alignment will always be maintained.
  • For positioned output formats (PDF, PS, DHTML, PPT, and PPTX), where column locations are explicitly set, use SQUEEZE=ON to ensure that all data columns maintain alignment.
  • For unstyled formats (WP), the columns are not adjusted to fit the new values, which may cause misalignment of data columns.

Usage Considerations

  • Compound documents (PDF, DHTML, PPT, and PPTX) do not currently support paneling within component reports.
  • Integers larger than 2GB cannot display on 32-bit machines. Therefore, such integers on these machines will display incorrect values.
  • Floating-point numbers (types F and D) that require more than 31 digits to print correctly will continue to display asterisks. For example, a field with usage D33.30 and a value of 10.0 will print as asterisks because it needs 30 zeros to the right of the decimal point and two digits to the left.

Numeric Precision in XLSX Workbooks

The following change in behavior describes how numeric precision in XLSX workbooks is defined in each of the WebFOCUS releases and how changes in this area might affect the numbers generated.

Numeric precision is defined by the number of significant digits retained in the value placed within the workbook. The value displayed in the worksheet cell will always reflect the digits defined in the display format. The value displayed in the formula bar represents the actual number passed from WebFOCUS.

The following table shows how numeric precision has changed across releases for the following sample value and format:

Value
32.123456789876567898

Format

D20.10

WebFOCUS Release

Precision Passed from WebFOCUS to Excel

Formula Bar Display

Cell Display

Prior to Release 8.1 Version 05M

Output preserves up to six (6) decimal places. The values are truncated and rounded based on WebFOCUS calculation rules. Additional digits in the display format are padded with zeros (0).

32.123457

32.1234570000

Release 8.1 Version 05M

Output preserves the number of decimals places defined in the display format plus two (2), to support transformation in formulas and totals. The values are truncated and rounded based on WebFOCUS calculation rules.

32.123456789877

32.1234567899

Release 8.2 Version 01M and higher

Output preserves up to the Excel limit of 15 digits. Rounding is performed by Excel for values greater than 15. These rules also apply to data values defined with double precision or packed, with the percentage display format (D%, P%).

32.1234567898766

32.1234567899

XLSX FORMULA and EXL2K FORMULA

Only columns that precede the formula column will be included as a cell reference. Columns referenced in a COMPUTE command that occur after the COMPUTE in the report are represented in formulas by value, rather than reference.

Locale Settings

  • In EXL2K reports, the insertion of ISO codes for currency symbols generates view-only workbooks. In some cases, the symbol may be incorrectly represented.
  • The following CURRENCY SET commands are not supported in EXL2K FORMULA:
    • SET CURRENCY_ISO_CODE
    • SET CURRENCY_DISPLAY
    • SET CURRENCY_PRINT_ISO

Conditional Styling With Borders

When individual top or bottom borders are defined (for example, BORDER-TOP=LIGHT or BORDER-BOTTOM=HEAVY), they may not present as specified if any existing conditional styling clause is not met for that cell. A workaround is to use the overall border syntax to apply borders to the entire cell (for example, BORDER=LIGHT).

Error Messages

Some messages that did not have numbers in prior release now have them and will display where no message displayed previously. You can use the SET WARNING command to change the status of selected messages.

DST. With NOPRINT

In prior releases, the NOPRINT option was not respected for fields prefixed with the DST. operator. They appeared on the report output and were propagated to a HOLD file even with SET HOLDLIST=PRINTONLY in effect. This behavior has now changed so that the NOPRINT is respected.

Execution of Compound Reports

As of Release 8.2, a compound report will not be created when any of its component reports fail. To safeguard against issues caused by components dependent on earlier components that might return zero records, you can use Dialogue Manager to capture the record count of the initial HOLD file and skip over the dependent component when no file was generated by the earlier component.

Changes to Default MATCH FILE Processing

In prior releases, MATCH FILE requests did not group verb objects with their sort keys across files. The resulting record was laid out by appending the fields from each file to the resulting record in the HOLD file. The current default behavior is to group verb objects with their sort keys. This can result in the fields being propagated to the HOLD file in a different order and can affect the MATCH results if the request uses the default alias names generated in the HOLD Master File. The advantage of this technique is that it supports HOLD file formats, such as FORMAT FOCUS that generate an associated Master File. If you need to invoke the processing from prior releases, issue the following command.

SET MATCHCOLUMNORDER = UNGROUPED

Using &Variables as Dialogue Manager Labels

When using amper variables as Dialogue Manager labels, using the following syntax works correctly and navigates to the label name indicated by the amper variable.

-GOTO &LABEL

However, the following syntax does not navigate to the label indicated but rather generates the message FOC305 SPECIFIED LABEL NOT FOUND.

-IF condition THEN GOTO &LABEL; 

This can be resolved by adding the .EVAL suffix to the amper variable.

-IF condition THEN GOTO &LABEL.EVAL ; 

Change in Results With WHERE TOTAL, Multi-Verb, and MAX.

A multi-verb request that uses the same field name in a WHERE TOTAL as it does in a field calculation causes a different output.

If a prefix operation is done on the same field in the lower verb request, the WHERE TOTAL is using the first verb occurrence, which is not intended behavior.

Changing verb object names to be unique or switching the multi-verb request to a single-verb request using WITHIN works.

NATVFLG=2 causes VALIDATE error

Customers who were previously told to issue the command SET NATVFLG=2 to rectify a rounding issue for specific double precision numbers should remove this setting from their applications, as it is no longer needed and may cause equality test failures.

WebFOCUS

Feedback