mirror of
https://github.com/sasjs/core.git
synced 2026-01-07 09:30:06 +00:00
fix: missing param in webout of SASjs Server and Viya
This commit is contained in:
40
all.sas
40
all.sas
@@ -2904,7 +2904,7 @@ data &outds;
|
|||||||
if libref(lib) ne 0 then do;
|
if libref(lib) ne 0 then do;
|
||||||
msg=catx(' ','libref',lib,'is not assigned!');
|
msg=catx(' ','libref',lib,'is not assigned!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
return;
|
return;
|
||||||
@@ -2912,7 +2912,7 @@ data &outds;
|
|||||||
if exist(cats(lib,'.',ds)) ne 1 then do;
|
if exist(cats(lib,'.',ds)) ne 1 then do;
|
||||||
msg=catx(' ','libds',lib,'.',ds,'does not exist!');
|
msg=catx(' ','libds',lib,'.',ds,'does not exist!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
return;
|
return;
|
||||||
@@ -2921,7 +2921,7 @@ data &outds;
|
|||||||
if is_fmt=0 then do;
|
if is_fmt=0 then do;
|
||||||
msg=catx(' ','format',fmt,'on libds',lib,'.',ds,'.',var,'is not valid!');
|
msg=catx(' ','format',fmt,'on libds',lib,'.',ds,'.',var,'is not valid!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
return;
|
return;
|
||||||
@@ -2933,7 +2933,7 @@ data &outds;
|
|||||||
if dsid=0 then do;
|
if dsid=0 then do;
|
||||||
msg=catx(' ','libds',lib,'.',ds,' could not be opened!');
|
msg=catx(' ','libds',lib,'.',ds,' could not be opened!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
return;
|
return;
|
||||||
@@ -2941,7 +2941,7 @@ data &outds;
|
|||||||
if varnum(dsid,var)<1 then do;
|
if varnum(dsid,var)<1 then do;
|
||||||
msg=catx(' ','Variable',lib,'.',ds,'.',var,' was not found!');
|
msg=catx(' ','Variable',lib,'.',ds,'.',var,' was not found!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
end;
|
end;
|
||||||
@@ -4255,7 +4255,7 @@ drop table &ddlds,&cntlds;
|
|||||||
rc2=filename(fref2,filepath2,'disk','recfm=n');
|
rc2=filename(fref2,filepath2,'disk','recfm=n');
|
||||||
if fcopy(fref1,fref2) ne 0 then do;
|
if fcopy(fref1,fref2) ne 0 then do;
|
||||||
msg=sysmsg();
|
msg=sysmsg();
|
||||||
putlog "%str(ERR)OR: Unable to copy " filepath " to " filepath2;
|
putlog 'ERR' +(-1) "OR: Unable to copy " filepath " to " filepath2;
|
||||||
putlog msg=;
|
putlog msg=;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -13734,7 +13734,7 @@ alter table &libds modify &var char(&len);
|
|||||||
retain &tempcol;
|
retain &tempcol;
|
||||||
&tempcol=prxparse('/^[_a-z]\w{0,7}\.[_a-z]\w{0,31}$/i');
|
&tempcol=prxparse('/^[_a-z]\w{0,7}\.[_a-z]\w{0,31}$/i');
|
||||||
if missing(&tempcol) then do;
|
if missing(&tempcol) then do;
|
||||||
putlog "%str(ERR)OR: Invalid expression for LIBDS";
|
putlog 'ERR' +(-1) "OR: Invalid expression for LIBDS";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
drop &tempcol;
|
drop &tempcol;
|
||||||
@@ -13748,7 +13748,7 @@ alter table &libds modify &var char(&len);
|
|||||||
retain &tempcol;
|
retain &tempcol;
|
||||||
&tempcol=prxparse('/^[_a-z\$]\w{0,31}\.[0-9]*$/i');
|
&tempcol=prxparse('/^[_a-z\$]\w{0,31}\.[0-9]*$/i');
|
||||||
if missing(&tempcol) then do;
|
if missing(&tempcol) then do;
|
||||||
putlog "%str(ERR)OR: Invalid expression for FORMAT";
|
putlog 'ERR' +(-1) "OR: Invalid expression for FORMAT";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
drop &tempcol;
|
drop &tempcol;
|
||||||
@@ -15268,12 +15268,12 @@ data _null_;
|
|||||||
|
|
||||||
* name must not be blank;
|
* name must not be blank;
|
||||||
if ( folderPath = '' ) then do;
|
if ( folderPath = '' ) then do;
|
||||||
put "%str(ERR)OR: &sysmacroname PATH parameter value must be non-blank";
|
put 'ERR' +(-1) "OR: &sysmacroname PATH parameter value must be non-blank";
|
||||||
end;
|
end;
|
||||||
|
|
||||||
* must have a starting slash ;
|
* must have a starting slash ;
|
||||||
if ( substr(folderPath,1,1) ne '/' ) then do;
|
if ( substr(folderPath,1,1) ne '/' ) then do;
|
||||||
put "%str(ERR)OR: &sysmacroname PATH param value must have starting slash";
|
put 'ERR' +(-1) "OR: &sysmacroname PATH param value must have starting slash";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -15286,14 +15286,14 @@ data _null_;
|
|||||||
|
|
||||||
* do not create a root (one level) folder ;
|
* do not create a root (one level) folder ;
|
||||||
if countc(folderPath,'/')=1 then do;
|
if countc(folderPath,'/')=1 then do;
|
||||||
put "%str(ERR)OR: &sysmacroname will not create a new ROOT folder";
|
put 'ERR' +(-1) "OR: &sysmacroname will not create a new ROOT folder";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
* check that root folder exists ;
|
* check that root folder exists ;
|
||||||
root=cats('/',scan(folderpath,1,'/'),"(Folder)");
|
root=cats('/',scan(folderpath,1,'/'),"(Folder)");
|
||||||
if metadata_pathobj('',root,"",objType,parentId)<1 then do;
|
if metadata_pathobj('',root,"",objType,parentId)<1 then do;
|
||||||
put "%str(ERR)OR: " root " does not exist!";
|
put 'ERR' +(-1) "OR: " root " does not exist!";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -15358,7 +15358,7 @@ run;
|
|||||||
putlog "SUCCCESS! &path created.";
|
putlog "SUCCCESS! &path created.";
|
||||||
end;
|
end;
|
||||||
else do;
|
else do;
|
||||||
putlog "%str(ERR)OR: unsuccessful attempt to create &path";
|
putlog 'ERR' +(-1) "OR: unsuccessful attempt to create &path";
|
||||||
call symputx('syscc',8);
|
call symputx('syscc',8);
|
||||||
end;
|
end;
|
||||||
run;
|
run;
|
||||||
@@ -18737,7 +18737,7 @@ data &outds;
|
|||||||
rc5=metadata_getattr(tsuri,"Name",servercontext);
|
rc5=metadata_getattr(tsuri,"Name",servercontext);
|
||||||
end;
|
end;
|
||||||
else do;
|
else do;
|
||||||
put "%str(ERR)OR: could not find " path;
|
put 'ERR' +(-1) "OR: could not find " path;
|
||||||
put (_all_)(=);
|
put (_all_)(=);
|
||||||
end;
|
end;
|
||||||
&md.put (_all_)(=);
|
&md.put (_all_)(=);
|
||||||
@@ -21845,9 +21845,11 @@ data _null_;
|
|||||||
put ' ';
|
put ' ';
|
||||||
put '%mend mfs_httpheader; ';
|
put '%mend mfs_httpheader; ';
|
||||||
/* WEBOUT END */
|
/* WEBOUT END */
|
||||||
put '%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO);';
|
put '%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO';
|
||||||
|
put ' ,maxobs=MAX';
|
||||||
|
put ');';
|
||||||
put ' %ms_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt,missing=&missing';
|
put ' %ms_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt,missing=&missing';
|
||||||
put ' ,showmeta=&showmeta';
|
put ' ,showmeta=&showmeta,maxobs=&maxobs';
|
||||||
put ' )';
|
put ' )';
|
||||||
put '%mend;';
|
put '%mend;';
|
||||||
run;
|
run;
|
||||||
@@ -24491,9 +24493,11 @@ data _null_;
|
|||||||
put '%global __program _program;';
|
put '%global __program _program;';
|
||||||
put '%let _program=%sysfunc(coalescec(&__program,&_program));';
|
put '%let _program=%sysfunc(coalescec(&__program,&_program));';
|
||||||
put ' ';
|
put ' ';
|
||||||
put '%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO);';
|
put '%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO';
|
||||||
|
put ' ,maxobs=MAX';
|
||||||
|
put ');';
|
||||||
put ' %mv_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt,missing=&missing';
|
put ' %mv_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt,missing=&missing';
|
||||||
put ' ,showmeta=&showmeta';
|
put ' ,showmeta=&showmeta,maxobs=&maxobs';
|
||||||
put ' )';
|
put ' )';
|
||||||
put '%mend;';
|
put '%mend;';
|
||||||
run;
|
run;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ data &outds;
|
|||||||
if libref(lib) ne 0 then do;
|
if libref(lib) ne 0 then do;
|
||||||
msg=catx(' ','libref',lib,'is not assigned!');
|
msg=catx(' ','libref',lib,'is not assigned!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
return;
|
return;
|
||||||
@@ -102,7 +102,7 @@ data &outds;
|
|||||||
if exist(cats(lib,'.',ds)) ne 1 then do;
|
if exist(cats(lib,'.',ds)) ne 1 then do;
|
||||||
msg=catx(' ','libds',lib,'.',ds,'does not exist!');
|
msg=catx(' ','libds',lib,'.',ds,'does not exist!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
return;
|
return;
|
||||||
@@ -111,7 +111,7 @@ data &outds;
|
|||||||
if is_fmt=0 then do;
|
if is_fmt=0 then do;
|
||||||
msg=catx(' ','format',fmt,'on libds',lib,'.',ds,'.',var,'is not valid!');
|
msg=catx(' ','format',fmt,'on libds',lib,'.',ds,'.',var,'is not valid!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
return;
|
return;
|
||||||
@@ -123,7 +123,7 @@ data &outds;
|
|||||||
if dsid=0 then do;
|
if dsid=0 then do;
|
||||||
msg=catx(' ','libds',lib,'.',ds,' could not be opened!');
|
msg=catx(' ','libds',lib,'.',ds,' could not be opened!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
return;
|
return;
|
||||||
@@ -131,7 +131,7 @@ data &outds;
|
|||||||
if varnum(dsid,var)<1 then do;
|
if varnum(dsid,var)<1 then do;
|
||||||
msg=catx(' ','Variable',lib,'.',ds,'.',var,' was not found!');
|
msg=catx(' ','Variable',lib,'.',ds,'.',var,' was not found!');
|
||||||
%if &errds=0 %then %do;
|
%if &errds=0 %then %do;
|
||||||
putlog "%str(ERR)OR: " msg;
|
putlog 'ERR' +(-1) "OR: " msg;
|
||||||
%end;
|
%end;
|
||||||
output;
|
output;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
rc2=filename(fref2,filepath2,'disk','recfm=n');
|
rc2=filename(fref2,filepath2,'disk','recfm=n');
|
||||||
if fcopy(fref1,fref2) ne 0 then do;
|
if fcopy(fref1,fref2) ne 0 then do;
|
||||||
msg=sysmsg();
|
msg=sysmsg();
|
||||||
putlog "%str(ERR)OR: Unable to copy " filepath " to " filepath2;
|
putlog 'ERR' +(-1) "OR: Unable to copy " filepath " to " filepath2;
|
||||||
putlog msg=;
|
putlog msg=;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
retain &tempcol;
|
retain &tempcol;
|
||||||
&tempcol=prxparse('/^[_a-z]\w{0,7}\.[_a-z]\w{0,31}$/i');
|
&tempcol=prxparse('/^[_a-z]\w{0,7}\.[_a-z]\w{0,31}$/i');
|
||||||
if missing(&tempcol) then do;
|
if missing(&tempcol) then do;
|
||||||
putlog "%str(ERR)OR: Invalid expression for LIBDS";
|
putlog 'ERR' +(-1) "OR: Invalid expression for LIBDS";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
drop &tempcol;
|
drop &tempcol;
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
retain &tempcol;
|
retain &tempcol;
|
||||||
&tempcol=prxparse('/^[_a-z\$]\w{0,31}\.[0-9]*$/i');
|
&tempcol=prxparse('/^[_a-z\$]\w{0,31}\.[0-9]*$/i');
|
||||||
if missing(&tempcol) then do;
|
if missing(&tempcol) then do;
|
||||||
putlog "%str(ERR)OR: Invalid expression for FORMAT";
|
putlog 'ERR' +(-1) "OR: Invalid expression for FORMAT";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
drop &tempcol;
|
drop &tempcol;
|
||||||
|
|||||||
@@ -51,12 +51,12 @@ data _null_;
|
|||||||
|
|
||||||
* name must not be blank;
|
* name must not be blank;
|
||||||
if ( folderPath = '' ) then do;
|
if ( folderPath = '' ) then do;
|
||||||
put "%str(ERR)OR: &sysmacroname PATH parameter value must be non-blank";
|
put 'ERR' +(-1) "OR: &sysmacroname PATH parameter value must be non-blank";
|
||||||
end;
|
end;
|
||||||
|
|
||||||
* must have a starting slash ;
|
* must have a starting slash ;
|
||||||
if ( substr(folderPath,1,1) ne '/' ) then do;
|
if ( substr(folderPath,1,1) ne '/' ) then do;
|
||||||
put "%str(ERR)OR: &sysmacroname PATH param value must have starting slash";
|
put 'ERR' +(-1) "OR: &sysmacroname PATH param value must have starting slash";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -69,14 +69,14 @@ data _null_;
|
|||||||
|
|
||||||
* do not create a root (one level) folder ;
|
* do not create a root (one level) folder ;
|
||||||
if countc(folderPath,'/')=1 then do;
|
if countc(folderPath,'/')=1 then do;
|
||||||
put "%str(ERR)OR: &sysmacroname will not create a new ROOT folder";
|
put 'ERR' +(-1) "OR: &sysmacroname will not create a new ROOT folder";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
* check that root folder exists ;
|
* check that root folder exists ;
|
||||||
root=cats('/',scan(folderpath,1,'/'),"(Folder)");
|
root=cats('/',scan(folderpath,1,'/'),"(Folder)");
|
||||||
if metadata_pathobj('',root,"",objType,parentId)<1 then do;
|
if metadata_pathobj('',root,"",objType,parentId)<1 then do;
|
||||||
put "%str(ERR)OR: " root " does not exist!";
|
put 'ERR' +(-1) "OR: " root " does not exist!";
|
||||||
stop;
|
stop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ run;
|
|||||||
putlog "SUCCCESS! &path created.";
|
putlog "SUCCCESS! &path created.";
|
||||||
end;
|
end;
|
||||||
else do;
|
else do;
|
||||||
putlog "%str(ERR)OR: unsuccessful attempt to create &path";
|
putlog 'ERR' +(-1) "OR: unsuccessful attempt to create &path";
|
||||||
call symputx('syscc',8);
|
call symputx('syscc',8);
|
||||||
end;
|
end;
|
||||||
run;
|
run;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ data &outds;
|
|||||||
rc5=metadata_getattr(tsuri,"Name",servercontext);
|
rc5=metadata_getattr(tsuri,"Name",servercontext);
|
||||||
end;
|
end;
|
||||||
else do;
|
else do;
|
||||||
put "%str(ERR)OR: could not find " path;
|
put 'ERR' +(-1) "OR: could not find " path;
|
||||||
put (_all_)(=);
|
put (_all_)(=);
|
||||||
end;
|
end;
|
||||||
&md.put (_all_)(=);
|
&md.put (_all_)(=);
|
||||||
|
|||||||
@@ -652,9 +652,11 @@ data _null_;
|
|||||||
put ' ';
|
put ' ';
|
||||||
put '%mend mfs_httpheader; ';
|
put '%mend mfs_httpheader; ';
|
||||||
/* WEBOUT END */
|
/* WEBOUT END */
|
||||||
put '%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO);';
|
put '%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO';
|
||||||
|
put ' ,maxobs=MAX';
|
||||||
|
put ');';
|
||||||
put ' %ms_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt,missing=&missing';
|
put ' %ms_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt,missing=&missing';
|
||||||
put ' ,showmeta=&showmeta';
|
put ' ,showmeta=&showmeta,maxobs=&maxobs';
|
||||||
put ' )';
|
put ' )';
|
||||||
put '%mend;';
|
put '%mend;';
|
||||||
run;
|
run;
|
||||||
|
|||||||
@@ -814,9 +814,11 @@ data _null_;
|
|||||||
put '%global __program _program;';
|
put '%global __program _program;';
|
||||||
put '%let _program=%sysfunc(coalescec(&__program,&_program));';
|
put '%let _program=%sysfunc(coalescec(&__program,&_program));';
|
||||||
put ' ';
|
put ' ';
|
||||||
put '%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO);';
|
put '%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO';
|
||||||
|
put ' ,maxobs=MAX';
|
||||||
|
put ');';
|
||||||
put ' %mv_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt,missing=&missing';
|
put ' %mv_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt,missing=&missing';
|
||||||
put ' ,showmeta=&showmeta';
|
put ' ,showmeta=&showmeta,maxobs=&maxobs';
|
||||||
put ' )';
|
put ' )';
|
||||||
put '%mend;';
|
put '%mend;';
|
||||||
run;
|
run;
|
||||||
|
|||||||
Reference in New Issue
Block a user