CTABLES: Display of longer value labels

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

CTABLES: Display of longer value labels

ThW
Hi!

I am about to create a long Output-File via SPSS using the Custom Tables-Command several times. Unfortunately, many of my value labels are longer than 60 chars / bits. Is there a (maybe Python based) solution to avoid truncation of my value labels in the Viewer-File?

It is not very efficient for me to substitute the truncated labels later after exporting all tables to Excel.

Thank you for any help!
Th W
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES: Display of longer value labels

Rick Oliver-3
CTABLES does not truncate value labels.

data list free /x.
begin data
1
end data.
value labels x
1 'This is a long label. It is very long. It keeps going. Not done yet. Getting longer. Still going. The end'.
CTABLES
  /VLABELS VARIABLES=x DISPLAY=LABEL
  /TABLE x [COUNT F40.0]
  /CATEGORIES VARIABLES=x ORDER=A KEY=VALUE EMPTY=INCLUDE.


Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        ThW <[hidden email]>
To:        [hidden email],
Date:        07/17/2013 09:44 AM
Subject:        CTABLES: Display of longer value labels
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi!

I am about to create a long Output-File via SPSS using the Custom
Tables-Command several times. Unfortunately, many of my value labels are
longer than 60 chars / bits. Is there a (maybe Python based) solution to
avoid truncation of my value labels in the Viewer-File?

It is not very efficient for me to substitute the truncated labels later
after exporting all tables to Excel.

Thank you for any help!
Th W



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/CTABLES-Display-of-longer-value-labels-tp5721226.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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


Reply | Threaded
Open this post in threaded view
|

Re: CTABLES: Display of longer value labels

John F Hall
In reply to this post by ThW
Short answer: use shorter value labels.

John F Hall (Mr)
[Retired academic survey researcher]

Email:   [hidden email]
Website: www.surveyresearch.weebly.com
SPSS start page:  www.surveyresearch.weebly.com/spss-without-tears.html




-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ThW
Sent: 17 July 2013 16:42
To: [hidden email]
Subject: CTABLES: Display of longer value labels

Hi!

I am about to create a long Output-File via SPSS using the Custom
Tables-Command several times. Unfortunately, many of my value labels are
longer than 60 chars / bits. Is there a (maybe Python based) solution to
avoid truncation of my value labels in the Viewer-File?

It is not very efficient for me to substitute the truncated labels later
after exporting all tables to Excel.

Thank you for any help!
Th W



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/CTABLES-Display-of-longer-valu
e-labels-tp5721226.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
[hidden email] (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
ThW
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES: Display of longer value labels

ThW
In reply to this post by Rick Oliver-3
Well - sorry, my mistake!

After reading your advice I detected that the problem lies not in displaying value labels @ CTABLES, but in general limitation of value label length. Same problem, different question: Is there a way to increase the maximum length of val labs?

Thanks a lot!
Th W
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES: Display of longer value labels

Rick Oliver-3
Value labels can be up to 120 character long. You cannot increase them beyond that.

One possible solution would be to convert the values to strings, using your desired label text as the values. String values can be very, very long.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        ThW <[hidden email]>
To:        [hidden email],
Date:        07/17/2013 11:26 AM
Subject:        Re: CTABLES: Display of longer value labels
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Well - sorry, my mistake!

After reading your advice I detected that the problem lies not in displaying
value labels @ CTABLES, but in general limitation of value label length.
Same problem, different question: Is there a way to increase the maximum
length of val labs?

Thanks a lot!
Th W



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/CTABLES-Display-of-longer-value-labels-tp5721226p5721228.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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


Reply | Threaded
Open this post in threaded view
|

Re: CTABLES: Display of longer value labels

Albert-Jan Roskam
In reply to this post by ThW
----- Original Message -----

> From: ThW <[hidden email]>
> To: [hidden email]
> Cc:
> Sent: Wednesday, July 17, 2013 6:24 PM
> Subject: Re: [SPSSX-L] CTABLES: Display of longer value labels
>
> Well - sorry, my mistake!
>
> After reading your advice I detected that the problem lies not in displaying
> value labels @ CTABLES, but in general limitation of value label length.
> Same problem, different question: Is there a way to increase the maximum
> length of val labs?
>
> Thanks a lot!
> Th W

AFAIK, the maximum value label length is 120 bytes, variable labels: 256 bytes, string variables 32767 bytes.
If you use codepage mode (single byte characters) instead of unicode mode (variable-width encoding), you might be able to squeeze in a few more characters.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
ThW
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES: Display of longer value labels

ThW
In reply to this post by Rick Oliver-3
Rick Oliver wrote
One possible solution would be to convert the values to strings, using
your desired label text as the values. String values can be very, very
long.
Indeed this is a nifty solution. I am almost satisfied:

original variable [c] with values 1 to 16, each one labeled --> string variable with 16 different values (=strings).

But while one problem seems to be solved, another one occurs: After converting my value labels into string values CTABLES does not display any empty categories (of my original variable) - of course not, because the procedure only works with existing values if no value labels are defined. Any suggestions?