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.

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.

MISSING ON NEEDS SOME Incorrectly Evaluates to MISSING

A request that creates a temporary field (either DEFINE or COMPUTE) with MISSING ON NEEDS SOME is evaluating to MISSING when there is an IF expression that contains two MISSING ON fields where one of them is MISSING.

The IF is testing for EQ 0 instead of EQ MISSING, and optimization improvements have made the test for the second field unnecessary. Change the IF to test for EQ MISSING.

Limit on Total Space Allowed for Headings and Footings Removed

The limit on the total space allowed for Headings, Footings, Subheadings, and Subfootings has been lifted, with the space now being allocated dynamically. The following message will no longer be generated.

(FOC021) THE MAXIMUM HEADING/FOOTING SIZE HAS BEEN EXCEEDED

Spacing in EXL2K Formatted Reports With Headings or Footings

In EXL2K formatted reports, with headings or footings containing multiple items that are separated by spot markers without spaces, the spot marker adds an additional space between the items within the text in the cell. The workaround is to use XLSX formatted reports, instead.

Increased Number of ACROSS Columns

The increased number of ACROSS columns to 1024 may exceed browser support for colspans in a table. Prior to the increased limit, users received a WebFOCUS message. Now, the table is created, but may present with issues due to browser limitations.

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.

WebFOCUS

Feedback