Can somebody help me to convert this code to Data Step or Proc SQL? SAS code: data cd; set ab (rename=(x_ID=ID x_num=num x_year=year)); history_path = 0; if _n_ = 1 then do; length x_ID $9 x_num $3 x_year $4; declare hash vertices(dataset: 'work.ab'); rc = vertices.definekey('x_ID', 'x_num', 'x_year'); rc = vertices.definedata('history'); rc = vertices.definedone(); call missing(x_ID, x_num, x_year, history); length last_ID $9 last_num $3; declare hash edges(dataset: 'work.ac', multidata: 'yes'); rc = edges.definekey('x_ID', 'x_num', 'x_year'); rc = edges.definedata('last_ID', 'last_num'); rc = edges.definedone(); call missing(last_ID, last_num); end; run;
... View more