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

Merge pull request #46 from sasjs/mendfixes

sasjs lint fix for macro name in MEND statement
This commit is contained in:
Allan Bowe
2021-06-23 22:27:36 +03:00
committed by GitHub
125 changed files with 250 additions and 248 deletions

View File

@@ -2,7 +2,7 @@
"noTrailingSpaces": true, "noTrailingSpaces": true,
"noEncodedPasswords": true, "noEncodedPasswords": true,
"hasDoxygenHeader": true, "hasDoxygenHeader": true,
"hasMacroNameInMend": false, "hasMacroNameInMend": true,
"hasMacroParentheses": true, "hasMacroParentheses": true,
"noNestedMacros": false, "noNestedMacros": false,
"noSpacesInFileNames": true, "noSpacesInFileNames": true,

248
all.sas
View File

@@ -112,7 +112,7 @@ options noquotelenmax;
-1 -1
%put &sysmacroname: &feature not found; %put &sysmacroname: &feature not found;
%end; %end;
%mend; %mend mf_existfeature;
/** @endcond *//** /** @endcond *//**
@file @file
@@ -140,7 +140,7 @@ options noquotelenmax;
0 0
%end; %end;
%mend;/** %mend mf_existfileref;/**
@file @file
@brief Checks if a variable exists in a data set. @brief Checks if a variable exists in a data set.
@details Returns 0 if the variable does NOT exist, and return the position of @details Returns 0 if the variable does NOT exist, and return the position of
@@ -172,7 +172,7 @@ options noquotelenmax;
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
%mend; %mend mf_existvar;
/** @endcond *//** /** @endcond *//**
@file @file
@@ -230,7 +230,7 @@ options noquotelenmax;
0 0
%put Vars not found: &found; %put Vars not found: &found;
%end; %end;
%mend; %mend mf_existvarlist;
/** @endcond *//** /** @endcond *//**
@file @file
@@ -265,7 +265,7 @@ options noquotelenmax;
%sysfunc(attrc(&dsid,&attr)) %sysfunc(attrc(&dsid,&attr))
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
%mend;/** %mend mf_getattrc;/**
@file @file
@brief Returns a numeric attribute of a dataset. @brief Returns a numeric attribute of a dataset.
@details Can be used in open code, eg as follows: @details Can be used in open code, eg as follows:
@@ -298,7 +298,7 @@ options noquotelenmax;
%sysfunc(attrn(&dsid,&attr)) %sysfunc(attrn(&dsid,&attr))
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
%mend;/** %mend mf_getattrn;/**
@file @file
@brief Returns the engine type of a SAS library @brief Returns the engine type of a SAS library
@details Usage: @details Usage:
@@ -348,7 +348,7 @@ options noquotelenmax;
&engine &engine
%mend; %mend mf_getengine;
/** @endcond *//** /** @endcond *//**
@file @file
@@ -396,7 +396,7 @@ options noquotelenmax;
%sysfunc(INPUTN(&bytes, best.),sizekmg.) %sysfunc(INPUTN(&bytes, best.),sizekmg.)
%end; %end;
%mend ;/** %mend mf_getfilesize ;/**
@file @file
@brief retrieves a key value pair from a control dataset @brief retrieves a key value pair from a control dataset
@details By default, control dataset is work.mp_setkeyvalue. Usage: @details By default, control dataset is work.mp_setkeyvalue. Usage:
@@ -427,7 +427,7 @@ options noquotelenmax;
&valc &valc
%end; %end;
%else %put %str(ERR)OR: Unable to find key &key in ds &libds; %else %put %str(ERR)OR: Unable to find key &key in ds &libds;
%mend;/** %mend mf_getkeyvalue;/**
@file mf_getplatform.sas @file mf_getplatform.sas
@brief Returns platform specific variables @brief Returns platform specific variables
@details Enables platform specific variables to be returned @details Enables platform specific variables to be returned
@@ -491,7 +491,7 @@ options noquotelenmax;
%else %if &switch=VIYARESTAPI %then %do; %else %if &switch=VIYARESTAPI %then %do;
%mf_trimstr(%sysfunc(getoption(servicesbaseurl)),/) %mf_trimstr(%sysfunc(getoption(servicesbaseurl)),/)
%end; %end;
%mend;/** %mend mf_getplatform;/**
@file @file
@brief Adds custom quotes / delimiters to a delimited string @brief Adds custom quotes / delimiters to a delimited string
@details Can be used in open code, eg as follows: @details Can be used in open code, eg as follows:
@@ -543,7 +543,7 @@ options noquotelenmax;
&buffer &buffer
%mend;/** %mend mf_getquotedstr;/**
@file mf_getschema.sas @file mf_getschema.sas
@brief Returns the database schema of a SAS library @brief Returns the database schema of a SAS library
@details Usage: @details Usage:
@@ -583,7 +583,7 @@ options noquotelenmax;
&schema &schema
%mend; %mend mf_getschema;
/** @endcond */ /** @endcond */
/** /**
@@ -622,7 +622,7 @@ options noquotelenmax;
%end; %end;
%end; %end;
%put unable to find available fileref in range &prefix.0-&maxtries; %put unable to find available fileref in range &prefix.0-&maxtries;
%mend;/** %mend mf_getuniquefileref;/**
@file @file
@brief Returns an unused libref @brief Returns an unused libref
@details Use as follows: @details Use as follows:
@@ -661,7 +661,7 @@ options noquotelenmax;
%end; %end;
%end; %end;
%put unable to find available libref in range &prefix.0-&maxtries; %put unable to find available libref in range &prefix.0-&maxtries;
%mend;/** %mend mf_getuniquelibref;/**
@file mf_getuniquename.sas @file mf_getuniquename.sas
@brief Returns a shortened (32 char) GUID as a valid SAS name @brief Returns a shortened (32 char) GUID as a valid SAS name
@details Use as follows: @details Use as follows:
@@ -723,7 +723,7 @@ options noquotelenmax;
%quote(&user) %quote(&user)
%mend; %mend mf_getuser;
/** /**
@file @file
@brief Retrieves a value from a dataset. If no filter supplied, then first @brief Retrieves a value from a dataset. If no filter supplied, then first
@@ -756,7 +756,7 @@ options noquotelenmax;
%trim(&&&variable) %trim(&&&variable)
%end; %end;
%mend;/** %mend mf_getvalue;/**
@file @file
@brief Returns number of variables in a dataset @brief Returns number of variables in a dataset
@details Useful to identify those renagade datasets that have no columns! @details Useful to identify those renagade datasets that have no columns!
@@ -787,7 +787,7 @@ options noquotelenmax;
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
&nvars &nvars
%mend;/** %mend mf_getvarcount;/**
@file @file
@brief Returns the format of a variable @brief Returns the format of a variable
@details Uses varfmt function to identify the format of a particular variable. @details Uses varfmt function to identify the format of a particular variable.
@@ -908,7 +908,7 @@ options noquotelenmax;
%let rc = %sysfunc(close(&dsid)); %let rc = %sysfunc(close(&dsid));
/* Return variable format */ /* Return variable format */
&vlen &vlen
%mend;/** %mend mf_getVarLen;/**
@file @file
@brief Returns dataset variable list direct from header @brief Returns dataset variable list direct from header
@details WAY faster than dictionary tables or sas views, and can @details WAY faster than dictionary tables or sas views, and can
@@ -1034,7 +1034,7 @@ returns:
/* Return variable number */ /* Return variable number */
&vnum. &vnum.
%mend;/** %mend mf_getVarNum;/**
@file @file
@brief Returns variable type - Character (C) or Numeric (N) @brief Returns variable type - Character (C) or Numeric (N)
@details @details
@@ -1123,7 +1123,7 @@ Usage:
&engine &engine
%mend; %mend mf_getxengine;
/** /**
@file mf_isblank.sas @file mf_isblank.sas
@brief Checks whether a macro variable is empty (blank) @brief Checks whether a macro variable is empty (blank)
@@ -1150,7 +1150,7 @@ Usage:
%sysevalf(%superq(param)=,boolean) %sysevalf(%superq(param)=,boolean)
%mend;/** %mend mf_isblank;/**
@file @file
@brief Checks whether a path is a valid directory @brief Checks whether a path is a valid directory
@details @details
@@ -1183,7 +1183,7 @@ Usage:
&is_directory &is_directory
%mend;/** %mend mf_isdir;/**
@file @file
@brief Returns physical location of various SAS items @brief Returns physical location of various SAS items
@details Returns location of the PlatformObjectFramework tools @details Returns location of the PlatformObjectFramework tools
@@ -1211,7 +1211,7 @@ Usage:
&root &root
%end; %end;
%mend; %mend mf_loc;
/** /**
@file @file
@brief Creates a directory, including any intermediate directories @brief Creates a directory, including any intermediate directories
@@ -1278,7 +1278,7 @@ Usage:
%end; %end;
%end; %end;
/* exit quietly if directory did exist.*/ /* exit quietly if directory did exist.*/
%mend; %mend mf_mkdir;
/** /**
@file mf_mval.sas @file mf_mval.sas
@brief Returns a macro variable value if the variable exists @brief Returns a macro variable value if the variable exists
@@ -1297,7 +1297,7 @@ Usage:
%if %symexist(&var) %then %do; %if %symexist(&var) %then %do;
%superq(&var) %superq(&var)
%end; %end;
%mend; %mend mf_mval;
/** /**
@file @file
@brief Returns number of logical (undeleted) observations. @brief Returns number of logical (undeleted) observations.
@@ -1323,7 +1323,7 @@ Usage:
%macro mf_nobs(libds %macro mf_nobs(libds
)/*/STORE SOURCE*/; )/*/STORE SOURCE*/;
%mf_getattrn(&libds,NLOBS) %mf_getattrn(&libds,NLOBS)
%mend;/** %mend mf_nobs;/**
@file mf_trimstr.sas @file mf_trimstr.sas
@brief Removes character(s) from the end, if they exist @brief Removes character(s) from the end, if they exist
@details If the designated characters exist at the end of the string, they @details If the designated characters exist at the end of the string, they
@@ -1372,7 +1372,7 @@ Usage:
&basestr &basestr
%end; %end;
%mend;/** %mend mf_trimstr;/**
@file @file
@brief Creates a unique ID based on system time in friendly format @brief Creates a unique ID based on system time in friendly format
@details format = YYYYMMDD_HHMMSSmmm_<sysjobid>_<3randomDigits> @details format = YYYYMMDD_HHMMSSmmm_<sysjobid>_<3randomDigits>
@@ -1456,7 +1456,7 @@ Usage:
%else %mf_abort(mac=mf_verifymacvars,type=&mabort,msg=&abortmsg); %else %mf_abort(mac=mf_verifymacvars,type=&mabort,msg=&abortmsg);
%exit_success: %exit_success:
%mend; %mend mf_verifymacvars;
/** /**
@file @file
@brief Returns words that are in string 1 but not in string 2 @brief Returns words that are in string 1 but not in string 2
@@ -1509,7 +1509,7 @@ Usage:
&outvar &outvar
%mend; %mend mf_wordsInStr1ButNotStr2;
/** /**
@file @file
@@ -1908,7 +1908,7 @@ Usage:
proc sql; proc sql;
drop table &ds; drop table &ds;
%mend;/** %mend mp_assertcols;/**
@file @file
@brief Asserts the values in a column @brief Asserts the values in a column
@details Useful in the context of writing sasjs tests. The results of the @details Useful in the context of writing sasjs tests. The results of the
@@ -2054,7 +2054,7 @@ Usage:
proc sql; proc sql;
drop table &ds; drop table &ds;
%mend;/** %mend mp_assertcolvals;/**
@file @file
@brief Asserts the number of observations in a dataset @brief Asserts the number of observations in a dataset
@details Useful in the context of writing sasjs tests. The results of the @details Useful in the context of writing sasjs tests. The results of the
@@ -2226,7 +2226,7 @@ Usage:
%if &outref=____out %then %do; %if &outref=____out %then %do;
filename &outref clear; filename &outref clear;
%end; %end;
%mend;/** %mend mp_binarycopy;/**
@file mp_cleancsv.sas @file mp_cleancsv.sas
@brief Fixes embedded cr / lf / crlf in CSV @brief Fixes embedded cr / lf / crlf in CSV
@details CSVs will sometimes contain lf or crlf within quotes (eg when @details CSVs will sometimes contain lf or crlf within quotes (eg when
@@ -2295,7 +2295,7 @@ Usage:
else put inchar $char1.; else put inchar $char1.;
end; end;
run; run;
%mend; %mend mp_cleancsv;
/** @endcond *//** /** @endcond *//**
@file mp_createconstraints.sas @file mp_createconstraints.sas
@brief Creates constraints @brief Creates constraints
@@ -2362,7 +2362,7 @@ data &outds;
output; output;
run; run;
%mend;/** %mend mp_createconstraints;/**
@file mp_createwebservice.sas @file mp_createwebservice.sas
@brief Create a web service in SAS 9 or Viya @brief Create a web service in SAS 9 or Viya
@details Creates a SASJS ready Stored Process in SAS 9 or Job Execution @details Creates a SASJS ready Stored Process in SAS 9 or Job Execution
@@ -2444,7 +2444,7 @@ Usage:
) )
%end; %end;
%mend; %mend mp_createwebservice;
/** /**
@file mp_csv2ds.sas @file mp_csv2ds.sas
@brief Efficient import of arbitrary CSV using a dataset as template @brief Efficient import of arbitrary CSV using a dataset as template
@@ -2588,7 +2588,7 @@ data &outds
%end; %end;
run; run;
%mend;/** %mend mp_csv2ds;/**
@file mp_deleteconstraints.sas @file mp_deleteconstraints.sas
@brief Delete constraionts @brief Delete constraionts
@details Takes the output from mp_getconstraints.sas as input @details Takes the output from mp_getconstraints.sas as input
@@ -2639,7 +2639,7 @@ data &outds;
end; end;
run; run;
%mend;/** %mend mp_deleteconstraints;/**
@file @file
@brief Returns all files and subdirectories within a specified parent @brief Returns all files and subdirectories within a specified parent
@details When used with getattrs=NO, is not OS specific (uses dopen / dread). @details When used with getattrs=NO, is not OS specific (uses dopen / dread).
@@ -2808,7 +2808,7 @@ run;
by filepath file_or_folder filename ext ; by filepath file_or_folder filename ext ;
run; run;
%end; %end;
%mend;/** %mend mp_dirlist;/**
@file @file
@brief Creates a dataset containing distinct _formatted_ values @brief Creates a dataset containing distinct _formatted_ values
@details If no format is supplied, then the original value is used instead. @details If no format is supplied, then the original value is used instead.
@@ -2857,7 +2857,7 @@ run;
%end; %end;
as &outvar length=&varlen as &outvar length=&varlen
from &libds; from &libds;
%mend;/** %mend mp_distinctfmtvalues;/**
@file @file
@brief Drops tables / views (if they exist) without warnings in the log @brief Drops tables / views (if they exist) without warnings in the log
@details Useful for dropping tables when you're not sure they exist, or if @details Useful for dropping tables when you're not sure they exist, or if
@@ -3151,7 +3151,7 @@ quit;
%put NOTE-;%put NOTE-; %put NOTE-;%put NOTE-;
%put NOTE- %sysfunc(dequote(&cards_file.)); %put NOTE- %sysfunc(dequote(&cards_file.));
%put NOTE-;%put NOTE-; %put NOTE-;%put NOTE-;
%mend;/** %mend mp_ds2cards;/**
@file @file
@brief Export a dataset to a CSV file @brief Export a dataset to a CSV file
@details Export to a file or a fileref @details Export to a file or a fileref
@@ -3208,7 +3208,7 @@ data _null_;
run; run;
%mend;/** %mend mp_ds2csv;/**
@file @file
@brief Converts every value in a dataset to it's formatted value @brief Converts every value in a dataset to it's formatted value
@details Converts every value to it's formatted value. All variables will @details Converts every value to it's formatted value. All variables will
@@ -3609,7 +3609,7 @@ filename &outref temp;
run; run;
%end; %end;
%mend; %mend mp_filtergenerate;
/** /**
@file @file
@brief Checks a generated filter query for validity @brief Checks a generated filter query for validity
@@ -3775,7 +3775,7 @@ create table &outds as
%end; %end;
; ;
%mend;/** %mend mp_getconstraints;/**
@file @file
@brief Extract DBML from SAS Libraries @brief Extract DBML from SAS Libraries
@details DBML is an open source markup format to represent databases. @details DBML is an open source markup format to represent databases.
@@ -4109,7 +4109,7 @@ run;
run; run;
%end; %end;
%mend;/** %mend mp_getdbml;/**
@file mp_getddl.sas @file mp_getddl.sas
@brief Extract DDL in various formats, by table or library @brief Extract DDL in various formats, by table or library
@details Data Definition Language relates to a set of SQL instructions used @details Data Definition Language relates to a set of SQL instructions used
@@ -4226,7 +4226,7 @@ create table _data_ as
end; end;
run; run;
%put &=constraints_used; %put &=constraints_used;
%mend; %mend addConst;
data _null_; data _null_;
file &fref; file &fref;
@@ -4489,7 +4489,7 @@ run;
run; run;
%end; %end;
%mend;/** %mend mp_getddl;/**
@file mp_getmaxvarlengths.sas @file mp_getmaxvarlengths.sas
@brief Scans a dataset to find the max length of the variable values @brief Scans a dataset to find the max length of the variable values
@details @details
@@ -4561,7 +4561,7 @@ create table &outds (rename=(
out=&outds(rename=(_name_=NAME COL1=MAXLEN)); out=&outds(rename=(_name_=NAME COL1=MAXLEN));
run; run;
%mend;/** %mend mp_getmaxvarlengths;/**
@file mp_guesspk.sas @file mp_guesspk.sas
@brief Guess the primary key of a table @brief Guess the primary key of a table
@details Tries to guess the primary key of a table based on the following logic: @details Tries to guess the primary key of a table based on the following logic:
@@ -4864,7 +4864,7 @@ create table &outds (rename=(
%return; %return;
%end; %end;
%mend;/** %mend mp_guesspk;/**
@file @file
@brief Returns a unique hash for a dataset @brief Returns a unique hash for a dataset
@details Ignores metadata attributes, used only to hash values. Compared @details Ignores metadata attributes, used only to hash values. Compared
@@ -4938,7 +4938,7 @@ create table &outds (rename=(
if &lastvar then output; if &lastvar then output;
run; run;
%end; %end;
%mend;/** %mend mp_hashdataset;/**
@file mp_jsonout.sas @file mp_jsonout.sas
@brief Writes JSON in SASjs format to a fileref @brief Writes JSON in SASjs format to a fileref
@details PROC JSON is faster but will produce errs like the ones below if @details PROC JSON is faster but will produce errs like the ones below if
@@ -5248,7 +5248,7 @@ select distinct lowcase(memname)
) )
%end; %end;
%mend;/** %mend mp_lib2cards;/**
@file @file
@brief Create a Markdown Table from a dataset @brief Create a Markdown Table from a dataset
@details A markdown table is a simple table representation for use in @details A markdown table is a simple table representation for use in
@@ -5386,7 +5386,7 @@ run;
,dttm=%sysfunc(datetime()); ,dttm=%sysfunc(datetime());
quit; quit;
%mend;/** %mend mp_perflog;/**
@file @file
@brief Enables previous observations to be re-instated @brief Enables previous observations to be re-instated
@details Remembers the last X observations by storing them in a hash table. @details Remembers the last X observations by storing them in a hash table.
@@ -5473,7 +5473,7 @@ run;
"with record &record and " _n_=; "with record &record and " _n_=;
%end; %end;
%mend;/** %mend mp_prevobs;/**
@file @file
@brief Returns all children from a hierarchy table for a specified parent @brief Returns all children from a hierarchy table for a specified parent
@details Where data stores hierarchies in a simple parent / child mapping, @details Where data stores hierarchies in a simple parent / child mapping,
@@ -5562,7 +5562,7 @@ insert into &outds select distinct * from &append_ds;
) )
%end; %end;
%mend; %mend mp_recursivejoin;
/** /**
@file @file
@brief Reset an option to original value @brief Reset an option to original value
@@ -5595,7 +5595,7 @@ data _null_;
end; end;
run; run;
%mend;/** %mend mp_resetoption;/**
@file mp_runddl.sas @file mp_runddl.sas
@brief An opinionated way to execute DDL files in SAS. @brief An opinionated way to execute DDL files in SAS.
@details When delivering projects there should be seperation between the DDL @details When delivering projects there should be seperation between the DDL
@@ -5643,7 +5643,7 @@ run;
%mend;/** %mend mp_runddl;/**
@file mp_searchcols.sas @file mp_searchcols.sas
@brief Searches all columns in a library @brief Searches all columns in a library
@details @details
@@ -5864,7 +5864,7 @@ proc sql
%put process finished at %sysfunc(datetime(),datetime19.); %put process finished at %sysfunc(datetime(),datetime19.);
%mend; %mend mp_searchdata;
/** /**
@file @file
@brief Logs a key value pair a control dataset @brief Logs a key value pair a control dataset
@@ -5916,7 +5916,7 @@ proc sql
quit; quit;
%mend;/** %mend mp_setkeyvalue;/**
@file @file
@brief Capture session start / finish times and request details @brief Capture session start / finish times and request details
@details For details, see @details For details, see
@@ -5989,7 +5989,7 @@ proc sql
proc append base=&libds data=&syslast nowarn;run; proc append base=&libds data=&syslast nowarn;run;
options &etls_syntaxcheck; options &etls_syntaxcheck;
%mend;/** %mend mp_stprequests;/**
@file @file
@brief Streams a file to _webout according to content type @brief Streams a file to _webout according to content type
@details Will set headers using appropriate functions (SAS 9 vs Viya) and send @details Will set headers using appropriate functions (SAS 9 vs Viya) and send
@@ -6125,7 +6125,7 @@ run;
%mp_binarycopy(inloc="&inloc",outref=_webout) %mp_binarycopy(inloc="&inloc",outref=_webout)
%end; %end;
%mend; %mend mp_streamfile;
/** /**
@file @file
@brief Runs arbitrary code for a specified amount of time @brief Runs arbitrary code for a specified amount of time
@@ -6217,7 +6217,7 @@ quit;
libname &lib clear; libname &lib clear;
%mend;/** %mend mp_testjob;/**
@file mp_testservice.sas @file mp_testservice.sas
@brief Will execute a test against a SASjs web service on SAS 9 or Viya @brief Will execute a test against a SASjs web service on SAS 9 or Viya
@details Prepares the input files and retrieves the resulting datasets from @details Prepares the input files and retrieves the resulting datasets from
@@ -6533,7 +6533,7 @@ data &outds;
duration_seconds=end_dttm-start_dttm; duration_seconds=end_dttm-start_dttm;
run; run;
%mend;/** %mend mp_testwritespeedlibrary;/**
@file @file
@brief Recursively scans a directory tree to get all subfolders and content @brief Recursively scans a directory tree to get all subfolders and content
@details @details
@@ -6603,7 +6603,7 @@ data &outds ;
rc=filename('tmp'); rc=filename('tmp');
run; run;
%mend;/** %mend mp_tree;/**
@file mp_unzip.sas @file mp_unzip.sas
@brief Unzips a zip file @brief Unzips a zip file
@details Opens the zip file and copies all the contents to another directory. @details Opens the zip file and copies all the contents to another directory.
@@ -6668,7 +6668,7 @@ data _null_;
!!'filename &fname2 clear; filename &fname3 clear;'); !!'filename &fname2 clear; filename &fname3 clear;');
run; run;
%mend;/** %mend mp_unzip;/**
@file mp_updatevarlength.sas @file mp_updatevarlength.sas
@brief Change the length of a variable @brief Change the length of a variable
@details The library is assumed to be assigned. Simple character updates @details The library is assumed to be assigned. Simple character updates
@@ -6760,7 +6760,7 @@ alter table &libds modify &var char(&len);
%mp_createconstraints(inds=&dsconst,outds=&dsconst._addd,execute=YES) %mp_createconstraints(inds=&dsconst,outds=&dsconst._addd,execute=YES)
%mend; %mend mp_updatevarlength;
/** /**
@file @file
@brief Used to validate variables in a dataset @brief Used to validate variables in a dataset
@@ -6905,7 +6905,7 @@ ods package publish archive properties
(archive_name="&outname..zip" archive_path="&outpath"); (archive_name="&outname..zip" archive_path="&outpath");
ods package close; ods package close;
%mend;/** %mend mp_zip;/**
@file mm_adduser2group.sas @file mm_adduser2group.sas
@brief Adds a user to a group @brief Adds a user to a group
@details Adds a user to a metadata group. The macro first checks whether the @details Adds a user to a metadata group. The macro first checks whether the
@@ -7002,7 +7002,7 @@ run;
filename __us2grp clear; filename __us2grp clear;
%mend;/** %mend mm_adduser2group;/**
@file @file
@brief Assigns library directly using details from metadata @brief Assigns library directly using details from metadata
@details Queries metadata to get the libname definition then allocates the @details Queries metadata to get the libname definition then allocates the
@@ -7464,7 +7464,7 @@ run;
%return; %return;
%end; %end;
%mend; %mend mm_assigndirectlib;
/** /**
@file @file
@brief Assigns a meta engine library using LIBREF @brief Assigns a meta engine library using LIBREF
@@ -7542,7 +7542,7 @@ run;
%else %do; %else %do;
%put NOTE: Library &libref is already assigned; %put NOTE: Library &libref is already assigned;
%end; %end;
%mend; %mend mm_assignlib;
/** /**
@file @file
@brief Create an Application object in a metadata folder @brief Create an Application object in a metadata folder
@@ -7697,7 +7697,7 @@ run;
%else %put NOTE: Application (&name) successfully created in (&tree)!; %else %put NOTE: Application (&name) successfully created in (&tree)!;
%mend;/** %mend mm_createapplication;/**
@file mm_createdataset.sas @file mm_createdataset.sas
@brief Create a dataset from a metadata definition @brief Create a dataset from a metadata definition
@details This macro was built to support viewing empty tables in @details This macro was built to support viewing empty tables in
@@ -7779,7 +7779,7 @@ data _null_;
if last then call execute('call missing(of _all_);stop;run;'); if last then call execute('call missing(of _all_);stop;run;');
run; run;
%mend;/** %mend mm_createdataset;/**
@file @file
@brief Create a Document object in a metadata folder @brief Create a Document object in a metadata folder
@details Document objects are useful for storing properties in metadata. @details Document objects are useful for storing properties in metadata.
@@ -7903,7 +7903,7 @@ run;
run; run;
%end; %end;
%mend;/** %mend mm_createdocument;/**
@file @file
@brief Recursively create a metadata folder @brief Recursively create a metadata folder
@details This macro was inspired by Paul Homes who wrote an early @details This macro was inspired by Paul Homes who wrote an early
@@ -8062,7 +8062,7 @@ run;
%end; %end;
%put &sysmacroname: execution finished for &path; %put &sysmacroname: execution finished for &path;
%mend;/** %mend mm_createfolder;/**
@file @file
@brief Create a SAS Library @brief Create a SAS Library
@details Currently only supports BASE engine @details Currently only supports BASE engine
@@ -8382,7 +8382,7 @@ filename &frefout temp;
filename &frefout clear; filename &frefout clear;
%end; %end;
%mend; %mend mm_createlibrary;
/** /**
@file @file
@brief Create a type 1 Stored Process (9.2 compatible) @brief Create a type 1 Stored Process (9.2 compatible)
@@ -8770,7 +8770,7 @@ run;
%put %str(WARN)ING: STPTYPE=*&stptype* not recognised!; %put %str(WARN)ING: STPTYPE=*&stptype* not recognised!;
%end; %end;
%mend;/** %mend mm_createstp;/**
@file mm_createwebservice.sas @file mm_createwebservice.sas
@brief Create a Web Ready Stored Process @brief Create a Web Ready Stored Process
@details This macro creates a Type 2 Stored Process with the mm_webout macro @details This macro creates a Type 2 Stored Process with the mm_webout macro
@@ -9187,7 +9187,7 @@ data _null_;
put ' '; put ' ';
put ' %quote(&user) '; put ' %quote(&user) ';
put ' '; put ' ';
put '%mend; '; put '%mend mf_getuser; ';
/* WEBOUT END */ /* WEBOUT END */
put '%macro webout(action,ds,dslabel=,fmt=);'; put '%macro webout(action,ds,dslabel=,fmt=);';
put ' %mm_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt)'; put ' %mm_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt)';
@@ -9319,7 +9319,7 @@ run;
%return; %return;
%end; %end;
%mend; %mend mm_deletedocument;
/** /**
@file @file
@brief Deletes a library by Name @brief Deletes a library by Name
@@ -9411,7 +9411,7 @@ run;
%put &sysmacroname: Library &name (&liburi) was successfully deleted; %put &sysmacroname: Library &name (&liburi) was successfully deleted;
%mend; %mend mm_deletelibrary;
/** /**
@file mm_deletestp.sas @file mm_deletestp.sas
@brief Deletes a Stored Process using path as reference @brief Deletes a Stored Process using path as reference
@@ -9481,7 +9481,7 @@ run;
%return; %return;
%end; %end;
%mend; %mend mm_deletestp;
/** /**
@file mm_getauthinfo.sas @file mm_getauthinfo.sas
@brief extracts authentication info @brief extracts authentication info
@@ -9597,7 +9597,7 @@ run;
filename &fileref clear; filename &fileref clear;
%mend;/** %mend mm_getauthinfo;/**
@file @file
@brief Creates a dataset with all metadata columns for a particular table @brief Creates a dataset with all metadata columns for a particular table
@details @details
@@ -9649,7 +9649,7 @@ proc sort;
by colname; by colname;
run; run;
%mend;/** %mend mm_getcols;/**
@file mm_getdetails.sas @file mm_getdetails.sas
@brief extracts metadata attributes and associations for a particular uri @brief extracts metadata attributes and associations for a particular uri
@@ -9713,7 +9713,7 @@ proc sort;
by type name; by type name;
run; run;
%mend;/** %mend mm_getdetails;/**
@file @file
@brief Returns a dataset with the meta directory object for a physical path @brief Returns a dataset with the meta directory object for a physical path
@details Provide a file path to get matching directory objects, or leave @details Provide a file path to get matching directory objects, or leave
@@ -9769,7 +9769,7 @@ data &outds (keep=directoryuri name directoryname directorydesc );
end; end;
run; run;
%mend; %mend mm_getDirectories;
/** /**
@file @file
@brief Writes the TextStore of a Document Object to an external file @brief Writes the TextStore of a Document Object to an external file
@@ -9915,7 +9915,7 @@ run;
filename __getdoc clear; filename __getdoc clear;
filename __outdoc clear; filename __outdoc clear;
%mend; %mend mm_getdocument;
/** /**
@file @file
@brief Returns all direct child members of a particular folder @brief Returns all direct child members of a particular folder
@@ -10011,7 +10011,7 @@ filename __outdoc clear;
run; run;
%end; %end;
%mend; %mend mm_getfoldermembers;
/** /**
@file @file
@brief Returns all folders / subfolder content for a particular root @brief Returns all folders / subfolder content for a particular root
@@ -10102,7 +10102,7 @@ data _null_;
!!",level=%eval(&level+1),append=YES)"); !!",level=%eval(&level+1),append=YES)");
run; run;
%mend; %mend mm_getfoldertree;
/** /**
@file @file
@brief Creates dataset with all members of a metadata group @brief Creates dataset with all members of a metadata group
@@ -10174,7 +10174,7 @@ run;
end; end;
run; run;
%mend; %mend mm_getgroupmembers;
/** /**
@file @file
@brief Creates dataset with all groups or just those for a particular user @brief Creates dataset with all groups or just those for a particular user
@@ -10269,7 +10269,7 @@ run;
options metarepository=&oldrepo; options metarepository=&oldrepo;
%end; %end;
%mend;/** %mend mm_getGroups;/**
@file @file
@brief Compares the metadata of a library with the physical tables @brief Compares the metadata of a library with the physical tables
@details Creates a series of output tables that show the differences between @details Creates a series of output tables that show the differences between
@@ -10493,7 +10493,7 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend;/** %mend mm_getlibs;/**
@file @file
@brief Creates a dataset with all metadata objects for a particular type @brief Creates a dataset with all metadata objects for a particular type
@@ -10562,7 +10562,7 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend;/** %mend mm_getobjects;/**
@file mm_getpublictypes.sas @file mm_getpublictypes.sas
@brief Creates a dataset with all deployable public types @brief Creates a dataset with all deployable public types
@details More info: @details More info:
@@ -10647,7 +10647,7 @@ insert into &outds values ('User');
insert into &outds values ('UserGroup'); insert into &outds values ('UserGroup');
quit; quit;
%mend;/** %mend mm_getpublictypes;/**
@file @file
@brief Creates a dataset with all available repositories @brief Creates a dataset with all available repositories
@@ -10778,7 +10778,7 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend;/** %mend mm_getrepos;/**
@file mm_getroles.sas @file mm_getroles.sas
@brief Creates a table containing a list of roles @brief Creates a table containing a list of roles
@details @details
@@ -10850,7 +10850,7 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_getroles;
/** /**
@file mm_getservercontexts.sas @file mm_getservercontexts.sas
@brief Creates a dataset with all server contexts in all repos @brief Creates a dataset with all server contexts in all repos
@@ -10934,7 +10934,7 @@ options metarepository=&repo;
filename __mc1 clear; filename __mc1 clear;
filename __mc2 clear; filename __mc2 clear;
%mend;/** %mend mm_getservercontexts;/**
@file @file
@brief Writes the code of an STP to an external file @brief Writes the code of an STP to an external file
@details Fetches the SAS code from a Stored Process where the code is stored @details Fetches the SAS code from a Stored Process where the code is stored
@@ -11213,7 +11213,7 @@ data &outds ;
keep stpuri stpname treeuri; keep stpuri stpname treeuri;
run; run;
%mend; %mend mm_getstps;
/** /**
@file mm_gettableid.sas @file mm_gettableid.sas
@brief Get the metadata id for a particular table @brief Get the metadata id for a particular table
@@ -11280,7 +11280,7 @@ data &outds;
end; end;
run; run;
%mend;/** %mend mm_gettableid;/**
@file @file
@brief Creates a dataset with all metadata tables for a particular library @brief Creates a dataset with all metadata tables for a particular library
@details Will only show the tables to which a user has the requisite @details Will only show the tables to which a user has the requisite
@@ -11397,7 +11397,7 @@ proc sort;
by tablename tableuri; by tablename tableuri;
run; run;
%mend;/** %mend mm_gettables;/**
@file @file
@brief Returns the metadata path and object from either the path or object @brief Returns the metadata path and object from either the path or object
@details Provide a metadata BIP tree path, or the uri for the bottom level @details Provide a metadata BIP tree path, or the uri for the bottom level
@@ -11464,7 +11464,7 @@ data &outds;
if treeuri ne "" and treepath ne "" then output; if treeuri ne "" and treepath ne "" then output;
stop; stop;
run; run;
%mend;/** %mend mm_getTree;/**
@file @file
@brief Creates a dataset with all metadata types @brief Creates a dataset with all metadata types
@details Usage: @details Usage:
@@ -11538,7 +11538,7 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend;/** %mend mm_gettypes;/**
@file mm_getusers.sas @file mm_getusers.sas
@brief Creates a table containing a list of all users @brief Creates a table containing a list of all users
@details Only shows a limited number of attributes as some sites will have a @details Only shows a limited number of attributes as some sites will have a
@@ -11743,7 +11743,7 @@ filename __in clear;
filename __out clear; filename __out clear;
filename __shake clear; filename __shake clear;
%mend;/** %mend mm_getwebappsrvprops;/**
@file mm_spkexport.sas @file mm_spkexport.sas
@brief Creates an batch spk export command @brief Creates an batch spk export command
@details Creates a script that will export everything in a metadata folder to @details Creates a script that will export everything in a metadata folder to
@@ -12038,7 +12038,7 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_tree;
/** /**
@file @file
@brief Add or update an extension to an application component @brief Add or update an extension to an application component
@@ -12172,7 +12172,7 @@ run;
run; run;
%end; %end;
%mend;/** %mend mm_updateappextension;/**
@file @file
@brief Update the TextStore in a Document with the same name @brief Update the TextStore in a Document with the same name
@details Enables arbitrary content to be stored in a document object @details Enables arbitrary content to be stored in a document object
@@ -12287,7 +12287,7 @@ run;
run; run;
%end; %end;
%mend;/** %mend mm_updatedocument;/**
@file @file
@brief Updates a type 2 stored process to run on STP or WKS context @brief Updates a type 2 stored process to run on STP or WKS context
@details Only works on Type 2 (9.3 compatible) STPs @details Only works on Type 2 (9.3 compatible) STPs
@@ -12353,7 +12353,7 @@ run;
%if &result=SUCCESS %then %put NOTE: SUCCESS: STP &target changed to &type type; %if &result=SUCCESS %then %put NOTE: SUCCESS: STP &target changed to &type type;
%else %put %str(ERR)OR: Issue with &sysmacroname; %else %put %str(ERR)OR: Issue with &sysmacroname;
%mend; %mend mm_updatestpservertype;
/** /**
@file @file
@brief Update the source code of a type 2 STP @brief Update the source code of a type 2 STP
@@ -12493,7 +12493,7 @@ run;
filename &frefout clear; filename &frefout clear;
%end; %end;
%mend;/** %mend mm_updatestpsourcecode;/**
@file mm_webout.sas @file mm_webout.sas
@brief Send data to/from SAS Stored Processes @brief Send data to/from SAS Stored Processes
@details This macro should be added to the start of each Stored Process, @details This macro should be added to the start of each Stored Process,
@@ -12702,7 +12702,9 @@ data _null_;
putlog _infile_; putlog _infile_;
run; run;
%mend;/**
%mend mmx_deletemetafolder;
/**
@file mmx_spkexport.sas @file mmx_spkexport.sas
@brief Exports everything in a particular metadata folder @brief Exports everything in a particular metadata folder
@details Will export everything in a metadata folder to a specified location. @details Will export everything in a metadata folder to a specified location.
@@ -12794,7 +12796,7 @@ run;
%inc &fref1; %inc &fref1;
%mend;/** %mend mmx_spkexport;/**
@file @file
@brief Checks whether a file exists in SAS Drive @brief Checks whether a file exists in SAS Drive
@details Returns 1 if the file exists, and 0 if it doesn't. Works by @details Returns 1 if the file exists, and 0 if it doesn't. Works by
@@ -13517,7 +13519,7 @@ run;
%put &sysmacroname:; %put &sysmacroname:;
%put &sysmacroname:; %put &sysmacroname:;
%mend; %mend mv_createjob;
/** /**
@file @file
@brief Creates a JobExecution web service if it doesn't already exist @brief Creates a JobExecution web service if it doesn't already exist
@@ -14141,7 +14143,7 @@ data _null_;
put ' '; put ' ';
put ' %quote(&user) '; put ' %quote(&user) ';
put ' '; put ' ';
put '%mend; '; put '%mend mf_getuser; ';
/* WEBOUT END */ /* WEBOUT END */
put '/* if calling viya service with _job param, _program will conflict */'; put '/* if calling viya service with _job param, _program will conflict */';
put '/* so it is provided by SASjs instead as __program */'; put '/* so it is provided by SASjs instead as __program */';
@@ -14444,7 +14446,7 @@ libname &libref1 clear;
filename &fname1a clear; filename &fname1a clear;
libname &libref1a clear; libname &libref1a clear;
%mend;/** %mend mv_deletefoldermember;/**
@file @file
@brief Deletes a Viya Job, if it exists @brief Deletes a Viya Job, if it exists
@details If not executed in Studio 5+ will expect oauth token in a global @details If not executed in Studio 5+ will expect oauth token in a global
@@ -14591,7 +14593,7 @@ libname &libref1 clear;
filename &fname1a clear; filename &fname1a clear;
libname &libref1a clear; libname &libref1a clear;
%mend;/** %mend mv_deletejes;/**
@file mv_deleteviyafolder.sas @file mv_deleteviyafolder.sas
@brief Creates a viya folder if that folder does not already exist @brief Creates a viya folder if that folder does not already exist
@details If not running in Studo 5 +, will expect an oauth token in a global @details If not running in Studo 5 +, will expect an oauth token in a global
@@ -14731,7 +14733,7 @@ filename &fname1 clear;
filename &fname2 clear; filename &fname2 clear;
libname &libref1 clear; libname &libref1 clear;
%mend;/** %mend mv_deleteviyafolder;/**
@file mv_getaccesstoken.sas @file mv_getaccesstoken.sas
@brief deprecated - replaced by mv_tokenrefresh.sas @brief deprecated - replaced by mv_tokenrefresh.sas
@@ -14762,7 +14764,7 @@ libname &libref1 clear;
,refresh_token_var=&refresh_token_var ,refresh_token_var=&refresh_token_var
) )
%mend;/** %mend mv_getaccesstoken;/**
@file @file
@brief deprecated - replaced by mv_registerclient.sas @brief deprecated - replaced by mv_registerclient.sas
@@ -14784,7 +14786,7 @@ libname &libref1 clear;
,grant_type=&grant_type ,grant_type=&grant_type
) )
%mend;/** %mend mv_getapptoken;/**
@file mv_getclients.sas @file mv_getclients.sas
@brief Get a list of Viya Clients @brief Get a list of Viya Clients
@details First, be sure you have an access token (which requires an app token). @details First, be sure you have an access token (which requires an app token).
@@ -14884,7 +14886,7 @@ run;
filename &fname1 clear; filename &fname1 clear;
libname &libref1 clear; libname &libref1 clear;
*/ */
%mend;/** %mend mv_getclients;/**
@file mv_getfoldermembers.sas @file mv_getfoldermembers.sas
@brief Gets a list of folders (and ids) for a given root @brief Gets a list of folders (and ids) for a given root
@details Works for both root level and below, oauth or password. Default is @details Works for both root level and below, oauth or password. Default is
@@ -15111,7 +15113,7 @@ run;
/* clear refs */ /* clear refs */
filename &fname1 clear; filename &fname1 clear;
%mend;/** %mend mv_getgroupmembers;/**
@file mv_getgroups.sas @file mv_getgroups.sas
@brief Creates a dataset with a list of viya groups @brief Creates a dataset with a list of viya groups
@details First, load the macros: @details First, load the macros:
@@ -15196,7 +15198,7 @@ run;
filename &fname1 clear; filename &fname1 clear;
libname &libref1 clear; libname &libref1 clear;
%mend;/** %mend mv_getgroups;/**
@file @file
@brief Extract the source code from a SAS Viya Job @brief Extract the source code from a SAS Viya Job
@details Extracts the SAS code from a Job into a fileref or physical file. @details Extracts the SAS code from a Job into a fileref or physical file.
@@ -16091,7 +16093,7 @@ run;
filename &fname0 clear; filename &fname0 clear;
%mend; %mend mv_getjobstate;
/** /**
@file mv_getrefreshtoken.sas @file mv_getrefreshtoken.sas
@brief deprecated - replaced by mv_tokenauth.sas @brief deprecated - replaced by mv_tokenauth.sas
@@ -16124,7 +16126,7 @@ filename &fname0 clear;
,refresh_token_var=&refresh_token_var ,refresh_token_var=&refresh_token_var
) )
%mend;/** %mend mv_getrefreshtoken;/**
@file mv_getusergroups.sas @file mv_getusergroups.sas
@brief Creates a dataset with a list of groups for a particular user @brief Creates a dataset with a list of groups for a particular user
@details If using outside of Viya SPRE, then an access token is needed. @details If using outside of Viya SPRE, then an access token is needed.
@@ -16215,7 +16217,7 @@ run;
filename &fname1 clear; filename &fname1 clear;
libname &libref1 clear; libname &libref1 clear;
%mend;/** %mend mv_getusergroups;/**
@file mv_getusers.sas @file mv_getusers.sas
@brief Creates a dataset with a list of users @brief Creates a dataset with a list of users
@details First, be sure you have an access token (which requires an app token). @details First, be sure you have an access token (which requires an app token).
@@ -16330,7 +16332,7 @@ run;
filename &fname1 clear; filename &fname1 clear;
libname &libref1 clear; libname &libref1 clear;
%mend;/** %mend mv_getusers;/**
@file @file
@brief Executes a SAS Viya Job @brief Executes a SAS Viya Job
@details Triggers a SAS Viya Job, with optional URL parameters, using @details Triggers a SAS Viya Job, with optional URL parameters, using
@@ -17578,7 +17580,7 @@ libname &libref clear;
filename &fref1 clear; filename &fref1 clear;
filename &fref2 clear; filename &fref2 clear;
%mend;/** %mend mv_tokenauth;/**
@file mv_tokenrefresh.sas @file mv_tokenrefresh.sas
@brief Get an additional access token using a refresh token @brief Get an additional access token using a refresh token
@details Before an access token can be obtained, a refresh token is required @details Before an access token can be obtained, a refresh token is required
@@ -17710,7 +17712,7 @@ run;
libname &libref clear; libname &libref clear;
filename &fref1 clear; filename &fref1 clear;
%mend;/** %mend mv_tokenrefresh;/**
@file @file
@brief Send data to/from the SAS Viya Job Execution Service @brief Send data to/from the SAS Viya Job Execution Service
@details This macro should be added to the start of each Job Execution @details This macro should be added to the start of each Job Execution
@@ -18334,4 +18336,4 @@ run;
%inc "%sysfunc(pathname(work))/ml_json.lua"; %inc "%sysfunc(pathname(work))/ml_json.lua";
%mend; %mend ml_json;

View File

@@ -42,6 +42,6 @@
-1 -1
%put &sysmacroname: &feature not found; %put &sysmacroname: &feature not found;
%end; %end;
%mend; %mend mf_existfeature;
/** @endcond */ /** @endcond */

