Maximum lenght of VALUE LABELS

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Maximum lenght of VALUE LABELS

Mark Webb-3

The help manual states 120 bytes long.

Is a single character = 1 byte – so is this the same as saying 120 characters ?

I don’t think so as I can’t get Value Labels as long as 120.

 

How do I get Value labels of about 120 characters long ?

 

Mark Webb

 

+27 21 786 4379

+27 72 199 1000

Skype - webbmark

[hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: Maximum lenght of VALUE LABELS

Oliver, Richard

In code page mode in an English locale, I think pretty much every “character” is a single byte. In Asian locales such as Japanese or Chinese, many/most(?) “characters” are two or more bytes. In Unicode mode, 7-bit ASCII characters such as the letters A-Z and the digits 0-9 are one byte, but some special characters – such as a letter with an accent mark – are two bytes.

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Webb
Sent: Wednesday, February 04, 2009 9:10 AM
To: [hidden email]
Subject: Maximum lenght of VALUE LABELS

 

The help manual states 120 bytes long.

Is a single character = 1 byte – so is this the same as saying 120 characters ?

I don’t think so as I can’t get Value Labels as long as 120.

 

How do I get Value labels of about 120 characters long ?

 

Mark Webb

 

+27 21 786 4379

+27 72 199 1000

Skype - webbmark

[hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: Maximum lenght of VALUE LABELS

Albert-Jan Roskam
In reply to this post by Mark Webb-3
Hi!
 
value labels that exceed 120 chars are truncated and a warning is issued when this happens. Up to 120 chars you should have no problems.
 
Cheers!!
Albert-Jan


From: Mark Webb <[hidden email]>
To: [hidden email]
Sent: Wednesday, February 4, 2009 4:10:24 PM
Subject: Maximum lenght of VALUE LABELS

The help manual states 120 bytes long.

Is a single character = 1 byte – so is this the same as saying 120 characters ?

I don’t think so as I can’t get Value Labels as long as 120.

 

How do I get Value labels of about 120 characters long ?

 

Mark Webb

 

+27 21 786 4379

+27 72 199 1000

Skype - webbmark

[hidden email]

 


Reply | Threaded
Open this post in threaded view
|

Re: Maximum lenght of VALUE LABELS

Art Kendall
Where the label is truncated tells you how many bytes

also remember that spaces count as characters.
Open a new instance of SPSS.
Copy the syntax below into a syntax window. click <run> <all>.

[oddly the whole set of syntax did not run on my machine. It did work if I did <run> <all> and then selected "value labels" to the end and the did <run> <selected>.]

show locale.
data list list/id (f3) answer (f1).
begin data
1 1
2 1
3 2
4 2
5 0
end data.
*highlight and run from here down if the value labels do not appear in the log when you <run all>.

value labels answer
0 '123456789a'
+ '123456789b'
+ '123456789c'
1 '123456789a'
+ '123456789b'
+ '123456789c'
+ '123456789d'
+ '123456789e'
+ '123456789f'
+ '123456789g'
+ '123456789h'
+ '123456789i'
+ '123456789j'
+ '123456789k'
+ '123456789L'
+ '123456789M'
+ '123456789n'
+ '123456789o'
+ '123456789p'
2 '123456789a'
+ '123456789b'
+ '123456789c'
+ '123456789d'
+ '123456789e'
+ '123456789f'
+ '123456789g'
+ '123456789h'
+ '123456789i'
+ '123456789j'
+ '123456789k'
+ '123456789L'.
display dictionary.


Art Kendall
Social Research Consultants

Albert-jan Roskam wrote:
Hi!
value labels that exceed 120 chars are truncated and a warning is issued when this happens. Up to 120 chars you should have no problems.
Cheers!!
Albert-Jan


From: Mark Webb [hidden email]
To: [hidden email]
Sent: Wednesday, February 4, 2009 4:10:24 PM
Subject: Maximum lenght of VALUE LABELS

The help manual states 120 bytes long.

Is a single character = 1 byte – so is this the same as saying 120 characters ?

I don’t think so as I can’t get Value Labels as long as 120.

How do I get Value labels of about 120 characters long ?

Mark Webb

+27 21 786 4379

+27 72 199 1000

Skype - webbmark

[hidden email]


Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Maximum lenght of VALUE LABELS

Anthony Bressy

Also for spss 17 ?

 

Anthony Bressy

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall
Sent: 05 February 2009 14:15
To: [hidden email]
Subject: Re: Maximum lenght of VALUE LABELS

 

Where the label is truncated tells you how many bytes

also remember that spaces count as characters.
Open a new instance of SPSS.
Copy the syntax below into a syntax window. click <run> <all>.

[oddly the whole set of syntax did not run on my machine. It did work if I did <run> <all> and then selected "value labels" to the end and the did <run> <selected>.]

show locale.
data list list/id (f3) answer (f1).
begin data
1 1
2 1
3 2
4 2
5 0
end data.
*highlight and run from here down if the value labels do not appear in the log when you <run all>.

value labels answer
0 '123456789a'
+ '123456789b'
+ '123456789c'
1 '123456789a'
+ '123456789b'
+ '123456789c'
+ '123456789d'
+ '123456789e'
+ '123456789f'
+ '123456789g'
+ '123456789h'
+ '123456789i'
+ '123456789j'
+ '123456789k'
+ '123456789L'
+ '123456789M'
+ '123456789n'
+ '123456789o'
+ '123456789p'
2 '123456789a'
+ '123456789b'
+ '123456789c'
+ '123456789d'
+ '123456789e'
+ '123456789f'
+ '123456789g'
+ '123456789h'
+ '123456789i'
+ '123456789j'
+ '123456789k'
+ '123456789L'.
display dictionary.


Art Kendall
Social Research Consultants

Albert-jan Roskam wrote:

Hi!

value labels that exceed 120 chars are truncated and a warning is issued when this happens. Up to 120 chars you should have no problems.

Cheers!!

Albert-Jan

 


From: Mark Webb [hidden email]
To: [hidden email]
Sent: Wednesday, February 4, 2009 4:10:24 PM
Subject: Maximum lenght of VALUE LABELS

The help manual states 120 bytes long.

Is a single character = 1 byte – so is this the same as saying 120 characters ?

I don’t think so as I can’t get Value Labels as long as 120.

How do I get Value labels of about 120 characters long ?

Mark Webb

+27 21 786 4379

+27 72 199 1000

Skype - webbmark

[hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: Maximum lenght of VALUE LABELS

Oliver, Richard

The original question concerned the relationship between bytes and characters. The maximum length of 120 bytes did not change in release 17. In code page mode in an English locale, a byte and character are essentially the same. So 120 bytes=120 characters. In Unicode mode and in multi-byte locales, the rules are different, but if your labels are in English, then the vast majority of the time there will be no difference between the byte and character count even in Unicode mode.

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Anthony Bressy
Sent: Thursday, February 05, 2009 7:33 AM
To: [hidden email]
Subject: Re: Maximum lenght of VALUE LABELS

 

Also for spss 17 ?

 

Anthony Bressy

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall
Sent: 05 February 2009 14:15
To: [hidden email]
Subject: Re: Maximum lenght of VALUE LABELS

 

Where the label is truncated tells you how many bytes

also remember that spaces count as characters.
Open a new instance of SPSS.
Copy the syntax below into a syntax window. click <run> <all>.

[oddly the whole set of syntax did not run on my machine. It did work if I did <run> <all> and then selected "value labels" to the end and the did <run> <selected>.]

show locale.
data list list/id (f3) answer (f1).
begin data
1 1
2 1
3 2
4 2
5 0
end data.
*highlight and run from here down if the value labels do not appear in the log when you <run all>.

value labels answer
0 '123456789a'
+ '123456789b'
+ '123456789c'
1 '123456789a'
+ '123456789b'
+ '123456789c'
+ '123456789d'
+ '123456789e'
+ '123456789f'
+ '123456789g'
+ '123456789h'
+ '123456789i'
+ '123456789j'
+ '123456789k'
+ '123456789L'
+ '123456789M'
+ '123456789n'
+ '123456789o'
+ '123456789p'
2 '123456789a'
+ '123456789b'
+ '123456789c'
+ '123456789d'
+ '123456789e'
+ '123456789f'
+ '123456789g'
+ '123456789h'
+ '123456789i'
+ '123456789j'
+ '123456789k'
+ '123456789L'.
display dictionary.


Art Kendall
Social Research Consultants

Albert-jan Roskam wrote:

Hi!

value labels that exceed 120 chars are truncated and a warning is issued when this happens. Up to 120 chars you should have no problems.

Cheers!!

Albert-Jan

 


From: Mark Webb [hidden email]
To: [hidden email]
Sent: Wednesday, February 4, 2009 4:10:24 PM
Subject: Maximum lenght of VALUE LABELS

The help manual states 120 bytes long.

Is a single character = 1 byte – so is this the same as saying 120 characters ?

I don’t think so as I can’t get Value Labels as long as 120.

How do I get Value labels of about 120 characters long ?

Mark Webb

+27 21 786 4379

+27 72 199 1000

Skype - webbmark

[hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: Maximum lenght of VALUE LABELS

Art Kendall
In reply to this post by Anthony Bressy
I am running version 17.0.1.  Under windows ultimate on a 64-bit quad processor.  My locale is en_US.windows-1252 (en_US)

If you use the syntax I posted the input value label for 0 is 30 characters.  for 1 is 160 for 2 is 120.
by using the letters at each tenth character you can see what you end up with in display dictionary in your locale.

Art

Anthony Bressy wrote:

Also for spss 17 ?

 

Anthony Bressy

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall
Sent: 05 February 2009 14:15
To: [hidden email]
Subject: Re: Maximum lenght of VALUE LABELS

 

Where the label is truncated tells you how many bytes

also remember that spaces count as characters.
Open a new instance of SPSS.
Copy the syntax below into a syntax window. click <run> <all>.

[oddly the whole set of syntax did not run on my machine. It did work if I did <run> <all> and then selected "value labels" to the end and the did <run> <selected>.]

show locale.
data list list/id (f3) answer (f1).
begin data
1 1
2 1
3 2
4 2
5 0
end data.
*highlight and run from here down if the value labels do not appear in the log when you <run all>.

value labels answer
0 '123456789a'
+ '123456789b'
+ '123456789c'
1 '123456789a'
+ '123456789b'
+ '123456789c'
+ '123456789d'
+ '123456789e'
+ '123456789f'
+ '123456789g'
+ '123456789h'
+ '123456789i'
+ '123456789j'
+ '123456789k'
+ '123456789L'
+ '123456789M'
+ '123456789n'
+ '123456789o'
+ '123456789p'
2 '123456789a'
+ '123456789b'
+ '123456789c'
+ '123456789d'
+ '123456789e'
+ '123456789f'
+ '123456789g'
+ '123456789h'
+ '123456789i'
+ '123456789j'
+ '123456789k'
+ '123456789L'.
display dictionary.


Art Kendall
Social Research Consultants

Albert-jan Roskam wrote:

Hi!

value labels that exceed 120 chars are truncated and a warning is issued when this happens. Up to 120 chars you should have no problems.

Cheers!!

Albert-Jan

 


From: Mark Webb [hidden email]
To: [hidden email]
Sent: Wednesday, February 4, 2009 4:10:24 PM
Subject: Maximum lenght of VALUE LABELS

The help manual states 120 bytes long.

Is a single character = 1 byte – so is this the same as saying 120 characters ?

I don’t think so as I can’t get Value Labels as long as 120.

How do I get Value labels of about 120 characters long ?

Mark Webb

+27 21 786 4379

+27 72 199 1000

Skype - webbmark

[hidden email]

 

Art Kendall
Social Research Consultants