TABLE Subcommand (OUTPUT MODIFY Command)

The TABLE subcommand modifies properties of pivot tables, notes tables, and warning objects in Viewer (TABLES, NOTES, and WARNINGS keywords on the SELECT subcommand).

TABLETITLE keyword

The TABLETITLE keyword modifies the text of title text in the contents pane of the Viewer. The keyword is followed by an equals sign and a quoted value. You can also include special variables to insert date, time, and index values.

)DATE
Current date in the form dd-mmm-yyyy.
)ADATE
Current date in the form mm/dd/yyyy.
)SDATE
Current date in the form yyyy/mm/dd.
)EDATE
Current date in the form dd.mm.yyyy.
)TIME
Current 12-hour clock time in the form hh:mm:ss.
)ETIME
Current 24-hour clock time in the form hh:mm:ss.
)INDEX
The index as specified on the INDEXING subcommand.
)LABEL
The current label text. This setting allows you to add other text or special variable values to the existing label.

Example

OUTPUT MODIFY
  /SELECT TABLES
  /INDEXING 
   INDEXTYPE=NUMBER INDEXSTART=1
  /TABLE 
   TABLETITLE = ")INDEX - )EDATE - )LABEL".

In this example, the titles for all pivot tables are modified to insert a sequential index number and the current date, separated by dashes, before the current label.

TRANSPOSE keyword

The TRANSPOSE keyword transposes rows and columns in pivot tables.

NO
Do not transpose rows and columns. This option is the default.
YES
Transpose rows and columns.

TLOOK keyword

The TLOOK keyword applies the specified TableLook to pivot tables, notes tables, and warning objects.

TLOOK=’filespec’
Applies the TableLook defined in the specified STT file. The file specification takes the general form ’/path/filename.stt’.
TLOOK=’name’
Applies a TableLook from the Looks directory of the application installation directory. The value of ’name’ is the file name without the .stt extension.
TLOOK=NONE
Applies the default TableLook.

SORT and SORTDIRECTION keywords

The SORT and SORTDIRECTION keywords sort the contents of pivot tables based on the values in the specified column.

Note: These keywords work only for tables with a simple row dimension structure. These keywords are ignored if there are nested row elements.

SORT=COLLABEL(’label text’)
Sort based on the values in the column with the specified label.
SORT=COLPOSITION(integer)
Sort based on the values in the nth column. Column numbers start with the first row label column. For example, if the table has two row label columns, then the first data column is column 3.
SORTDIRECTION=ASCENDING
Sort in ascending order of values in the specified column. This option is the default.
SORTDIRECTION=DESCENDING
Sort in descending order of values in the specified column.

Example

OUTPUT MODIFY
   /SELECT TABLES
   /TABLE  SORT=COLLABEL("Percent")
    SORTDIRECTION=DESCENDING.

In this example, pivot tables that have a column labeled "Percent" will be sorted in descending order of the values in that column.

SELECTEDLAYER keyword

The SELECTEDLAYER keyword changes the displayed layer of pivot table that contains more than one layer. The keyword is followed by an equals sign and a pair of values enclosed in square brackets.

  • The first value identifies the layer dimension. The value can be a quoted string that contains the label of the dimension as displayed in the table or an integer that represents the numeric position of the layer. The top layer dimension is 1.
  • The second value identifies the category within the layer dimension. The value can be a quoted string that contains the label of the category as displayed in the table or an integer that represents the numeric position of the category within the layer dimension.
  • For tables with multiple layer dimensions, you can specify multiple, dimension and category values.

Example

OUTPUT MODIFY
  /SELECT TABLES
  /TABLE SELECTLAYER=["Marital status", "Married", 2, 3].
  • For any table with a layer dimension with the layer "Marital status", the category with the label "Married" will be displayed, if that category is present.
  • For any table with at least two layer dimensions, the third category of the second layer dimension will be displayed, if that layer dimension has at least three categories.

TABLESUMMARY keyword

The TABLESUMMARY keyword adds comment text to the table.

  • Comment text is displayed in a tooltip when you hover over a table in the Viewer.
  • Screen readers read the comment text when the table has focus.
  • The tooltip in the Viewer displays only the first 200 characters of the comment, but screen readers read the entire text.
  • When you export output to HTML, the comment text is used as alt text.

The keyword is followed by an equals sign and a quoted value. You can also include special variables to insert date, time, and other values.

)DATE
Current date in the form dd-mmm-yyyy.
)ADATE
Current date in the form mm/dd/yyyy.
)SDATE
Current date in the form yyyy/mm/dd.
)EDATE
Current date in the form dd.mm.yyyy.
)TIME
Current 12-hour clock time in the form hh:mm:ss.
)ETIME
Current 24-hour clock time in the form hh:mm:ss.
)INDEX
The index as specified on the INDEXING subcommand.
)TITLE
The text of the outline label for the table.
)PROCEDURE
The name of the procedure that created the table.
)DATASET
The name of the dataset used to create the table.
\n
Inserts a line break.

PIVOT keyword

The PIVOT keyword pivots the specified row dimension to the specified column dimension. Any existing column dimensions are incremented outwards. For example, PIVOT=[R1,C1] will pivot the first row dimension (the outer-most row dimension) to be the first column dimension. If there are any existing column dimensions, they will be moved outwards so that the old C1 becomes C2. The keyword allows table output to adhere to APA style guidelines.