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 (June 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 27 Jun 2008 13:31:31 -0500
Reply-To:   "Oliver, Richard" <roliver@spss.com>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   "Oliver, Richard" <roliver@spss.com>
Subject:   Re: Converting long strings
Comments:   To: J Sutar <jsutar@gmail.com>
In-Reply-To:   A<da1bdb9a0806270910l64ff0488p97198b9b2fc0ef6d@mail.gmail.com>
Content-Type:   text/plain; charset="us-ascii"

I believe this a function of operating system limitations.

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of J Sutar Sent: Friday, June 27, 2008 11:10 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Converting long strings

Why does the following syntax only pick up the first 16 character of the string variable when attempting to convert it to a numeric?

NEW FILE. DATA LIST LIST/ v1(A25). BEGIN DATA. 1 12 123 1234 12345 123456 1234567 12345678 123456789 1234567890 12345678901 123456789012 1234567890123 12345678901234 123456789012345 1234567890123456 12345678901234567 123456789012345678 1234567890123456789 12345678901234567890 123456789012345678921 1234567890123456789212 END DATA.

STRING newvar(A99). COMPUTE newvar=LTRIM(RTRIM(v1)). COMPUTE newvar2 =NUMBER (newvar, F36.0). EXE.

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


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