1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-06 09:00:06 +00:00

fix: testing fixes

This commit is contained in:
Allan Bowe
2022-05-10 21:36:16 +00:00
parent 453aee2c1f
commit 1672c96340
7 changed files with 48 additions and 27 deletions

View File

@@ -95,8 +95,9 @@ data &outds;
length reason_cd $4032 vtype $1 vnum dsid 8;
/* get column attributes */
if dsid=open("&inds","i")<1 then do;
REASON_CD="Unable to assign &inds";
dsid=open("&targetds","i");
if dsid<1 then do;
REASON_CD="Unable to assign &targetds";
putlog REASON_CD= dsid=;
call symputx('reason_cd',reason_cd,'l');
call symputx('nobs',_n_,'l');
@@ -104,7 +105,7 @@ data &outds;
end;
vnum=varnum(dsid,VARIABLE_NM);
if vnum<1 then do;
REASON_CD=cats("Variable (",VARIABLE_NM,") not found in &inds");
REASON_CD=cats("Variable (",VARIABLE_NM,") not found in &targetds");
putlog REASON_CD= dsid=;
call symputx('reason_cd',reason_cd,'l');
call symputx('nobs',_n_,'l');

View File

@@ -84,6 +84,9 @@ filename &outref temp;
run;
%end;
%else %do;
proc sort data=&inds;
by SUBGROUP_ID;
run;
data _null_;
file &outref lrecl=32800;
set &inds end=last;

View File

@@ -69,7 +69,11 @@
%put %str(ERR)OR: Dataset &libds is not a dataset;
%end;
%else %do;
data &outds(rename=(&keyvar=hashkey) keep=&keyvar)/nonote2err;
data &outds(rename=(&keyvar=hashkey) keep=&keyvar)
%if "%substr(&sysver,1,1)" ne "4" and "%substr(&sysver,1,1)" ne "5" %then %do;
/nonote2err
%end;
;
length &prevkeyvar &keyvar $32;
retain &prevkeyvar "%sysfunc(md5(%str(&salt)),$hex32.)";
set &libds end=&lastvar;