{label} Directive

Enables you to display the label for a variable that is in a results set

Syntax

{label var="varname1 varname2 ... varnameN" <format=formats> before="string1"
between="string2" after="string3"}

Required Arguments

var="varname1 varname2 ... varnameN"
varname1 varname2 ... varnameN are the names of variables whose labels you want to display. You can specify one or more variable names; separate the variable names with single spaces.
You can also use a variable reference for a value. For example:
var="{&mylabel}"
var="{&sys.colname[*]}"
before="string1"
between="string2"
after="string3"
These parameters enable you to output strings of characters before, between, and after labels. You can use an unlimited number of characters in your strings (note that the maximum number of characters that you can use depends on how much memory your system has). The only character that is not allowed is the double quotation mark ("). If you want to include double quotation marks within your string, then delimit the string with single quotation marks or use two double quotation marks within your string. For example, both of the following values return the string "How are you?":
between='"How are you?"'
between="""How are you?"""
To include single quotation marks within your string, delimit the string with double quotation marks or use two single quotation marks within your string. For example, both of the following values return the string What's up?:
before="What's up?"
before='What''s up?'
The default value for before= is a null string (""). The default value for between= is a blank space (" "). The default value for after= is a null string ("").

Optional Argument

format=formats
formats is a single formatting option (format=value) or a comma-delimited list of options enclosed in parentheses (format=(value,...,valueN)). Do not use quotation marks to delimit the values. This is an optional parameter. See Formats for Variable Values and Labels for a list of formatting options.

Details

The {label} directive enables you to display the label for a variable that is in a results set. The label is either returned from the data set or set in the SQL statement. If you want to display the label using a particular format, you can specify the format= parameter.