SPSS Statistics

 View Only

 Strange Comment in Output regarding CTABLES

Olaf Lange's profile image
Olaf Lange posted Wed October 08, 2025 06:19 AM

Hi there,

sometimes (!) when running a SPSS script containing some CTABLES' commands it is not the table which is presented in the output but a strange comment (see attachment). Using german language in the SPSS GUI (Version 29.0.2.0) I try to translate this comment:

"(This table cannot be reproduced. It was possibly with a later versio."

Really strange isnt it.

Do you have any clues?

Thanks a lot for your support!

Beste Regards

Olaf

Jon Peck's profile image
Jon Peck IBM Champion

That is odd.  Can you post or send (jkpeck@gmail.com) the syntax and data for that first table that can't be displayed?  The comment about a later version is probably just an indication that it can't be rendered by the Viewer.  It could probably be captured by OMS as an Excel or other format file,. so trying that would help to identify the problem.

Olaf Lange's profile image
Olaf Lange

Here is the syntax of the CTABLES command following by an OUTPUT MODIFY:

CTABLES
   /VLABELS VARIABLES=Code TaT_hms DISPLAY=LABEL
   /TABLE Code BY TaT_hms [COUNT 'n Aufträge' F40.0, LAYERPCT.COUNT '% Aufträge' PCT40.1, MEAN, MEDIAN, MINIMUM, MAXIMUM, PTILE 98]
   /CATEGORIES VARIABLES=Code ORDER=A KEY=VALUE EMPTY=EXCLUDE TOTAL=YES POSITION=AFTER
   /CRITERIA CILEVEL=95
   /TITLES
    TITLE='Kennzahlen Turnaround Time pro Analyt'.

OUTPUT MODIFY
   /SELECT HEADINGS  /* Der Standard Titel wird in etwas aussagekräftiges umgebaut
   /IF INSTANCES = [LAST]
   /TEXTS
    TEXT="Standard-Auswertung Turnaround Time - Zeitraum: tt.mm.jj bis tt.mm.jj (amerikanisches Datumsformat)"
    FONTSIZE = 18
   /SELECT TEXTS  /* Die Info "[Nur_valide_Faelle] ..." wird gelöscht
   /DELETEOBJECT DELETE = YES.

See the attachment for the data.

Attachment  View in library
Jon Peck's profile image
Jon Peck IBM Champion

I can't get this code to fail - I am on SPSS version 31.0.1.0, but I think that the failure must be due to the OUTPUT MODIFY command, so the CTABLES command ran and the table was produced in the Viewer.  In the OUTPUT MODIFY command, the second select seems to not select anything, so deleting the object has no effect.  That might be causing the problem.

I suggest first omitting the OUTPUT MODIFY command to confirm that it is that command that causes the problem, and then using it without the second SELECT to see if that might be the problem or omitting the DELETEOBJECT subcommand.

Olaf Lange's profile image
Olaf Lange

Thanx very much Jon!

The second SELECT was an "artifact" from past versions of the script.