From 7413266a8e180062a7a4e42f2232952af618a7db Mon Sep 17 00:00:00 2001 From: ^ Date: Mon, 29 Apr 2024 20:14:35 +0100 Subject: [PATCH] fix: correcting name to _____DELETE_THIS_RECORD_____ in mp_stripdiffs --- all.sas | 10 +++++----- base/mp_stripdiffs.sas | 10 +++++----- tests/base/mp_stripdiffs.test.sas | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/all.sas b/all.sas index 1f9be56..ccb3b8c 100644 --- a/all.sas +++ b/all.sas @@ -13393,7 +13393,7 @@ run; @li deleted rows - these are re-inserted @li changed rows - differences are reverted - @li added rows - these are marked with `_____DELETE_THIS_RECORD_____="YES"` + @li added rows - marked with `_____DELETE__THIS__RECORD_____="YES"` These changes are NOT applied to the base table - a staging dataset is simply prepared for an ETL process to action. In Data Controller, this @@ -13409,7 +13409,7 @@ run; in mddl_dc_difftable.sas @param [out] outds= (work.mp_stripdiffs) Output table containing the diffs. Has the same format as the base datset, plus a - `_____DELETE_THIS_RECORD_____` variable. + `_____DELETE__THIS__RECORD_____` variable. @param [in] mdebug= set to 1 to enable DEBUG messages and preserve outputs

SAS Macros

@@ -13531,7 +13531,7 @@ run; /* join to base table for preliminary stage DS */ proc sql; -create table &outds as select "No " as _____DELETE_THIS_RECORD_____, +create table &outds as select "No " as _____DELETE__THIS__RECORD_____, b.* from &ds5 a inner join &libds b @@ -13568,7 +13568,7 @@ data _null_; end; else if move_type='A' then do; if first.key_hash then do; - put "update &outds set _____DELETE_THIS_RECORD_____='Yes' where 1=1 " @@; + put "update &outds set _____DELETE__THIS__RECORD_____='Yes' where 1=1 "@@; end; /* gating if - as only need PK now */ if is_pk=1; @@ -13579,7 +13579,7 @@ data _null_; end; else if move_type='D' then do; if first.key_hash then do; - put "insert into &outds set _____DELETE_THIS_RECORD_____='No' " @@; + put "insert into &outds set _____DELETE__THIS__RECORD_____='No' " @@; end; put " ," tgtvar_nm '=' @@; charval=quote(cats(oldval_char)); diff --git a/base/mp_stripdiffs.sas b/base/mp_stripdiffs.sas index 29c6853..530701a 100644 --- a/base/mp_stripdiffs.sas +++ b/base/mp_stripdiffs.sas @@ -8,7 +8,7 @@ @li deleted rows - these are re-inserted @li changed rows - differences are reverted - @li added rows - these are marked with `_____DELETE_THIS_RECORD_____="YES"` + @li added rows - marked with `_____DELETE__THIS__RECORD_____="YES"` These changes are NOT applied to the base table - a staging dataset is simply prepared for an ETL process to action. In Data Controller, this @@ -24,7 +24,7 @@ in mddl_dc_difftable.sas @param [out] outds= (work.mp_stripdiffs) Output table containing the diffs. Has the same format as the base datset, plus a - `_____DELETE_THIS_RECORD_____` variable. + `_____DELETE__THIS__RECORD_____` variable. @param [in] mdebug= set to 1 to enable DEBUG messages and preserve outputs

SAS Macros

@@ -146,7 +146,7 @@ run; /* join to base table for preliminary stage DS */ proc sql; -create table &outds as select "No " as _____DELETE_THIS_RECORD_____, +create table &outds as select "No " as _____DELETE__THIS__RECORD_____, b.* from &ds5 a inner join &libds b @@ -183,7 +183,7 @@ data _null_; end; else if move_type='A' then do; if first.key_hash then do; - put "update &outds set _____DELETE_THIS_RECORD_____='Yes' where 1=1 " @@; + put "update &outds set _____DELETE__THIS__RECORD_____='Yes' where 1=1 "@@; end; /* gating if - as only need PK now */ if is_pk=1; @@ -194,7 +194,7 @@ data _null_; end; else if move_type='D' then do; if first.key_hash then do; - put "insert into &outds set _____DELETE_THIS_RECORD_____='No' " @@; + put "insert into &outds set _____DELETE__THIS__RECORD_____='No' " @@; end; put " ," tgtvar_nm '=' @@; charval=quote(cats(oldval_char)); diff --git a/tests/base/mp_stripdiffs.test.sas b/tests/base/mp_stripdiffs.test.sas index e0ccd67..bdb7b99 100644 --- a/tests/base/mp_stripdiffs.test.sas +++ b/tests/base/mp_stripdiffs.test.sas @@ -82,10 +82,10 @@ run; %let addpass=0; data _null_; set work.mp_stripdiffs; - if upcase(_____DELETE_THIS_RECORD_____)='NO' and name="&delname" + if upcase(_____DELETE__THIS__RECORD_____)='NO' and name="&delname" then call symputx('delpass',1); if name="&modname" and age=&modval then call symputx('modpass',1); - if upcase(_____DELETE_THIS_RECORD_____)='YES' and name="Newbie" + if upcase(_____DELETE__THIS__RECORD_____)='YES' and name="Newbie" then call symputx('addpass',1); run;