diff --git a/.gitpod.yml b/.gitpod.yml index 92a0448..e6933a4 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,5 +1,5 @@ tasks: - - init: nvm install --latest-npm && npm i -g @sasjs/cli + - init: nvm install --lts && npm i -g @sasjs/cli image: file: .gitpod.dockerfile @@ -20,6 +20,6 @@ github: # add a "Review in Gitpod" button as a comment to pull requests (defaults to true) addComment: true # add a "Review in Gitpod" button to pull requests (defaults to false) - addBadge: true + addBadge: false # add a label once the prebuild is ready to pull requests (defaults to false) addLabel: prebuilt-in-gitpod \ No newline at end of file diff --git a/all.sas b/all.sas index ae4a4c2..753f915 100644 --- a/all.sas +++ b/all.sas @@ -4466,8 +4466,11 @@ create table &outds as on upcase(a.TABLE_CATALOG)=upcase(b.TABLE_CATALOG) and upcase(a.TABLE_NAME)=upcase(b.TABLE_NAME) and a.constraint_name=b.constraint_name - where upcase(a.TABLE_CATALOG)="&lib" - and upcase(b.TABLE_CATALOG)="&lib" +/** + * We cannot apply this clause to the underlying dictionary table. See: + * https://communities.sas.com/t5/SAS-Programming/Unexpected-Where-Clause-behaviour-in-dictionary-TABLE/m-p/771554#M244867 + */ + where calculated libref="&lib" %if "&ds" ne "" %then %do; and upcase(a.TABLE_NAME)="&ds" and upcase(b.TABLE_NAME)="&ds" diff --git a/base/mp_getconstraints.sas b/base/mp_getconstraints.sas index c3f6434..3963cf6 100644 --- a/base/mp_getconstraints.sas +++ b/base/mp_getconstraints.sas @@ -49,8 +49,11 @@ create table &outds as on upcase(a.TABLE_CATALOG)=upcase(b.TABLE_CATALOG) and upcase(a.TABLE_NAME)=upcase(b.TABLE_NAME) and a.constraint_name=b.constraint_name - where upcase(a.TABLE_CATALOG)="&lib" - and upcase(b.TABLE_CATALOG)="&lib" +/** + * We cannot apply this clause to the underlying dictionary table. See: + * https://communities.sas.com/t5/SAS-Programming/Unexpected-Where-Clause-behaviour-in-dictionary-TABLE/m-p/771554#M244867 + */ + where calculated libref="&lib" %if "&ds" ne "" %then %do; and upcase(a.TABLE_NAME)="&ds" and upcase(b.TABLE_NAME)="&ds" diff --git a/sasjs/sasjsconfig.json b/sasjs/sasjsconfig.json index 2a885b8..d94f3fd 100644 --- a/sasjs/sasjsconfig.json +++ b/sasjs/sasjsconfig.json @@ -50,7 +50,10 @@ "appLoc": "/Shared Data/temp/macrocore", "macroFolders": [ "tests/sas9only" - ] + ], + "deployConfig": { + "deployServicePack": true + } }, { "name": "docsonly", diff --git a/tests/crossplatform/mp_getconstraints.test.sas b/tests/crossplatform/mp_getconstraints.test.sas new file mode 100644 index 0000000..1da4ebd --- /dev/null +++ b/tests/crossplatform/mp_getconstraints.test.sas @@ -0,0 +1,29 @@ +/** + @file + @brief Testing mp_getconstraints.sas macro + +