Chapter Contents

Previous

Next
The REPORT Procedure

CALL DEFINE Statement


Sets the value of an attribute for a particular column in the current row.

Restriction: Valid only in a compute block that is attached to a report item.
Featured in: Consolidating Multiple Observations into One Row of a Report


CALL DEFINE (column-id, 'attribute-name', value);

The CALL DEFINE statement is often used to write report definitions that other people will use in a windowing environment. Only the FORMAT, URL, URLBP, and URLP attributes have an effect in the nonwindowing environment. In fact, URL, URLBP, and URLP are effective only in the nonwindowing environment. The STYLE= attribute is effective only when you are using the Output Delivery System to create HTML or Printer output. (See Attribute Descriptions for descriptions of the available attributes.)


Required Arguments

column-id
specifies a column name or a column number. A column ID can be one of the following:

attribute-name
is the attribute to define. For attribute names, refer to Attribute Descriptions .

value
sets the value for the attribute. For values for each attribute, refer to Attribute Descriptions .

Attribute Descriptions
Attribute Description Values Affects
BLINK Controls blinking of current value 1 turns blinking on; 0 turns it off windowing environment
COLOR Controls the color of the current value in the REPORT window 'blue', 'red', 'pink', 'green', 'cyan', 'yellow', 'white', 'orange', 'black', 'magenta', 'gray', 'brown' windowing environment
COMMAND Specifies that a series of commands follows a quoted string of SAS commands to submit to the command line windowing environment
FORMAT Specifies a format for the column a SAS format or a user-defined format windowing and nonwindowing environments
HIGHLIGHT Controls highlighting of the current value 1 turns highlighting on; 0 turns it off windowing environment
RVSVIDEO Controls display of the current value 1 turns reverse video on; 0 turns it off windowing environment
STYLE= Specifies the style element for the Output Delivery System See Using the STYLE= Attribute
HTML and Printer output
URL Makes the contents of each cell of the column a link to the specified Uniform Resource Locator (URL)* a quoted URL (either single or double quotation marks can be used) HTML output
URLBP Makes the contents of each cell of the column a link. The link points to a Uniform Resource Locator that is a concatenation of
  1. the string that is specified by the BASE= option in the ODS HTML statement

  2. the string that is specified by the PATH= option in the ODS HTML statement

  3. the value of the URLBP attribute*,#

a quoted URL (either single or double quotation marks can be used) HTML output
URLP Makes the contents of each cell of the column a link. The link points to a Uniform Resource Locator that is a concatenation of
  1. the string that is specified by the PATH= option in the ODS HTML statement

  2. the value of the URLP attribute*,#

a quoted URL (either single or double quotation marks can be used) HTML output
* The total length of the URL that you specify (including any characters that come from the BASE= and PATH= options) cannot exceed the line size. Use the LS= option in the PROC REPORT statement to alter the line size for the PROC REPORT step. (See the discussion of LS= .)

#For information on the BASE= and PATH= options, see the documentation for the ODS HTML statement in The Complete Guide to the SAS Output Delivery System.


Note:   The attributes BLINK, HIGHLIGHT, and RVSVIDEO do not work on all devices.  [cautionend]


Using the STYLE= Attribute
The STYLE= attribute specifies the style element to use in the cells that are affected by the CALL DEFINE statement.

The STYLE= attribute functions like the STYLE= option in other statements in PROC REPORT. However, instead of acting as an option in a statement, it becomes the value for the STYLE= attribute. For instance, the following CALL DEFINE statement sets the background color to yellow and the font size to 7:

 call define(_col_, "style", 
             "style=[background=yellow font_size=7]");

The general form for the value of the style attribute is
STYLE=<style-element-name><[style-attribute-specification(s)]>

Note:   You can use braces ({ and }) instead of square brackets ([ and ]).  [cautionend]

style-element-name
is the name of a style element that is part of a style definition that is registered with the Output Delivery System. SAS Institute provides some style definitions. Users can create their own style definitions and style elements with PROC TEMPLATE.
Default: If you do not specify a style element, PROC REPORT uses Data.
See also: For information about Institute-supplied style definitions, see What Style Definitions Are Shipped with the Software? .

For information about PROC TEMPLATE and the Output Delivery System, see The Complete Guide to the SAS Output Delivery System.

style-attribute-specification
describes one or more style attributes to change. Each style-attribute-specification has this general form:
style-attribute-name=style-attribute-value

You can set the following style attributes in the CALL DEFINE statement:

ASIS= FONT_WIDTH=
BACKGROUND= HREFTARGET=
BACKGROUNDIMAGE= HTMLCLASS=
BORDERCOLOR= JUST=
BORDERCOLORDARK= NOBREAKSPACE=
BORDERCOLORLIGHT= POSTHTML=
BORDERWIDTH= POSTIMAGE=
CELLHEIGHT= POSTTEXT=
CELLWIDTH= PREHTML=
FLYOVER= PREIMAGE=
FONT= PRETEXT=
FONT_FACE= PROTECTSPECIALCHARS=
FONT_SIZE= TAGATTR=
FONT_STYLE= URL=
FONT_WEIGHT= VJUST=

For information about style attributes, see What Style Attributes Can Base Procedures Specify? .
Retriction: This option affects only the HTML and Printer output.
Interaction: If you set a style element for the CALLDEF location in the PROC REPORT statement and you want to use that exact style element in a CALL DEFINE statement, use an empty string as the value for the STYLE attribute, as shown here:
call define (_col_, "STYLE", "" );
Featured in: Specifying Style Elements for HTML Output in Multiple Statements


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.