Concatenate content of cases with same id
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | * Raynald Levesque 2002/04/22. SET MPRINT=no. DATA LIST LIST /Casenb(A3) FieldD(A8). BEGIN DATA 001 x 001 y 001 z 002 x 003 y END DATA. SORT CASES BY casenb. MATCH FILES FILE=* /BY casenb /LAST=last. DO IF $CASENUM>1. IF casenb=LAG(casenb) fieldd=CONCAT(RTRIM(LAG(fieldd)),fieldd). END IF. EXECUTE. * Clean up. SELECT IF last=1. ADD FILES FILE=* /DROP=last. |
Related pages
...