• Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

Comments (13)

1 G.Redworth commented Permalink

My page heading currently has 3 lines. I would like to add a 4th line with a variable to show which of the split files the output is for. Is this possible with Modify Output syntax?

I also would like to add section headers where appropriate before my custom tables. Is this possible with Modify Output syntax?

2 JonPeck commented Permalink

Although a page heading can have four lines, it is not possible to add the split information. The Viewer does not know about that. Split information comes from the backend code.

The only way I can think of to do this is rather roundabout. You could use the SPSSINC SPLIT DATASET and SPSSINC PROCESS FILES commands to split your data into separate files and then iterate through them generating the title from the file name, which can reflect the split value. That has the advantage that you can group together output for each split from multiple procedures, but it might not be worth the trouble if all you need is page titling.

3 G.Redworth commented Permalink

Thanks for the answer about adding a 4th line in the page heading. What about adding text boxes for section headers and setting the font? Can that be done with syntax?

4 G.Redworth commented Permalink

What would be helpful to me is a really good book that thoroughly documents these extension commands and writing syntax with lots of examples. Trying to figure out how to use Output Modify, for example, from the documentation alone is frustrating.

5 JonPeck commented Permalink

You can use the TEXT extension command to make section headers and use html markup in it to set the attributes. Here is an example that makes large text with part in bold.

TEXT "Caveats Section"
There isn't a comprehensive book for extension commands, and some of the details in this case might only be found in the Python programmability doc on the Help menu, but that book is meant for programmers. If you open up the source file, e.g., SPSSINC_MODIFY_OUTPUT.py in a plain text editor, you will find some additional explanations and examples in comments.
Otherwise posting questions in the forums for this community is the best way to ask questions.
You might also want to download the Programming and Data Management book i pdf format from the Books & Articles section of this community.
In Statistics version 22, some of the more popular functions of SPSSINC MODIFY TABLES and SPSSINC MODIFY OUTPUT are available in the new OUTPUT MODIFY built-in command. It has a nicer user interface and is documented in the Command Syntax Reference.

6 G.Redworth commented Permalink

I tried using the TEXT extension commant and got and error: The first word in the line is not recognized as an SPSS Statistics command. Here is my syntax:

TEXT "Caveats Section"

7 JonPeck commented Permalink

That means that the TEXT command is not installed or is installed incorrectly. Also, you need to restart Statistics after installing it in order for the command to be recognized.

8 G.Redworth commented Permalink

It worked after I re-opened SPSS. Thanks. However, when I tried to run this code to make the font bigger and bold:

TEXT "Caveats Section"
it did not like the +3 font size. Here is the error I got:

9 G.Redworth commented Permalink

I also tried your suggestion from Mar 21:

Statistics version 22, look at the OUTPUT MODIFY command. You can paste OUTPUT MODIFY syntax by right clicking on a table, choosing your edits, and paste the result.
I right clicked, selected the line I wanted to bold, but couldn't find the button or option to paste the result into a syntax file.
I am using SPSS v22.

10 JonPeck commented Permalink

I can't be quite sure what text you ran, since the website seems to react to the html, but I think the problem is that you used double quotes around the text but also have double quotes inside. Use single quotes on the outside so as not to conflict with the contents.

Add a Comment Add a Comment