Type : CREATION_INTERNE
Examples use generated data (datalines) to ensure code autonomy.
| 1 | DATA animal; |
| 2 | INPUT common $ animal $; |
| 3 | DATALINES; |
| 4 | a Ant |
| 5 | b Bird |
| 6 | c Cat |
| 7 | d Dog |
| 8 | e Eagle |
| 9 | f Frog |
| 10 | ; |
| 11 | DATA plantG; |
| 12 | INPUT common $ plant $; |
| 13 | DATALINES; |
| 14 | a Apple |
| 15 | b Banana |
| 16 | c Coconut |
| 17 | d Dewberry |
| 18 | e Eggplant |
| 19 | g Fig |
| 20 | ; |
| 21 | DATA merged; |
| 22 | MERGE animal plantG; |
| 23 | RUN; |
| 24 | |
| 25 | PROC PRINT DATA=merged; RUN; |
| 1 | DATA animal; |
| 2 | INPUT common $ animal $; |
| 3 | DATALINES; |
| 4 | a Ant |
| 5 | b Bird |
| 6 | c Cat |
| 7 | d Dog |
| 8 | e Eagle |
| 9 | f Frog |
| 10 | ; |
| 11 | |
| 12 | DATA plantMissing; |
| 13 | INPUT common $ plant $; |
| 14 | DATALINES; |
| 15 | a Apple |
| 16 | b Banana |
| 17 | c Coconut |
| 18 | ; |
| 19 | |
| 20 | DATA merged; |
| 21 | MERGE animal plantmissing; |
| 22 | RUN; |
| 23 | PROC PRINT DATA=merged; RUN; |
| 1 | DATA animalDupes; |
| 2 | INPUT common $ animal $; |
| 3 | DATALINES; |
| 4 | a Ant |
| 5 | a Ape |
| 6 | b Bird |
| 7 | c Cat |
| 8 | d Dog |
| 9 | e Eagle |
| 10 | ; |
| 11 | |
| 12 | DATA plantDupes; |
| 13 | INPUT common $ plant $; |
| 14 | DATALINES; |
| 15 | a Apple |
| 16 | b Banana |
| 17 | c Coconut |
| 18 | c Celery |
| 19 | d Dewberry |
| 20 | e Eggplant |
| 21 | ; |
| 22 | |
| 23 | DATA merged; |
| 24 | MERGE animalDupes plantDupes; |
| 25 | RUN; |
| 26 | PROC PRINT DATA=merged; RUN; |
| 1 | DATA animalMissing; |
| 2 | INPUT common $ animal $; |
| 3 | DATALINES; |
| 4 | a Ant |
| 5 | c Cat |
| 6 | d Dog |
| 7 | e Eagle |
| 8 | ; |
| 9 | DATA plantMissing2; |
| 10 | INPUT common $ plant $; |
| 11 | DATALINES; |
| 12 | a Apple |
| 13 | b Banana |
| 14 | c Coconut |
| 15 | e Eggplant |
| 16 | f Fig |
| 17 | ; |
| 18 | DATA merged; |
| 19 | MERGE animalMissing plantMissing2; |
| 20 | RUN; |
| 21 | PROC PRINT DATA=merged; RUN; |