View File

@@ -24,4 +24,4 @@
0 0
%end; %end;
%mend; %mend mf_existfileref;

View File

@@ -30,6 +30,6 @@
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
%mend; %mend mf_existvar;
/** @endcond */ /** @endcond */

View File

@@ -54,6 +54,6 @@
0 0
%put Vars not found: &found; %put Vars not found: &found;
%end; %end;
%mend; %mend mf_existvarlist;
/** @endcond */ /** @endcond */

View File

@@ -31,4 +31,4 @@
%sysfunc(attrc(&dsid,&attr)) %sysfunc(attrc(&dsid,&attr))
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
%mend; %mend mf_getattrc;

View File

@@ -31,4 +31,4 @@
%sysfunc(attrn(&dsid,&attr)) %sysfunc(attrn(&dsid,&attr))
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
%mend; %mend mf_getattrn;

View File

@@ -48,6 +48,6 @@
&engine &engine
%mend; %mend mf_getengine;
/** @endcond */ /** @endcond */

View File

@@ -44,4 +44,4 @@
%sysfunc(INPUTN(&bytes, best.),sizekmg.) %sysfunc(INPUTN(&bytes, best.),sizekmg.)
%end; %end;
%mend ; %mend mf_getfilesize ;

View File

@@ -29,4 +29,4 @@
&valc &valc
%end; %end;
%else %put %str(ERR)OR: Unable to find key &key in ds &libds; %else %put %str(ERR)OR: Unable to find key &key in ds &libds;
%mend; %mend mf_getkeyvalue;

