7 if 0 then
set template.Players_SCD6;
11 ifc(exist(
"bizarro.Players_SCD6")
12 ,
"bizarro.Players_SCD6" 13 ,
"template.Players_SCD6" 15 ,ordered:
"A",multidata:
"Y");
16 scd.defineKey(
"Player_ID");
17 scd.defineData(
"Player_ID",
"Active",
"SubKey" 18 ,
"Team_SK",
"First_Name",
"Last_Name" 19 ,
"Position_Code",
"Bats",
"Throws" 20 ,
"Start_Date",
"End_Date");
24 (rename = (Batter_ID = Player_ID
26 First_Name = _First_Name
27 Last_Name = _Last_Name
28 Position_Code = _Position_Code
32 if scd.check(Key:Player_ID) ne 0 then
34 scd.add(key: Player_ID
53 if (Start_Date le Date le End_Date) then leave;
57 call missing(Team_SK,First_Name,Last_Name
58 ,Position_Code,Bats,Throws);
60 if catx(
":", Team_SK, First_Name, Last_Name
61 , Position_Code, Bats, Throws) ne
62 catx(
":",_Team_SK,_First_Name,_Last_Name
63 ,_Position_Code,_Bats,_Throws) then
67 scd.replaceDup(data: Player_ID
85 _SubKey = max(_SubKey,SubKey);
87 scd.add(key: Player_ID
103 scd.output(dataset:
"Bizarro.Players_SCD6" 104 ||
"(index=(SCD6=(Player_ID Active SubKey)))");
110 if 0 then
set bizarro.Players_SCD6(drop=Subkey);
113 dcl hash scd(dataset:
"bizarro.Players_SCD6" 114 ,multidata:
"Y",ordered:
"D");
115 scd.defineKey(
"Player_ID",
"Active");
116 scd.defineData(
"Team_SK",
"Player_ID",
"Active" 117 ,
"First_Name",
"Last_Name" 118 ,
"Position_Code",
"Bats",
"Throws" 119 ,
"Start_Date",
"End_Date");
123 attrib Date format = yymmdd10. informat = yymmdd10.;
124 input Player_ID Date;
125 RC = scd.find(Key:Player_ID,Key:1);
126 if RC = 0 and (Start_Date le Date le End_Date)
130 RC = scd.find(Key:Player_ID,Key:0);
132 if (Start_Date le Date le End_Date) then leave;
133 RC = scd.find_next();
137 call missing(Team_SK,Active,First_Name
138 ,Last_Name,Position_Code,Bats
139 ,Throws,Start_Date,End_Date);