7 if 0 then
set template.Players_SCD3_Facts;
11 ifc(exist(
"bizarro.Players_SCD3_Facts")
12 ,
"bizarro.Players_SCD3_Facts" 13 ,
"template.Players_SCD3_Facts" 16 scd.defineKey(
"Player_ID");
17 scd.defineData(
"Player_ID",
"Team_SK" 18 ,
"First_Name",
"Last_Name" 19 ,
"First",
"Second",
"Short",
"Third" 20 ,
"Left",
"Center",
"Right",
"Catcher" 21 ,
"Pitcher",
"Pinch_Hitter");
23 dcl hash uniqueGames();
24 uniqueGames.defineKey(
"Game_SK" 27 uniqueGames.defineDone();
29 set bizarro.AtBats(rename = (Batter_ID = Player_ID))
31 if scd.find() ne 0 then
32 call missing(First,Second,Short,Third
33 ,Left,Center,Right,Catcher
34 ,Pitcher,Pinch_Hitter);
35 select(Position_Code);
36 when(
"1B") First + (uniqueGames.add() = 0);
37 when("2B") Second + (uniqueGames.add() = 0);
38 when("SS") Short + (uniqueGames.add() = 0);
39 when("3B") Third + (uniqueGames.add() = 0);
40 when("LF") Left + (uniqueGames.add() = 0);
41 when("CF") Center + (uniqueGames.add() = 0);
42 when("RF") Right + (uniqueGames.add() = 0);
43 when("C" ) Catcher + (uniqueGames.add() = 0);
44 when("SP") Pitcher + (uniqueGames.add() = 0);
45 when("RP") Pitcher + (uniqueGames.add() = 0);
46 when("PH") Pinch_Hitter + (uniqueGames.add() = 0);
51 scd.output(dataset:"Bizarro.Players_SCD3_Facts");