View File

@@ -62,4 +62,4 @@
%else %if &switch=VIYARESTAPI %then %do; %else %if &switch=VIYARESTAPI %then %do;
%mf_trimstr(%sysfunc(getoption(servicesbaseurl)),/) %mf_trimstr(%sysfunc(getoption(servicesbaseurl)),/)
%end; %end;
%mend; %mend mf_getplatform;

View File

@@ -50,4 +50,4 @@
&buffer &buffer
%mend; %mend mf_getquotedstr;

View File

@@ -38,6 +38,6 @@
&schema &schema
%mend; %mend mf_getschema;
/** @endcond */ /** @endcond */

View File

@@ -34,4 +34,4 @@
%end; %end;
%end; %end;
%put unable to find available fileref in range &prefix.0-&maxtries; %put unable to find available fileref in range &prefix.0-&maxtries;
%mend; %mend mf_getuniquefileref;

View File

@@ -37,4 +37,4 @@
%end; %end;
%end; %end;
%put unable to find available libref in range &prefix.0-&maxtries; %put unable to find available libref in range &prefix.0-&maxtries;
%mend; %mend mf_getuniquelibref;

View File

@@ -39,4 +39,4 @@
%quote(&user) %quote(&user)
%mend; %mend mf_getuser;

View File

@@ -30,4 +30,4 @@
%trim(&&&variable) %trim(&&&variable)
%end; %end;
%mend; %mend mf_getvalue;

