fix: remove WORK, SASUSER and CASUSER as library options. #224
Build / Build-and-ng-test (pull_request) Successful in 4m15s
Build / Build-and-test-development (pull_request) Successful in 10m28s
Lighthouse Checks / lighthouse (pull_request) Successful in 18m47s

This commit is contained in:
2026-04-17 14:21:24 +01:00
parent f63e507ddf
commit ec66631a33
3 changed files with 13 additions and 1 deletions
@@ -19,6 +19,11 @@
data work.staging_ds;
set work.staging_ds;
LIBREF=upcase(LIBREF);
if LIBREF in ('WORK','CASUSER','SASUSER') then do;
putlog "ERR" +(-1) "OR: invalid LIBREF - " LIBREF;
call symputx('errval',1);
call symputx('errmsg',"Invalid LIBREF: "!!LIBREF);
end;
DSN=upcase(DSN);
ACCESS_LEVEL=upcase(ACCESS_LEVEL);
if ACCESS_LEVEL not in ('EDIT','APPROVE','VIEW','SIGNOFF','AUDIT') then do;
@@ -39,6 +39,13 @@ data work.staging_ds;
audit_libds=upcase(audit_libds);
rk_underlying=upcase(rk_underlying);
/* do not accept certain librefs */
if LIBREF in ('WORK','CASUSER','SASUSER')
then do;
call symputx('errmsg',"Invalid LIBREF: "!!LIBREF);
call symputx('errflag',1);
end;
/* check for valid loadtype */
if LOADTYPE not in ('UPDATE','TXTEMPORAL','FORMAT_CAT','BITEMPORAL','REPLACE')
then do;
@@ -21,7 +21,7 @@ create table &outds as
,engine
,'' as libraryid length=17
from dictionary.libnames
where libname not in ('WORK','SASUSER');
where libname not in ('WORK','SASUSER','CASUSER');
insert into &syslast values ("&DC_LIBREF", "&DC_LIBNAME",'','V9');
%mend dc_getlibs;