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 (January 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 4 Jan 2011 09:17:18 -0500
Reply-To:   Art@DrKendall.org
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Art Kendall <Art@DrKendall.org>
Organization:   Social Research Consultants
Subject:   Re: AHEX32 as ID in Aggregate
Comments:   To: =?UTF-8?B?TcSBcnRpxYbFoSBMaWJlcnRz?= <martins.liberts@gmail.com>
In-Reply-To:   <AANLkTikJFmgz2=MBzf-FyCKiL_ZhizhKsKW59JKf=h-p@mail.gmail.com>
Content-type:   text/plain; charset=UTF-8; format=flowed

Sorry. Since this is an SPSS list I thought you had SPSS.

Art

On 1/4/2011 6:26 AM, Mārtiņš Liberts wrote: > It is getting more and more interesting. > > Jon. > I looked on IDs directly on server. For example. The ID on server is > "ED527840-F31B-48BC-80CD-E0D95DE1F3FF". It is translated to > "407852EFBFBD1BEFBFBD48EFBFBDEFBF" in SPSS (under Unicode). > > Another example "D92E2998-1AC7-41FC-B9CF-8F725FE6E1C9" (MS SQL) --> > "EFBFBD292EEFBFBDEFBFBD1AEFBFBD41" (SPSS). > > It is OK for my while the translation gives unique ID and I do not > have to import data back to server (I could try to do that). > > > Art. > I can not run your code on a server because it is MS SQL server. > > > Martins > > > > > 2011/1/4 Art Kendall<Art@drkendall.org>: >> Maybe some of this will help move toward a solution. >> >> Note that the AHEX format is for standard characters. Many of the character >> pairs seems to be outside the printable range. >> >> In help search for AHEX . click on the "IMPORT/EXPORT Character Sets" link. >> Note what position 16 (0A) and 255 (FF) mean in the different character >> sets. >> >> perhaps you can the id to a new field with a different format before you >> retrieve the data from the data base. >> >> try the syntax snippets below on the originating and target platforms. >> The first shows what most of the standard character are on your system >> >> Please explain the context in which this arises. >> 16 alpha characters is a long id string in many contexts. >> >> The AHEX format is used to read the hexadecimal representation of standard >> characters. Each set of two hexadecimal characters represents one standard >> character. For codes used on different operating systems, see IMPORT/EXPORT >> Character Sets. >> >> •� The w specification refers to columns of the hexadecimal representation >> and must be an even number. Leading, trailing, and embedded blanks are not >> allowed, and only valid hexadecimal characters can be used in input values. >> >> •� For some operating systems (e.g., IBM CMS), letters in hexadecimal values >> must be upper case. >> >> •� The default output format for variables read with the AHEX input format is >> the A format. The default width is half the specified input width. For >> example, an input format of AHEX14 generates an output format of A7. >> >> •� Used as an output format, the AHEX format displays the printable >> characters in the hexadecimal characters specific to your system. The >> following commands run on a UNIX system--where A=41 (decimal 65), a=61 >> (decimal 97), and so on--produce the output shown below: >> >> DATA LIST FIXED >> /A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z 1-26 (A). >> FORMATS ALL (AHEX2). >> BEGIN DATA >> ABCDEFGHIJKLMNOPQRSTUVWXYZ >> abcdefghijklmnopqrstuvwxyz >> END DATA. >> LIST. >> >> DATA LIST FIXED >> � � /A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z 1-26 (A). >> FORMATS ALL (AHEX2). >> BEGIN DATA >> ABCDEFGHIJKLMNOPQRSTUVWXYZ >> abcdefghijklmnopqrstuvwxyz >> 01234567890.,?+-=!@#$%^&*( >> END DATA. >> LIST. >> >> new file. >> data list fixed >> � /id_ahex1 to id_ahex16 (16ahex2). >> begin data >> 0AEFF930E6925445A3ADCF60CF3F3F3D >> 407852ED1BF3BC4880CDE0D95DE1F3FF >> 756B0AA6B2C43F449B05C9E704ABF2FF >> end data. >> list. >> >> Art Kendall >> Social Research Consultants >> >> >> >> On 12/30/2010 10:29 AM, Mārtiņš Liberts wrote: >> >> Hi, >> >> I have two data files from MS SQL server where variable ID is stored >> in AHEX32 format. I have to aggregate one file by ID and match with >> another one. The problem is that for some cases IDs are changing after >> aggregate. Why some IDs are changing? >> >> Here is an example: >> >> ****** Problem with AHEX32. >> >> data list free >> /id_a (ahex32). >> begin data >> 0AEFF930E6925445A3ADCF60CF3F3F3D >> 407852ED1BF3BC4880CDE0D95DE1F3FF >> 756B0AA6B2C43F449B05C9E704ABF2FF >> end data. >> >> string id_ahex (a16). >> comp id_ahex=id_a. >> >> exe. >> >> formats id_ahex (ahex32). >> >> list var=id_ahex. >> >> agg out * >> /break all >> /n=n. >> >> list var=id_ahex. >> >> >> ************* Output what I got: >> >> >> id_ahex >> >> 0AEFF930E6925445A3ADCF60CF3F3F3D >> 407852ED1BF3BC4880CDE0D95DE1F3FF >> 756B0AA6B2C43F449B05C9E704ABF2FF >> >> Number of cases read: 3 Number of cases listed: 3 >> >> >> id_ahex >> >> 0AEFF930E6925445A3ADCF60CF3F3F3D >> 407852ED1BF3BC4880CDE0D95DE1FBFF >> 756B0AA6B2C43F449B05C9E704ABFAFF >> >> Number of cases read: 3 Number of cases listed: 3 >> >> >> We can see that the first ID has not changed but two others are. The >> ending of send ID has changed from F3FF to FBFF and similary for the >> third one F2FF to FAFF. >> >> >> I am using PASW Statistics 17.0.3 >> >> >> Happy New Year! >> Martins >> >> >> >> >> -- >> Mārtiņš Liberts >> +371 26 411 543 (mobile) >> +371 67 366 618 (office) >> http://djhurio.wordpress.com/ >> http://twitter.com/djhurio >> >> Get informed about The Open Document Format if there are files >> attached with extensions *.odt, *.ods, *.odp, *.od? >> http://en.wikipedia.org/wiki/OpenDocument >> >> ===================== >> 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 >> >> > > > -- > Mārtiņš Liberts > +371 26 411 543 (mobile) > +371 67 366 618 (office) > http://djhurio.wordpress.com/ > http://twitter.com/djhurio > > Get informed about The Open Document Format if there are files > attached with extensions *.odt, *.ods, *.odp, *.od? > http://en.wikipedia.org/wiki/OpenDocument > > ===================== > 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