View File

@@ -29,4 +29,4 @@
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
&nvars &nvars
%mend; %mend mf_getvarcount;

View File

@@ -49,4 +49,4 @@
%let rc = %sysfunc(close(&dsid)); %let rc = %sysfunc(close(&dsid));
/* Return variable format */ /* Return variable format */
&vlen &vlen
%mend; %mend mf_getVarLen;

View File

@@ -51,4 +51,4 @@ returns:
/* Return variable number */ /* Return variable number */
&vnum. &vnum.
%mend; %mend mf_getVarNum;

View File

@@ -40,4 +40,4 @@
&engine &engine
%mend; %mend mf_getxengine;

View File

@@ -24,4 +24,4 @@
%sysevalf(%superq(param)=,boolean) %sysevalf(%superq(param)=,boolean)
%mend; %mend mf_isblank;

View File

@@ -31,4 +31,4 @@
&is_directory &is_directory
%mend; %mend mf_isdir;

View File

@@ -26,4 +26,4 @@
&root &root
%end; %end;
%mend; %mend mf_loc;

View File

@@ -64,4 +64,4 @@ Usage:
%end; %end;
%end; %end;
/* exit quietly if directory did exist.*/ /* exit quietly if directory did exist.*/
%mend; %mend mf_mkdir;

