Customizing the SAS/Warehouse Administrator Interface |
Overview |
In SAS/Warehouse Administrator, you use the Expression Builder window to define a SAS expression, which can transform columns, provide conditional processing, calculate new values, and assign new values. For example, you could use the Expression Builder window when defining properties for a Mapping process to convert a character date into a SAS date.
In the Expression Builder window, under the label Components, is a list of expression components from which you select as you define an expression.
SAS/Warehouse Administrator obtains the default list of expression components that display under the label Standard from the SAS data set SASHELP.WAXFORM. For example, the following Expression Builder window displays the default character formats:
To add your own expression components, you can create a SAS data set named _SASWA.WAXFORM, using the same format as SASHELP.WAXFORM. When _SASWA.WAXFORM exists, the Expression Builder window displays the label Extensions, which lists the customized expression components, for example, My Informats and My Macros.
Note: For more information about the Expression Builder window and how to define expressions, see the online Help that displays by clicking .
Creating _SASWA.WAXFORM |
To add your own expression components, create a SAS data set named _SASWA.WAXFORM, using the same format as SASHELP.WAXFORM. The format of SASHELP.WAXFORM is as follows:
Column Name | Type | Length | Format | Informat | Label |
---|---|---|---|---|---|
category | C | 40 | $40. | $40. | Primary categorization of expression component. |
area | C | 40 | $40. | $40. | Secondary categorization of the expression component that is specific to the category. |
name | C | 40 | $40. | $40. | Name of expression component. |
desc | C | 200 | $200. | $200. | Description of expression component. |
text | C | 198 | $198. | $198. | Text of expression component. |
preblank | N | 8 | BEST12. | BEST32. | Indicates whether a blank should be inserted before the text for this transformation. Less than 1 = no preceding blank. 1 or more = add a preceeding blank. |
pstblank | N | 8 | BEST12. | BEST32. | Indicates whether a blank should be inserted after the text for this transformation. Less than 1 = no succeeding blank. 1 or more = add a succeeding blank. |
usedesc | N | 8 | BEST12. | BEST32. | A variable used to determine if the description field entered for this component should replace the description for the expression. 1 replaces the description. 0 says that the description is for informational purposes. |
active | N | 8 | BEST12. | BEST32. | Indicates whether this entry is active. 1 = active entry and should appear as a component. 0=not active. |
When _SASWA.WAXFORM exists, the Expression Builder window displays the label Extensions, which lists the customized expression components. The items in the components list are taken from the list of unique values of the CATEGORY column in _SASWA.WAXFORM.
Note the following when you create _SASWA.WAXFORM:
The TEXT column value can contain double quotes (") or single quotes ('), but not both.
The combination of data set, category, area, and name makes a row unique. Therefore, the same area name can be contained in multiple categories, and the same name can be contained in multiple areas.
You can insert placeholders into the TEXT column to signify the location and type of parameters needed. The following is a list of placeholders:
Placeholder | Meaning |
---|---|
%character% | character value |
%numeric% | numeric value |
%datetime% | SAS datetime value |
%date% | SAS date value |
%year% | 2 or 4 character year |
%quarter% | the number 1-4 to represent the quarters of a year |
%month% | the number 1-12 to represent the month of the year |
%day% | the number 1-31 to represent the day of the month |
%interval% | a character string to represent the type of interval to use |
%hour% | the number 0-23 to represent the hour of the day |
%minute% | the number 0-59 to represent the minute of an hour |
%second% | the number 0-59 to represent the second of the minute |
%juliandate% | julian date value |
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.