/****************************************************************************** Project: Immigration Data Linkage Project (ircc_link) File: S:\ircc_link\prog\gillesd\concept_samples\refugee_class.sas Programmer: Gilles R. Detillieux First Created: Oct. 24, 2022 Revisions: - Dec. 20, 2022: - adapted to updated "v2" datasets & split crosswalks - use new IRCC_IMM_CAT_SHORT_to_APPL_CAT format to convert short IMM CAT as the numeric code is not in V2 data - Jan. 12, 2023: - adapted to most recent "v2" variable names - Jan. 18, 2023: - test with latest refugee class format, allow negative appid - Mar. 3, 2025: - adapted to 2024 "V2" variable names, acqdt values - Jul. 22, 2025: - use get_ircc_pr macro to fetch data Input datasets: registry.ircc_legacy_landing_1985jan_v2: IRCC landing data from 1985 to 1999 registry.ircc_landing_2000jan_v2: IRCC landing data from 2000 to 2023 Description: This program combines the IRCC permanent resident landing datasets (legacy and current data) and categorizes refugee class into five main groups. It converts the legacy imm. category code into the equivalent application category ID code in the newer landing data, so that legacy categories can be classified using a format for the newer codes. ******************************************************************************/ options nocenter; *** Get a full Canadian immigrant cohort from IRCC landing tables.; *** The macro sets the refugee status class based application category ID,; *** which is derived from immigration_category_short_eng using the; *** IRCC_IMM_CAT_SHORT_to_APPL_CAT conversion format, then categorized with; *** the IRCC_application_refugee_class_s format.; %get_ircc_pr(cohort=Canada, out=landing); *** report on landing categories; title 'Landed immigrants in Canada, by landing year and refugee class'; proc freq data=landing; tables landing_dt*refugee_class / list missing; format landing_dt year4.; run; *** a little cleanup; proc delete data=landing; run;