View File

@@ -16,4 +16,4 @@
%if %symexist(&var) %then %do; %if %symexist(&var) %then %do;
%superq(&var) %superq(&var)
%end; %end;
%mend; %mend mf_mval;

View File

@@ -23,4 +23,4 @@
%macro mf_nobs(libds %macro mf_nobs(libds
)/*/STORE SOURCE*/; )/*/STORE SOURCE*/;
%mf_getattrn(&libds,NLOBS) %mf_getattrn(&libds,NLOBS)
%mend; %mend mf_nobs;

View File

@@ -47,4 +47,4 @@
&basestr &basestr
%end; %end;
%mend; %mend mf_trimstr;

View File

@@ -62,4 +62,4 @@
%else %mf_abort(mac=mf_verifymacvars,type=&mabort,msg=&abortmsg); %else %mf_abort(mac=mf_verifymacvars,type=&mabort,msg=&abortmsg);
%exit_success: %exit_success:
%mend; %mend mf_verifymacvars;

View File

@@ -50,5 +50,5 @@
&outvar &outvar
%mend; %mend mf_wordsInStr1ButNotStr2;

View File

@@ -142,4 +142,4 @@
proc sql; proc sql;
drop table &ds; drop table &ds;
%mend; %mend mp_assertcols;

View File

