Tables and axes > Include and substitution > Filing and retrieving non-identical statements > Symbolic parameters for text
 
Symbolic parameters for text
Quick reference
To define a symbolic parameter for text, type:
name=text
To use a text symbolic parameter, type:
&name
More information
Texts are replaced by one or more characters preceded by an ampersand. For example:
ttl&txt
n23All Traveling by &txt
Names used for symbolic text parameters must not contain blanks. If more than one symbolic text parameter is used in a program, their names must be unique amongst the lowest number of characters. That means, if there are two symbols, one of three characters and one of four, the first three characters of each symbol must differ by at least one character. However, if both symbols are the same length, only the last character need differ for them to be unique.
For example:
SYM and SYM1 are not unique, but
SYM1 and SYM2 are unique
You can write the example Symbolic parameters for columns more efficiently by using a symbolic parameter for the texts as well. Instead of writing out the heading on the n23 statement, represent it with the parameter ‘wash’:
n23&wash;unl1
n03
n01Noticed a Difference;c=ca00'3/5'
n01 Prefer Product A;c=ca00'3'
n01 Prefer Product B;c=ca00'4'
n01 No Preference;c=ca00'5'
n01Did Not Notice a Difference;c=ca00'2'
n01Only Used One Product (DK Which);c=ca00'6'
n01Only Used Product A;c=ca00'7'
n01Only Used Product B;c=ca00'8'
and define it on the #include line like this:
#include ipref;col(a)=134;wash=Washing Woollens
The text itself can be longer than the parameter which represents it. Just make sure, though, that when the text is substituted, it does not make the whole line longer than the 200 character maximum allowed.
You can also rewrite the example in Filing and retrieving statements. In tab1, write:
flt;c=c121'p'
ttlBase: Respondents Living in &area
tab brand demo
ttcBrand Bought Most Often
tab prefer age
ttcBrand Preferred
tab demo bk01
ttcDemographics
and in the program, write:
#include tab1;punch(p)='1';area=Central London
#include tab1;punch(p)='2';area=Outer London
Once again, the definitions for the symbolic parameters refer to the statements in the file included, but not to the rest of the program.
Note The default maximum number of different text symbol parameters per run is 15, but as one of these is always used internally, the usable number is 14. For details on how to increase this parameter, see User-definable limits.
See also
Filing and retrieving non-identical statements