SAS enables you to create user-defined formats that execute instructions for displaying data values. For example, you might create a format that spells out an abbreviation, or that changes a numeric code to a more easily understood character string. In general, you can use your custom formats in SAS Visual Analytics explorations and reports. This SAS Note reviews the following topics:
Note: This SAS Note assumes that you know how to create a format catalog and how to apply formats to your data. For information about these tasks, see Additional resources.
Note: For information about user-defined formats in SAS® Viya®, see "Managing User-Defined Formats on the SAS Viya Platform" in the Data Administration section of the SAS® Viya® Platform Administration guide. For a link to the documentation, see the SAS Viya Platform documentation page.
There are two main steps to making existing user-defined formats available for use in SAS Visual Analytics 7.51 and earlier:
Tip: If you are using the default SAS Application Server (named SASApp) and your catalog is named formats.sas7bcat, then simply place a copy of formats.sas7bcat in SAS-config-dir/Lev1/SASApp/SASEnvironment/SASFormats and restart your object spawner.
Advanced steps
By default, the application server is SASApp, but you might have created another application server for use by SAS Visual Analytics. In that case, place the catalog in the appropriate directory for the server that you are using. For example, if you are using a server named SASAppVA, then the likely location for the catalog is SAS-config-dir/Lev1/SASAppVA/SASEnvironment/SASFormats. If SAS Visual Analytics uses multiple application servers, place a copy of the catalog in each location.
Your format catalog does not have to be named formats.sas7bcat, and it does not have to be stored in the default location. You can also have multiple format catalogs. For information about these tasks and more, see SAS Note 40103.
To make user-defined formats available during autoload, see "User-Defined Formats for Autoload" in the SAS Visual Analytics Administration Guide.
In SAS Visual Analytics Designer, the Format property of the data item displays the name of the format for both numeric and character data items. However, there are some differences between numeric and character data items.
Numeric data items
Character data items
Tip: Reports created before the formats were applied to the LASR table do not automatically update to show the formats. If the format changed a text string to another text string or a numeric value to another numeric value, then you can click the Refresh icon on the Data tab to see the formats. This assumes that you have updated the metadata for the input table and reloaded the table to LASR. Refreshing does not work for formats that change numeric values to character values. You must either re-create the report, or use the custom category feature.
In SAS Visual Data Builder, the Format property displays the name of the applied user-defined format. However, if you change the format, then you cannot restore the user-defined format. You must remove the column from the query and add it back. If you want to use the column with and without the format, then add a second copy of the column to the query.
Tip: Existing queries that use LASR tables as input do not automatically pick up new format information. You must remove the affected columns from the query and then add them back.
You can create a custom sort so that data items in a table or graph can sort to the top or to the bottom. Category data items, calculated items that are categories, and custom categories support custom sorts. A custom sort takes precedence over both formatted and unformatted user-defined formats.
The FORMAT procedure includes a LOCALE option that can be used to create locale-specific formats. However, these localized formats are not supported by the SAS LASR Analytic Server. For this reason, they are not honored in SAS Visual Analytics.
No release of SAS Visual Analytics supports picture formats that are created using any of the directives available for the DATATYPE option in the PICTURE statement. For more information, see SAS Note 56402.
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | SAS Visual Analytics (on SAS 9.x) | Linux for x64 | 7.5 | 9.4 TS1M6 | ||
Microsoft® Windows® for x64 | 7.5 | 9.4 TS1M6 |
Type: | Usage Note |
Priority: |
Date Modified: | 2023-06-16 16:36:18 |
Date Created: | 2012-07-31 11:42:53 |