Features Added in FOCUS 7.7.07

In this section:

The following features were added as of FOCUS 7.7.07.

New LOCALE Settings

Reference:

New set parameters have been introduced to override locale-based attributes in a Master File.

You can set them in a TABLE request, a FOCEXEC, or in any supported profile. Some of these parameters also have been implemented at the field level as display format options.

Note that the LANGUAGE parameter, which used to be stored in nlscfg.err, will be saved in edasprof.prf.

Reference: Aliases for CDN Parameter Values

Aliases have been added to the existing CDN parameter values to make their meanings more clear. The following list describes the values from prior releases and the aliases that can now be used.

  • OFF. Uses a dot (.) as the decimal separator and comma (,) as the thousands separator. The alias for OFF is COMMAS_DOT. This is the default value.
  • ON. Uses a comma as the decimal separator and dot as the thousands separator. The alias for ON is DOTS_COMMA.
  • SPACE. Uses a comma as the decimal separator and space as the thousands separator. The alias for SPACE is SPACES_COMMA.
  • QUOTE. Uses a comma as the decimal separator and single quotation mark (') as the thousands separator. The alias for QUOTE is QUOTES_COMMA.
  • QUOTEP. Uses a dot as the decimal separator and single quotation mark as the thousands separator. The alias for QUOTEP is QUOTES_DOT.

Reference: New Currency Locale Parameters and Display Options

The following SET parameters have been added for specifying locale-based currency display, when the :C currency display option is used. All other currency display options are unaffected by these settings.

CURRENCY_ISO_CODE

This parameter defines the ISO code for the currency symbol to use.

The syntax is:

SET CURRENCY_ISO_CODE = iso

where:

iso

Is a standard three-character currency code such as USD for US dollars or JPY for Japanese yen. The default value is default, which uses the currency code for the configured language code.

CURRENCY_DISPLAY

This parameter defines the position of the currency symbol relative to the monetary number.

The syntax is:

SET CURRENCY_DISPLAY = pos

where:

pos

Defines the position of the currency symbol relative to a number. The default value is default, which uses the position for the format and currency symbol in effect. Valid values are:

  • LEFT_FIXED. The currency symbol is left-justified preceding the number.
  • LEFT_FIXED_SPACE. The currency symbol is left-justified preceding the number, with at least one space between the symbol and the number.
  • LEFT_FLOAT. The currency symbol precedes the number, with no space between them.
  • LEFT_FLOAT_SPACE. The currency symbol precedes the number, with one space between them.
  • TRAILING. The currency symbol follows the number, with no space between them.
  • TRAILING_SPACE. The currency symbol follows the number, with one space between them.

CURRENCY_PRINT_ISO

This parameter defines what will happen when the currency symbol cannot be displayed by the code page in effect.

The syntax is:

SET CURRENCY_PRINT_ISO = {DEFAULT|ALWAYS|NEVER}

where:

DEFAULT

Replaces the currency symbol with its ISO code, when the symbol cannot be displayed by the code page in effect. This is the default value.

ALWAYS

Always replaces the currency symbol with its ISO code.

NEVER

Never replaces the currency symbol with its ISO code. If the currency symbol cannot be displayed by the code page in effect, it will not be printed at all.

Note: Using a Unicode environment allows the printing of all currency symbols, otherwise this setting is needed.

Currency Display Options

The CURRENCY_ISO_CODE and CURRENCY_DISPLAY parameters can be applied on the field level as display parameters in a Master File DEFINE, a DEFINE command, or in a COMPUTE using the :C display option. The syntax is:

fld/fmt:C(CURRENCY_DISPLAY='pos',
   CURRENCY_ISO_CODE='iso')= expression;

where:

fld

Is the field to which the parameters are to be applied.

fmt

Is a numeric format that supports a currency value.

iso

Is a standard three-character currency code, such as USD for US dollars or JPY for Japanese yen. The default value is default, which uses the currency code for the configured language code.

pos

Defines the position of the currency symbol relative to a number. The default value is default, which uses the position for the format and currency symbol in effect. Valid values are:

  • LEFT_FIXED. The currency symbol is left-justified preceding the number.
  • LEFT_FIXED_SPACE. The currency symbol is left-justified preceding the number, with at least one space between the symbol and the number.
  • LEFT_FLOAT. The currency symbol precedes the number, with no space between them.
  • LEFT_FLOAT_SPACE. The currency symbol precedes the number, with one space between them.
  • TRAILING. The currency symbol follows the number, with no space between them.
  • TRAILING_SPACE. The currency symbol follows the number, with one space between them.
expression

Is the expression that creates the virtual field.

Note: If currency parameters are specified at multiple levels, the order of precedence is:

  1. Field level parameters.
  2. Parameters set in a request (ON TABLE SET).
  3. Parameters set in a FOCEXEC outside of a request.
  4. Parameters set in a profile, using the precedence for profile processing.

Example: Specifying Currency Parameters in a DEFINE

The following request creates a virtual field named Currency_parms that displays the currency symbol on the right using the ISO code for Japan, 'JPY'

DEFINE FILE WFLITE
Currency_parms/D20.2:C(CURRENCY_DISPLAY='TRAILING',CURRENCY_ISO_CODE='JPY') = COGS_US;
END
TABLE FILE WFLITE
SUM COGS_US Currency_parms
BY BUSINESS_REGION AS 'Region'
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF,$
END

The output is shown in the following image.

Reference: New Date and Time Locale Parameters

The following SET parameters have been added to specify the order of date components, the date separator character, and the time separator character for the &TOD system variable.

DATE_ORDER

This parameter defines the order of date components for display. The syntax is:

SET DATE_ORDER = {DEFAULT|DMY|MDY|YMD}

where:

DEFAULT

Respects the original order of date components. This is the default value.

DMY

Displays all dates in day/month/year order.

MDY

Displays all dates in month/day/year order.

YMD

Displays all dates in year/month/day order.

DATE_SEPARATOR

This parameter defines the separator for date components for display.

The syntax is:

SET DATE_SEPARATOR = separator

where:

separator

Can be one of the following values.

  • DEFAULT, which respects the separator defined by the USAGE format of the field.
  • SLASH, which uses a slash (/) to separate date components.
  • DASH, which uses a dash (-) to separate date components.
  • BLANK, which uses a blank to separate date components.
  • DOT, which uses a dot (.) to separate date components.
  • NONE, which does not separate date components.

TIME_SEPARATOR

This parameter defines the separator for time components for the &TOD system variable.

The syntax is:

SET TIME_SEPARATOR = {DOT|COLON}

where:

DOT

Uses a dot (.) to separate time components. This is the default value.

COLON

Uses a colon (:) to separate time components.

Reference: Usage Notes for Locale-Based Date and Time Parameters

  • DATE_ORDER and DATE_SEPARATOR override the specified date order for all date and date-time displays unless they include a translation display option (T, Tr, t, or tr), in which case the specified order is produced. To limit the scope to a request, use the ON TABLE SET phrase.
  • To use these settings with the Dialogue Manager system variables, (for example, &DATE, &TOD, &YMD, &DATEfmt, and &DATXfmt) append the suffix .DATE_LOCALE to the system variable. This allows system variables that are localized to coexist with non-localized system variables.

Example: Setting Date and Time Parameters for System Variables

The following applies the DATE_ORDER and DATE_SEPARATOR parameters to the &DATE system variable.

SET DATE_SEPARATOR = DASH
SET DATE_ORDER = DMY
-TYPE NON-LOCALIZED: &DATE
-TYPE LOCALIZED: &DATE.DATE_LOCALE

The output is:

NON-LOCALIZED: 04/07/17
LOCALIZED: 07-04-17

Applying Selection Criteria to the Internal Matrix Prior to COMPUTE Processing

How to:

Reference:

WHERE TOTAL tests are applied to the rows of the internal matrix after COMPUTE calculations are processed in the output phase of the report. WHERE_GROUPED tests are applied to the internal matrix values prior to COMPUTE calculations. The processing then continues with COMPUTE calculations, and then WHERE TOTAL tests. This allows the developer to control the evaluation, and is particularly useful in recursive calculations.

Syntax: How to Apply WHERE_GROUPED Selection Criteria

WHERE_GROUPED expression

where:

expression

Is an expression that does not refer to more than one row in the internal matrix. For example, it cannot use the LAST operator to refer to or retrieve a value from a prior record.

Example: Using a WHERE_GROUPED Test

The following request has two COMPUTE commands. The first COMPUTE checks to see if the business region value has changed, incrementing a counter if it has. This allows us to sequence the records in the matrix. The second COMPUTE creates a rolling total of the days delayed within the business region.

TABLE FILE WFLITE
SUM  DAYSDELAYED AS DAYS
COMPUTE CTR/I3 = IF BUSINESS_REGION EQ LAST BUSINESS_REGION THEN CTR+1 ELSE 1;
COMPUTE NEWDAYS = IF BUSINESS_REGION EQ LAST BUSINESS_REGION THEN NEWDAYS+DAYSDELAYED ELSE DAYSDELAYED;
BY BUSINESS_REGION AS Region
BY TIME_MTH
WHERE BUSINESS_REGION NE 'Oceania'
ON TABLE SET PAGE NOPAGE
END

The output is shown in the following image.

The following version of the request adds a WHERE TOTAL test to select only those months where DAYSDELAYED exceeded 200 days..

TABLE FILE WFLITE
SUM  DAYSDELAYED AS DAYS
COMPUTE CTR/I3 = IF BUSINESS_REGION EQ LAST BUSINESS_REGION THEN CTR+1 ELSE 1;
COMPUTE NEWDAYS= IF BUSINESS_REGION EQ LAST BUSINESS_REGION THEN NEWDAYS+DAYSDELAYED ELSE DAYSDELAYED;
BY BUSINESS_REGION AS Region
BY TIME_MTH
WHERE BUSINESS_REGION NE 'Oceania'
WHERE TOTAL DAYSDELAYED GT 200
ON TABLE SET PAGE NOPAGE
END

The output is shown in the following image. The COMPUTE calculations for CTR and NEWDAYS was processed prior to eliminating the rows in which TOTAL DAYSDELAYED were 200 or less, so their values are the same as in the original output. This does not correctly reflect the sequence of records and the rolling total of the values that are actually displayed on the output. To do this, we need to select the appropriate months (DAYSDELAYED GT 200) before the COMPUTE expressions are evaluated. This requires WHERE_GROUPED.

The following version of the request replaces the WHERE TOTAL test with a WHERE_GROUPED test.

TABLE FILE WFLITE
SUM  DAYSDELAYED AS DAYS
COMPUTE CTR/I3 = IF BUSINESS_REGION EQ LAST BUSINESS_REGION THEN CTR+1 ELSE 1;
COMPUTE NEWDAYS= IF BUSINESS_REGION EQ LAST BUSINESS_REGION THEN NEWDAYS+DAYSDELAYED ELSE DAYSDELAYED;
BY BUSINESS_REGION AS Region
BY TIME_MTH
WHERE BUSINESS_REGION NE 'Oceania'
WHERE_GROUPED DAYSDELAYED GT 200
ON TABLE SET PAGE NOPAGE
END

The output is shown in the following image. The COMPUTE calculation for NEWDAYS was processed after eliminating the rows in which TOTAL DAYSDELAYED were 200 or less, so its values are based on fewer rows than the calculations in the original request. This is verified by the CTR values, which are now in a continuous sequence. The rolling total now reflects the values that are actually displayed on the report output.

Reference: Usage Notes for WHERE_GROUPED

  • If the expression refers to multiple rows in the internal matrix, the following message is generated and processing stops.
    (FOC32692) WHERE_GROUPED CANNOT REFER TO OTHER LINES OF REPORT
  • A COMPUTE that does not reference multiple lines will be evaluated prior to WHERE_GROUPED tests, and may, therefore, be used in an expression and evaluated as part of a WHERE_GROUPED test.
  • WHERE_GROUPED can be optimized for SQL data sources by creating a GROUP BY fieldname HAVING expression clause, where the expression is the WHERE_GROUPED selection criteria.

Specifying a Geographic Role in a DEFINE or COMPUTE

How to:

If you define a virtual field or create a calculated value that is location-related, you can specify a geographic role. This may be helpful when using the field in a location-based chart request.

Syntax: How to Specify a Geographic Role in a DEFINE or COMPUTE

DEFINE name/fmt (GEOGRAPHIC_ROLE = georole)
   [MISSING ON NEEDS {SOME|ALL} DATA] = expression;
COMPUTE name/fmt (GEOGRAPHIC_ROLE = georole) 
  [MISSING ON NEEDS {SOME|ALL} DATA] = expression;

where:

name

Is a name for the virtual field or calculated value.

fmt

Is a valid format specification for the geographic value.

georole

Is a valid geographic role. Geographic roles can be names, postal codes, ISO (International Organization for Standardization) codes, FIPS (Federal Information Processing Standards) codes, or NUTS (Nomenclature of Territorial Units for Statistics ) codes. The following is a list of supported geographic roles.

  • ADDRESS_FULL. Full address.
  • ADDRESS_LINE. Number and street name.
  • CITY. City name.
  • CONTINENT. Continent name.
  • CONTINENT_ISO2. Continent ISO-3166 code.
  • COUNTRY. Country name.
  • COUNTRY_FIPS. Country FIPS code.
  • COUNTRY_ISO2. Country ISO-3166-2 code
  • COUNTRY_ISO3. Country ISO-3166-3 code
  • GEOMETRY_AREA. Geometry area.
  • GEOMETRY_LINE. Geometry line.
  • GEOMETRY_POINT. Geometry point.
  • LATITUDE. Latitude.
  • LONGITUDE. Longitude.
  • NUTS0. Country name (NUTS level 0).
  • NUTS0_CC. Country code (NUTS level 0).
  • NUTS1. Region name (NUTS level 1).
  • NUTS1_CC. Region code (NUTS level1).
  • NUTS2. Province name (NUTS level 2).
  • NUTS2_CC. Province code (NUTS level 2).
  • NUTS3. District name (NUTS level 3).
  • NUTS3_CC. District code (NUTS level 3).
  • POSTAL_CODE. Postal code.
  • STATE. State name.
  • STATE_FIPS. State FIPS code.
  • STATE_ISO_SUB. US State ISO subdivision code.
  • USSCITY. US city name.
  • USCITY_FIPS. US city FIPS code.
  • USCOUNTY. US county name.
  • USCOUNTY_FIPS. US county FIPS code.
  • USSTATE. US state name.
  • USSTATE_ABBR. US state abbreviation.
  • USSTATE_FIPS. US state FIPS code.
  • ZIP3. US 3-digit postal code.
  • ZIP5. US 5-digit postal code.

Example: Specifying a Geographic Role in a DEFINE

The following defines a field whose geographic role is the state name.

DEFINE FILE WFLITE
STATENAME/A20 (GEOGRAPHIC_ROLE = STATE) = STATE_PROV_NAME;
END

New Report-Level Prefix Operators

How to:

Reference:

Prefix operators have been added for headings, footings, subheadings, subfootings, verb objects, and calculated values (COMPUTEs) that calculate the average, maximum, minimum, and count for the entire report. They are based on the TOT. operator, which calculates total values to include in a heading.

These operators cannot be referenced in WHERE or WHERE TOTAL tests. However, they can be used in a COMPUTE command to generate a calculated value that can be used in a WHERE TOTAL test.

Syntax: How to Calculate Report-Level Average, Maximum, Minimum, and Count Values

operator.field 

where:

operator

Can be one of the following prefix operators.

  • TOTAVE. Calculates the average value of the field for the entire table.
  • TOTMAX. Calculates the maximum value of the field for the entire table.
  • TOTMIN. Calculates the minimum value of the field for the entire table.
  • TOTCNT. Calculates the count of the field instances for the entire table.
field

Is a verb object or calculated value in the request.

Example: Using Prefix Operators in a Heading

The following request uses prefix operators in the heading.

TABLE FILE WFLITE
HEADING
"Heading Calculations:"
"Total:      <TOT.COGS_US"
"Count:                   <TOTCNT.COGS_US"
"Average:           <TOTAVE.COGS_US"
"Minimum:            <TOTMIN.COGS_US"
"Maximum:      <TOTMAX.COGS_US"
SUM COGS_US CNT.COGS_US AS Count AVE.COGS_US AS Average 
MIN.COGS_US AS Minimum MAX.COGS_US AS Maximum
BY BUSINESS_REGION AS Region
BY PRODUCT_CATEGORY AS Category
WHERE BUSINESS_REGION NE 'Oceania'
ON TABLE SUBTOTAL COGS_US CNT.COGS_US  AS Total
ON TABLE SET PAGE NOPAGE
ON TABLE SET SHOWBLANKS ON
ON TABLE SET STYLE *
type=report,grid=off, size=11,$
ENDSTYLE
END

The output is shown in the following image.

Reference: Usage Notes for Report-Level Prefix Operators

  • These operators can be used on a field in a heading or footing without being referenced in a display command in the request.
  • They work in a heading or footing for real or virtual (DEFINE) fields. They work in a display command field list on real fields, virtual (DEFINE) fields, and calculated (COMPUTE) values that are calculated prior to their use in the request.
  • They can be used in subheadings and subfootings to reference the total value for the entire report.

Information Builders