@@ -144,4 +144,4 @@
proc sql; proc sql;
drop table &ds; drop table &ds;
%mend; %mend mp_assertcolvals;

View File

@@ -53,4 +53,4 @@
%if &outref=____out %then %do; %if &outref=____out %then %do;
filename &outref clear; filename &outref clear;
%end; %end;
%mend; %mend mp_binarycopy;

View File

@@ -67,5 +67,5 @@
else put inchar $char1.; else put inchar $char1.;
end; end;
run; run;
%mend; %mend mp_cleancsv;
/** @endcond */ /** @endcond */

View File

@@ -64,4 +64,4 @@ data &outds;
output; output;
run; run;
%mend; %mend mp_createconstraints;

View File

@@ -80,4 +80,4 @@ Usage:
) )
%end; %end;
%mend; %mend mp_createwebservice;

View File

@@ -141,4 +141,4 @@ data &outds
%end; %end;
run; run;
%mend; %mend mp_csv2ds;

View File

@@ -49,4 +49,4 @@ data &outds;
end; end;
run; run;
%mend; %mend mp_deleteconstraints;

View File

@@ -167,4 +167,4 @@ run;
by filepath file_or_folder filename ext ; by filepath file_or_folder filename ext ;
run; run;
%end; %end;
%mend; %mend mp_dirlist;

