In this section: |
The following features were added as of FOCUS 7.7.07.
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.
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.
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:
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:
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:
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:
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 replaces the currency symbol with its ISO code.
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:
Is the field to which the parameters are to be applied.
Is a numeric format that supports a currency value.
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.
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:
Is the expression that creates the virtual field.
Note: If currency parameters are specified at multiple levels, the order of precedence is:
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.
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:
Respects the original order of date components. This is the default value.
Displays all dates in day/month/year order.
Displays all dates in month/day/year order.
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:
Can be one of the following values.
TIME_SEPARATOR
This parameter defines the separator for time components for the &TOD system variable.
The syntax is:
SET TIME_SEPARATOR = {DOT|COLON}
where:
Uses a dot (.) to separate time components. This is the default value.
Uses a colon (:) to separate time components.
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
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.
WHERE_GROUPED expression
where:
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.
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.
(FOC32692) WHERE_GROUPED CANNOT REFER TO OTHER LINES OF REPORT
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.
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:
Is a name for the virtual field or calculated value.
Is a valid format specification for the geographic value.
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.
The following defines a field whose geographic role is the state name.
DEFINE FILE WFLITE STATENAME/A20 (GEOGRAPHIC_ROLE = STATE) = STATE_PROV_NAME; END
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.
operator.field
where:
Can be one of the following prefix operators.
Is a verb object or calculated value in the request.
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.
|
Information Builders |