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
*Объединение 2-х файлов данных по принципу "много-ко-многим".
DATA LIST LIST /v1(F8.0).
BEGIN DATA
1
2
3
4
END DATA.
SORT CASES BY v1.
LOOP key=1 TO 3.
XSAVE OUTFILE='c:\\temp\\datafile1.sav'.
END LOOP.
EXECUTE.


NEW FILE.
DATA LIST LIST /v2(A1).
BEGIN DATA
A
B
C
END DATA.
COMPUTE key=$CASENUM.
SAVE OUTFILE='c:\\temp\\datafile2.sav'.

GET FILE='c:\\temp\\datafile1.sav'.
SORT CASES BY key.
MATCH FILES FILE=*
	/TABLE='c:\\temp\\datafile2.sav'
	/BY=key
	/DROP=key.
SORT CASES BY v1 v2.