LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 25 Aug 2003 21:05:52 +0100
Reply-To:     JC Dashper <johndashper@SELECTIVE.CO.UK>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         JC Dashper <johndashper@SELECTIVE.CO.UK>
Subject:      !CONCAT
Content-Type: text/plain; charset="iso-8859-1"

Help please,

I am trying to use !concat to join a defined variable, !cat (=cd13), (which will assume various values at other times), with the string 'seg'.

The required result is cd13seg.

When I use !CONCAT(!cat,'seg') the result is !CATseg.

What is confusing is that if I try !CONCAT('seg',!cat) the result is segCD13. And if I put a space in front of seg i.e. !CONCAT(!cat,' seg') the result is CD13 seg.

My (abbreviated) syntax is:

define !cat () cd13 !enddefine.

define !hslists () A1 A2 !enddefine.

new file. GET FILE='C:\temp\test.sav'. */////////////////////////////////////////*. define!anal6 (!POSITIONAL !CMDEND ). !DO !i !IN (!1) do if !CONCAT(!cat,'seg')=!quote(!concat(' ',!i)) . compute !i=1. end if. !DOEND. !ENDDEFINE. */////////////////////////////////////////*. set mprint=yes. !anal6 !hslists. exec.

I can work-round the difficulty but I am intrigued to know what I'm doing wrong.

Regards

John Dashper

************************************************************ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender or system manager. ************************************************************* Selective Marketplace Limited Registered Office: Belton Road West, Loughborough, Leics. LE11 5XL Registered in England No. 1566688 *************************************************************


Back to: Top of message | Previous page | Main SPSSX-L page