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
* To print current date as part of a graph's title.
* Raynald Levesque Feb 14,2001.

DATA LIST LIST /dummy.
BEGIN DATA
1
2
3
END DATA.
LIST.

STRING cdate(A11).
COMPUTE cdate=$DATE11.
DO IF $casenum=1.
WRITE OUTFILE 'temp.sps' /"DEFINE !date()"/cdate/"!ENDDEFINE.".
END IF.
EXECUTE.
INCLUDE 'temp.sps'.

DEFINE !print ().
!LET !title=!QUOTE(!CONCAT('Produced on ',!EVAL(!date)))
GRAPH
  /TITLE=!title
  /BAR(SIMPLE)=COUNT BY dummy
  /MISSING=REPORT.

!ENDDEFINE.

!print.