From 493639fe4af72173cadb612997da99fd04692562 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Thu, 26 Nov 2020 01:26:16 +0100 Subject: [PATCH] fix: composite PK --- all.sas | 5 ++++- base/mp_getdbml.sas | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/all.sas b/all.sas index 836c544..8bd834e 100644 --- a/all.sas +++ b/all.sas @@ -2940,7 +2940,10 @@ run; data &pkds.4; file &outref mod; set &pkds.2(where=(cols="&pkcols" and curds not in (&curdslist))); - line='Ref: "'!!"&curds"!!cats('".(',cols,')')!!' - '!!cats(quote(trim(curds)),'.(',cols,')'); + line='Ref: "'!!"&curds" + !!cats('".(',"%mf_getquotedstr(&pkcols,dlm=%str(,),quote=%str( ))",')') + !!' - ' + !!cats(quote(trim(curds)),'.(',"%mf_getquotedstr(&pkcols,dlm=%str(,),quote=%str( ))",')'); put line; run; diff --git a/base/mp_getdbml.sas b/base/mp_getdbml.sas index 9a53046..722a84f 100644 --- a/base/mp_getdbml.sas +++ b/base/mp_getdbml.sas @@ -256,7 +256,10 @@ run; data &pkds.4; file &outref mod; set &pkds.2(where=(cols="&pkcols" and curds not in (&curdslist))); - line='Ref: "'!!"&curds"!!cats('".(',cols,')')!!' - '!!cats(quote(trim(curds)),'.(',cols,')'); + line='Ref: "'!!"&curds" + !!cats('".(',"%mf_getquotedstr(&pkcols,dlm=%str(,),quote=%str( ))",')') + !!' - ' + !!cats(quote(trim(curds)),'.(',"%mf_getquotedstr(&pkcols,dlm=%str(,),quote=%str( ))",')'); put line; run;