1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
*(Q) I print a table then other information for one school after the other.
* I would like to start each school at the top of a new page.

*(A) by Raynald Levesque 2002/05/22.

*///////////////////.
DEFINE !test(list=!CMDEND)

!DO !val !IN (!list)
FILTER OFF.
COMPUTE flag=(jobcat=!val).
FILTER BY flag.

* The "/Page break" portion of the table title indicates
	to the script, which is called at the end of the syntax,
	to insert a page break before the table.
* Basic Tables.
TABLES
  /FORMAT BLANK MISSING('.')
  /TABLES educ
  BY gender > (STATISTICS)
  /TITLE='/Page breakThis table is at the top of a new page'.

GRAPH
  /BAR(SIMPLE)=COUNT BY jobtime
  /MISSING=REPORT.

FREQ VAR=gender jobcat minority.

EXECUTE.

!DOEND.
!ENDDEFINE.
*///////////////////.


GET FILE='c:\program files\spss\employee data.sav'.
set mprint=yes.
!test list=1 2 3.
set mprint=no.

SCRIPT 'c:\program files\spss\scripts\insert page break.sbs'.