Look up the CONCAT function. E.g.,
* Read in some data to illustrate.
NEW FILE.
DATASET CLOSE ALL.
DATA LIST LIST / phone1 (A11).
BEGIN DATA
"07970471126"
"0123456789"
END DATA.
* Declare new string variable for code+number.
STRING phone2 (A14).
* Use CONCAT function to join +44 and phone1.
COMPUTE phone2 = CONCAT("+44", phone1).
LIST.
Output from the LIST command:
phone1 phone2
07970471126 +4407970471126
0123456789 +440123456789
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/"When all else fails, RTFM."
PLEASE NOTE THE FOLLOWING:
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (
https://listserv.uga.edu/).