View File

@@ -47,4 +47,4 @@
%end; %end;
as &outvar length=&varlen as &outvar length=&varlen
from &libds; from &libds;
%mend; %mend mp_distinctfmtvalues;

View File

@@ -251,4 +251,4 @@ quit;
%put NOTE-;%put NOTE-; %put NOTE-;%put NOTE-;
%put NOTE- %sysfunc(dequote(&cards_file.)); %put NOTE- %sysfunc(dequote(&cards_file.));
%put NOTE-;%put NOTE-; %put NOTE-;%put NOTE-;
%mend; %mend mp_ds2cards;

View File

@@ -55,4 +55,4 @@ data _null_;
run; run;
%mend; %mend mp_ds2csv;

View File

@@ -99,4 +99,4 @@ filename &outref temp;
run; run;
%end; %end;
%mend; %mend mp_filtergenerate;

View File

@@ -57,4 +57,4 @@ create table &outds as
%end; %end;
; ;
%mend; %mend mp_getconstraints;

View File

@@ -332,4 +332,4 @@ run;
run; run;
%end; %end;
%mend; %mend mp_getdbml;

View File

@@ -115,7 +115,7 @@ create table _data_ as
end; end;
run; run;
%put &=constraints_used; %put &=constraints_used;
%mend; %mend addConst;
data _null_; data _null_;
file &fref; file &fref;
@@ -378,4 +378,4 @@ run;
run; run;
%end; %end;
%mend; %mend mp_getddl;

View File

@@ -70,4 +70,4 @@ create table &outds (rename=(
out=&outds(rename=(_name_=NAME COL1=MAXLEN)); out=&outds(rename=(_name_=NAME COL1=MAXLEN));
run; run;
%mend; %mend mp_getmaxvarlengths;

View File

@@ -301,4 +301,4 @@
%return; %return;
%end; %end;
%mend; %mend mp_guesspk;

View File

@@ -72,4 +72,4 @@
if &lastvar then output; if &lastvar then output;
run; run;
%end; %end;
%mend; %mend mp_hashdataset;

View File

@@ -75,4 +75,4 @@ select distinct lowcase(memname)
) )
%end; %end;
%mend; %mend mp_lib2cards;

View File

@@ -39,4 +39,4 @@
,dttm=%sysfunc(datetime()); ,dttm=%sysfunc(datetime());
quit; quit;
%mend; %mend mp_perflog;

View File

@@ -85,4 +85,4 @@
"with record &record and " _n_=; "with record &record and " _n_=;
%end; %end;
%mend; %mend mp_prevobs;

View File

@@ -87,4 +87,4 @@ insert into &outds select distinct * from &append_ds;
) )
%end; %end;
%mend; %mend mp_recursivejoin;

View File

@@ -30,4 +30,4 @@ data _null_;
end; end;
run; run;
%mend; %mend mp_resetoption;

View File

@@ -46,4 +46,4 @@
%mend; %mend mp_runddl;

View File

@@ -117,4 +117,4 @@ proc sql
%put process finished at %sysfunc(datetime(),datetime19.); %put process finished at %sysfunc(datetime(),datetime19.);
%mend; %mend mp_searchdata;

View File

@@ -49,4 +49,4 @@
quit; quit;
%mend; %mend mp_setkeyvalue;

View File

