As featured in: Data Management Solutions Using SAS Hash Table Operations: A Business Intelligence Case Study , and built from this github repository.
LineUps.sas
1 /* "LineUps.sas" from the SAS Press book
2  Data Management Solutions Using SAS Hash Table Operations:
3  A Business Intelligence Case Study
4 */
5 
6 proc sql;
7  create table TEMPLATE.LINEUPS
8  (
9  Game_SK char(16) format=$HEX32. label = "Game Surrogate Key",
10  Date num format=YYMMDD10. label = "Game Date",
11  Team_SK num label = "Team Surrogate Key",
12  Batting_Order num label = "Lineup Position",
13  Player_ID num format=Z5. label = "Player ID",
14  First_Name char(12) informat=$12. label = "First Name",
15  Last_Name char(12) informat=$12. label = "Last Name",
16  Position_Code char(3) informat=$3. label "Position",
17  Bats char(1) informat=$1. label = "Bats L, R or Switch",
18  Throws char(1) informat=$1. label = "Throws L or R"
19  );
20  create index LineUp on template.LINEUPS(Game_SK,Team_SK);
21 quit;