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 (February 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 25 Feb 2005 14:59:53 -0000
Reply-To:     Yehuda Dayan <Yehuda.Dayan@ipsos.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Yehuda Dayan <Yehuda.Dayan@ipsos.com>
Subject:      Re: Data Formatting
Comments: To: "John S. Lemon" <j.s.lemon@abdn.ac.uk>
Content-Type: text/plain

Thanks very much John. This works like a charm, but is there any way of removing the superfluous spaces?

Is there any equivalent to right/left trimming in the WRITE function?

Regards, Yehuda

-----Original Message----- From: John S. Lemon [mailto:j.s.lemon@abdn.ac.uk] Sent: 25 February 2005 10:22 To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: Data Formatting

Yehuda

Try ( untested )

WRITE OUTFILE = 'outfile.dat' RECORDS=1 /1 "V1=", V1(F1.0), ";V2=", V2(A10), ";V4=", V4(A5), ";" . EXECUTE.

You may need to adjust the formats and use an editor to remove any superfluous spaces.

>I have a bit of an annoying data formatting to run: >For example > >Initial data .sav file which looks like this: > >------------------------- >V1 V2 V4 >1 Natalie 10/54 >2 Joe 12/85 >3 Sara 11/** >-------------------------- > >I need the output to be in .txt in this format: > >-------------------------- >V1=1;V2=Natalie;V4=10/54; >V1=1;V2=Joe;V4=12/85; >V1=3;V2=Sara;V4=11/**; >------------------------- > >Any advice is greatly appreciated! > >Thanks, >Yehuda > ### This e-mail and all attachments it may contain is confidential and >intended solely for the use of the individual to whom it is addressed. Any >views or opinions presented are solely those of the author and do not >necessarily represent those of Ipsos UK and its associated companies. If you >are not the intended recipient, be advised that you have received this >e-mail in error and that any use, dissemination, printing, forwarding or >copying of this e-mail is strictly prohibited. Please contact the sender if >you have received this e-mail in error. ###

Best wishes

John S. Lemon Mailto:j.s.lemon@abdn.ac.uk DISS - ASD (Computing) Tel: +44 1224 273350 Aberdeen University - Scotland Fax: +44 1224 273372 ### This e-mail and all attachments it may contain is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Ipsos UK and its associated companies. If you are not the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, printing, forwarding or copying of this e-mail is strictly prohibited. Please contact the sender if you have received this e-mail in error. ###


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