@@ -71,4 +71,4 @@
proc append base=&libds data=&syslast nowarn;run; proc append base=&libds data=&syslast nowarn;run;
options &etls_syntaxcheck; options &etls_syntaxcheck;
%mend; %mend mp_stprequests;

View File

@@ -134,4 +134,4 @@ run;
%mp_binarycopy(inloc="&inloc",outref=_webout) %mp_binarycopy(inloc="&inloc",outref=_webout)
%end; %end;
%mend; %mend mp_streamfile;

View File

@@ -89,4 +89,4 @@ quit;
libname &lib clear; libname &lib clear;
%mend; %mend mp_testjob;

View File

@@ -56,4 +56,4 @@ data &outds;
duration_seconds=end_dttm-start_dttm; duration_seconds=end_dttm-start_dttm;
run; run;
%mend; %mend mp_testwritespeedlibrary;

View File

@@ -68,4 +68,4 @@ data &outds ;
rc=filename('tmp'); rc=filename('tmp');
run; run;
%mend; %mend mp_tree;

View File

@@ -63,4 +63,4 @@ data _null_;
!!'filename &fname2 clear; filename &fname3 clear;'); !!'filename &fname2 clear; filename &fname3 clear;');
run; run;
%mend; %mend mp_unzip;

View File

@@ -90,4 +90,4 @@ alter table &libds modify &var char(&len);
%mp_createconstraints(inds=&dsconst,outds=&dsconst._addd,execute=YES) %mp_createconstraints(inds=&dsconst,outds=&dsconst._addd,execute=YES)
%mend; %mend mp_updatevarlength;

View File

@@ -76,4 +76,4 @@ ods package publish archive properties
(archive_name="&outname..zip" archive_path="&outpath"); (archive_name="&outname..zip" archive_path="&outpath");
ods package close; ods package close;
%mend; %mend mp_zip;

View File

@@ -23,7 +23,7 @@ for file in files:
ml.write(" put '" + line.rstrip().replace("'","''") + " ';\n") ml.write(" put '" + line.rstrip().replace("'","''") + " ';\n")
ml.write("run;\n\n") ml.write("run;\n\n")
ml.write("%inc \"%sysfunc(pathname(work))/" + name + ".lua\";\n\n") ml.write("%inc \"%sysfunc(pathname(work))/" + name + ".lua\";\n\n")
ml.write("%mend;\n") ml.write("%mend " + name + ";\n")
ml.close() ml.close()

View File

@@ -391,4 +391,4 @@ run;
%inc "%sysfunc(pathname(work))/ml_json.lua"; %inc "%sysfunc(pathname(work))/ml_json.lua";
%mend; %mend ml_json;

View File

@@ -95,4 +95,4 @@ run;
filename __us2grp clear; filename __us2grp clear;
%mend; %mend mm_adduser2group;

View File

@@ -460,4 +460,4 @@ run;
%return; %return;
%end; %end;
%mend; %mend mm_assigndirectlib;

View File

@@ -75,4 +75,4 @@
%else %do; %else %do;
%put NOTE: Library &libref is already assigned; %put NOTE: Library &libref is already assigned;
%end; %end;
%mend; %mend mm_assignlib;

View File

@@ -152,4 +152,4 @@ run;
%else %put NOTE: Application (&name) successfully created in (&tree)!; %else %put NOTE: Application (&name) successfully created in (&tree)!;
%mend; %mend mm_createapplication;

View File

@@ -80,4 +80,4 @@ data _null_;
if last then call execute('call missing(of _all_);stop;run;'); if last then call execute('call missing(of _all_);stop;run;');
run; run;
%mend; %mend mm_createdataset;

View File

@@ -122,4 +122,4 @@ run;
run; run;
%end; %end;
%mend; %mend mm_createdocument;

View File

@@ -157,4 +157,4 @@ run;
%end; %end;
%put &sysmacroname: execution finished for &path; %put &sysmacroname: execution finished for &path;
%mend; %mend mm_createfolder;

View File

@@ -318,4 +318,4 @@ filename &frefout temp;
filename &frefout clear; filename &frefout clear;
%end; %end;
%mend; %mend mm_createlibrary;

View File

@@ -385,4 +385,4 @@ run;
%put %str(WARN)ING: STPTYPE=*&stptype* not recognised!; %put %str(WARN)ING: STPTYPE=*&stptype* not recognised!;
%end; %end;
%mend; %mend mm_createstp;

View File

@@ -415,7 +415,7 @@ data _null_;
put ' '; put ' ';
put ' %quote(&user) '; put ' %quote(&user) ';
put ' '; put ' ';
put '%mend; '; put '%mend mf_getuser; ';
/* WEBOUT END */ /* WEBOUT END */
put '%macro webout(action,ds,dslabel=,fmt=);'; put '%macro webout(action,ds,dslabel=,fmt=);';
put ' %mm_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt)'; put ' %mm_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt)';

View File

@@ -68,4 +68,4 @@ run;
%return; %return;
%end; %end;
%mend; %mend mm_deletedocument;

View File

@@ -89,4 +89,4 @@ run;
%put &sysmacroname: Library &name (&liburi) was successfully deleted; %put &sysmacroname: Library &name (&liburi) was successfully deleted;
%mend; %mend mm_deletelibrary;

View File

@@ -67,4 +67,4 @@ run;
%return; %return;
%end; %end;
%mend; %mend mm_deletestp;

View File

@@ -113,4 +113,4 @@ run;
filename &fileref clear; filename &fileref clear;
%mend; %mend mm_getauthinfo;

View File

@@ -50,4 +50,4 @@ proc sort;
by colname; by colname;
run; run;
%mend; %mend mm_getcols;

View File

@@ -62,4 +62,4 @@ proc sort;
by type name; by type name;
run; run;
%mend; %mend mm_getdetails;

View File

@@ -54,4 +54,4 @@ data &outds (keep=directoryuri name directoryname directorydesc );
end; end;
run; run;
%mend; %mend mm_getDirectories;

View File

@@ -143,4 +143,4 @@ run;
filename __getdoc clear; filename __getdoc clear;
filename __outdoc clear; filename __outdoc clear;
%mend; %mend mm_getdocument;

View File

@@ -93,4 +93,4 @@
run; run;
%end; %end;
%mend; %mend mm_getfoldermembers;

View File

@@ -88,4 +88,4 @@ data _null_;
!!",level=%eval(&level+1),append=YES)"); !!",level=%eval(&level+1),append=YES)");
run; run;
%mend; %mend mm_getfoldertree;

View File

@@ -69,4 +69,4 @@
end; end;
run; run;
%mend; %mend mm_getgroupmembers;

View File

@@ -92,4 +92,4 @@
options metarepository=&oldrepo; options metarepository=&oldrepo;
%end; %end;
%mend; %mend mm_getGroups;

View File

@@ -94,4 +94,4 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_getlibs;

View File

@@ -67,4 +67,4 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_getobjects;

View File

@@ -83,4 +83,4 @@ insert into &outds values ('User');
insert into &outds values ('UserGroup'); insert into &outds values ('UserGroup');
quit; quit;
%mend; %mend mm_getpublictypes;

View File

@@ -129,4 +129,4 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_getrepos;

View File

@@ -70,4 +70,4 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_getroles;

View File

@@ -81,4 +81,4 @@ options metarepository=&repo;
filename __mc1 clear; filename __mc1 clear;
filename __mc2 clear; filename __mc2 clear;
%mend; %mend mm_getservercontexts;

View File

@@ -107,4 +107,4 @@ data &outds ;
keep stpuri stpname treeuri; keep stpuri stpname treeuri;
run; run;
%mend; %mend mm_getstps;

View File

@@ -64,4 +64,4 @@ data &outds;
end; end;
run; run;
%mend; %mend mm_gettableid;

View File

@@ -115,4 +115,4 @@ proc sort;
by tablename tableuri; by tablename tableuri;
run; run;
%mend; %mend mm_gettables;

View File

@@ -65,4 +65,4 @@ data &outds;
if treeuri ne "" and treepath ne "" then output; if treeuri ne "" and treepath ne "" then output;
stop; stop;
run; run;
%mend; %mend mm_getTree;

Some files were not shown because too many files have changed in this diff Show More