1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 14:04:36 +00:00

chore: updating documentation in preparation for upcoming sasjs snippets feature

This commit is contained in:
Allan
2023-08-18 08:20:13 +01:00
parent d39b1be7a8
commit d42fd4ebac
124 changed files with 970 additions and 814 deletions

892
all.sas

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,11 @@
@brief Abort, ungracefully @brief Abort, ungracefully
@details Will abort with a straightforward %abort if the condition is true. @details Will abort with a straightforward %abort if the condition is true.
@param [in] mac= (mf_abort.sas) Name of calling macro (is printed to the log)
@param [in] msg= ( ) Additional string to print to the log
@param [in] iftrue= (%str(1=1)) Conditional logic under which to perform the
abort
<h4> Related Macros </h4> <h4> Related Macros </h4>
@li mp_abort.sas @li mp_abort.sas

View File

@@ -10,7 +10,7 @@
%mf_deletefile(&sasjswork/myfile.txt) %mf_deletefile(&sasjswork/myfile.txt)
@param filepath Full path to the target file @param [in] file Full path to the target file
@returns The return code from the fdelete() invocation @returns The return code from the fdelete() invocation

View File

@@ -10,7 +10,7 @@
expected results (depending on whether you 'expect' the result to be expected results (depending on whether you 'expect' the result to be
case insensitive in this context!) case insensitive in this context!)
@param libds library.dataset @param [in] libds library.dataset
@return output returns 1 or 0 @return output returns 1 or 0
<h4> Related Macros </h4> <h4> Related Macros </h4>

View File

@@ -4,7 +4,7 @@
@details You can probably do without this macro as it is just a one liner. @details You can probably do without this macro as it is just a one liner.
Mainly it is here as a convenient way to remember the syntax! Mainly it is here as a convenient way to remember the syntax!
@param fref the fileref to detect @param [in] fref the fileref to detect
@return output Returns 1 if found and 0 if not found. Note - it is possible @return output Returns 1 if found and 0 if not found. Note - it is possible
that the fileref is found, but the file does not (yet) exist. If you need that the fileref is found, but the file does not (yet) exist. If you need

View File

@@ -16,7 +16,7 @@
https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md#functionexists-macro https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md#functionexists-macro
). ).
@param [in] name (positional) - function name @param [in] name function name
@author Allan Bowe @author Allan Bowe
**/ **/

View File

@@ -6,8 +6,8 @@
%put %mf_existVarList(sashelp.class, age sex name dummyvar); %put %mf_existVarList(sashelp.class, age sex name dummyvar);
@param libds 2 part dataset or view reference @param [in] libds 2 part dataset or view reference
@param varlist space separated variable names @param [in] varlist space separated variable names
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe

View File

@@ -31,6 +31,7 @@
%put %mf_getapploc(/some/location/jobs/extract/somejob/); %put %mf_getapploc(/some/location/jobs/extract/somejob/);
%put %mf_getapploc(/some/location/tests/jobs/somejob/); %put %mf_getapploc(/some/location/tests/jobs/somejob/);
@param [in] pgm The _program value from which to extract the appLoc
@author Allan Bowe @author Allan Bowe
**/ **/

View File

@@ -6,8 +6,8 @@
%put Dataset label = %mf_getattrc(sashelp.class,LABEL); %put Dataset label = %mf_getattrc(sashelp.class,LABEL);
%put Member Type = %mf_getattrc(sashelp.class,MTYPE); %put Member Type = %mf_getattrc(sashelp.class,MTYPE);
@param libds library.dataset @param [in] libds library.dataset
@param attr full list in [documentation]( @param [in] attr full list in [documentation](
https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000147794.htm) https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000147794.htm)
@return output returns result of the attrc value supplied, or -1 and log @return output returns result of the attrc value supplied, or -1 and log
message if err. message if err.

View File

@@ -6,8 +6,8 @@
%put Number of observations=%mf_getattrn(sashelp.class,NLOBS); %put Number of observations=%mf_getattrn(sashelp.class,NLOBS);
%put Number of variables = %mf_getattrn(sashelp.class,NVARS); %put Number of variables = %mf_getattrn(sashelp.class,NVARS);
@param libds library.dataset @param [in] libds library.dataset
@param attr Common values are NLOBS and NVARS, full list in [documentation]( @param [in] attr Common values are NLOBS and NVARS, full list in [documentation](
http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212040.htm) http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212040.htm)
@return output returns result of the attrn value supplied, or -1 and log @return output returns result of the attrn value supplied, or -1 and log
message if err. message if err.

View File

@@ -7,8 +7,9 @@
%put %mf_getkeyvalue(someindex) %put %mf_getkeyvalue(someindex)
@param key Provide a key on which to perform the lookup @param [in] key Provide a key on which to perform the lookup
@param libds= define the target table which holds the parameters @param [in] libds= (work.mp_setkeyvalue) The library.dataset which holds the
parameters
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe

View File

@@ -12,7 +12,7 @@
@li SASJS @li SASJS
@li BASESAS @li BASESAS
@param switch the param for which to return a platform specific variable @param [in] switch the param for which to return a platform specific variable
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_mval.sas @li mf_mval.sas

View File

@@ -8,7 +8,7 @@
returns: returns:
> dbo > dbo
@param libref Library reference (also accepts a 2 level libds ref). @param [in] libref Library reference (also accepts a 2 level libds ref).
@return output returns the library schema for the FIRST library encountered @return output returns the library schema for the FIRST library encountered

View File

@@ -19,7 +19,7 @@
@param [in] prefix= (mclib) first part of the returned libref. As librefs can @param [in] prefix= (mclib) first part of the returned libref. As librefs can
be as long as 8 characters, a maximum length of 7 characters is premitted be as long as 8 characters, a maximum length of 7 characters is premitted
for this prefix. for this prefix.
@param [in] maxtries= Deprecated parameter. Remains here to ensure a @param [in] maxtries= (1000) Deprecated parameter. Remains here to ensure a
non-breaking change. Will be removed in v5. non-breaking change. Will be removed in v5.
@version 9.2 @version 9.2

View File

@@ -10,7 +10,7 @@
> MCc59c750610321d4c8bf75faadbcd22 > MCc59c750610321d4c8bf75faadbcd22
@param prefix= set a prefix for the new name @param prefix= (MC) Sets a prefix for the new name
@version 9.3 @version 9.3
@author Allan Bowe @author Allan Bowe

View File

@@ -13,8 +13,6 @@
%let user= %mf_getUser(); %let user= %mf_getUser();
%put &user; %put &user;
@param type - do not use, may be deprecated in a future release
@return SYSUSERID (if workspace server) @return SYSUSERID (if workspace server)
@return _METAPERSON (if stored process server) @return _METAPERSON (if stored process server)
@return SYS_COMPUTE_SESSION_OWNER (if Viya compute session) @return SYS_COMPUTE_SESSION_OWNER (if Viya compute session)

View File

@@ -13,9 +13,9 @@
<h4> Related Macros </h4> <h4> Related Macros </h4>
@li mp_setkeyvalue.sas @li mp_setkeyvalue.sas
@param libds dataset to query @param [in] libds dataset to query
@param variable the variable which contains the value to return. @param [in] variable the variable which contains the value to return.
@param filter contents of where clause @param [in] filter= (1) contents of where clause
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe

View File

@@ -25,7 +25,8 @@
@param [in] libds Two part dataset (or view) reference. @param [in] libds Two part dataset (or view) reference.
@param [in] var Variable name for which a format should be returned @param [in] var Variable name for which a format should be returned
@param [in] force=(0) Set to 1 to supply a default if the variable has no format @param [in] force= (0) Set to 1 to supply a default if the variable has no
format
@returns outputs format @returns outputs format
@author Allan Bowe @author Allan Bowe

View File

@@ -18,8 +18,8 @@
8 8
NOTE: Variable renegade does not exist in test NOTE: Variable renegade does not exist in test
@param libds Two part dataset (or view) reference. @param [in] libds Two part dataset (or view) reference.
@param var Variable name for which a length should be returned @param [in] var Variable name for which a length should be returned
@returns outputs length @returns outputs length
@author Allan Bowe @author Allan Bowe

View File

@@ -21,8 +21,8 @@ returns:
> NOTE: Variable renegade does not exist in test > NOTE: Variable renegade does not exist in test
@param libds Two part dataset (or view) reference. @param [in] libds Two part dataset (or view) reference.
@param var Variable name for which a position should be returned @param [in] var Variable name for which a position should be returned
@author Allan Bowe @author Allan Bowe
@version 9.2 @version 9.2

View File

@@ -13,8 +13,8 @@ Usage:
@param libds Two part dataset (or view) reference. @param [in] libds Two part dataset (or view) reference.
@param var the variable name to be checked @param [in] var the variable name to be checked
@return output returns C or N depending on variable type. If variable @return output returns C or N depending on variable type. If variable
does not exist then a blank is returned and a note is written to the log. does not exist then a blank is returned and a note is written to the log.

View File

@@ -10,7 +10,7 @@
returns: returns:
> TEMP > TEMP
@param fref The fileref to check @param [in] fref The fileref to check
@returns The XENGINE value in sashelp.vextfl or 0 if not found. @returns The XENGINE value in sashelp.vextfl or 0 if not found.

View File

@@ -11,8 +11,8 @@
%put Now we have run %mf_increment(cnt) lines; %put Now we have run %mf_increment(cnt) lines;
%put There are %mf_increment(cnt) lines in total; %put There are %mf_increment(cnt) lines in total;
@param [in] MACRO_NAME the name of the macro variable to increment @param [in] macro_name The name of the macro variable to increment
@param [in] ITER= The amount to add or subtract to the macro @param [in] incr= (1) The amount to add or subtract to the macro
<h4> Related Files </h4> <h4> Related Files </h4>
@li mf_increment.test.sas @li mf_increment.test.sas

View File

@@ -12,7 +12,7 @@
inspiration: inspiration:
https://support.sas.com/resources/papers/proceedings09/022-2009.pdf https://support.sas.com/resources/papers/proceedings09/022-2009.pdf
@param param VALUE to be checked @param [in] Param VALUE to be checked
@return output returns 1 (if blank) else 0 @return output returns 1 (if blank) else 0

View File

@@ -9,7 +9,7 @@
With thanks and full credit to Andrea Defronzo - With thanks and full credit to Andrea Defronzo -
https://www.linkedin.com/in/andrea-defronzo-b1a47460/ https://www.linkedin.com/in/andrea-defronzo-b1a47460/
@param path full path of the file/directory to be checked @param [in] path Full path of the file/directory to be checked
@return output returns 1 if path is a directory, 0 if it is not @return output returns 1 if path is a directory, 0 if it is not

View File

@@ -6,6 +6,10 @@
%put %mf_loc(POF); %*location of PlatformObjectFramework tools; %put %mf_loc(POF); %*location of PlatformObjectFramework tools;
@param [in] loc The item to locate, eg:
@li PLAATFORMOBJECTFRAMEWORK (or POF)
@li VIYACONFG
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
**/ **/
@@ -15,7 +19,8 @@
%local root; %local root;
%if &loc=POF or &loc=PLATFORMOBJECTFRAMEWORK %then %do; %if &loc=POF or &loc=PLATFORMOBJECTFRAMEWORK %then %do;
%let root=%substr(%sysget(SASROOT),1,%index(%sysget(SASROOT),SASFoundation)-2); %let root=%sysget(SASROOT);
%let root=%substr(&root,1,%index(&root,SASFoundation)-2);
%let root=&root/SASPlatformObjectFramework/&sysver; %let root=&root/SASPlatformObjectFramework/&sysver;
%put Batch tools located at: &root; %put Batch tools located at: &root;
&root &root

View File

@@ -7,7 +7,7 @@ Usage:
%mf_mkdir(/some/path/name) %mf_mkdir(/some/path/name)
@param dir relative or absolute pathname. Unquoted. @param [in] dir Relative or absolute pathname. Unquoted.
@version 9.2 @version 9.2
**/ **/

View File

@@ -8,6 +8,8 @@
%if %mf_mval(maynotexist)=itdid %then %do; %if %mf_mval(maynotexist)=itdid %then %do;
@param [in] var The macro variable NAME to return the (possible) value for
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
**/ **/

View File

@@ -9,7 +9,7 @@
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_getattrn.sas @li mf_getattrn.sas
@param libds library.dataset @param [in] libds library.dataset
@return output returns result of the attrn value supplied, or log message @return output returns result of the attrn value supplied, or log message
if err. if err.

View File

@@ -11,8 +11,8 @@
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@param basestr The string to be modified @param [in] basestr The string to be modified
@param trimstr The string to be removed from the end of `basestr`, if it @param [in] trimstr The string to be removed from the end of `basestr`, if it
exists exists
@return output returns result with the value of `trimstr` removed from the end @return output returns result with the value of `trimstr` removed from the end

View File

@@ -13,8 +13,8 @@
returns: returns:
> blah blaaah brah > blah blaaah brah
@param str1= string containing words to extract @param [in] str1= () string containing words to extract
@param str2= used to compare with the extract string @param [in] str2= () used to compare with the extract string
@warning CASE SENSITIVE! @warning CASE SENSITIVE!

View File

@@ -16,8 +16,8 @@
returns: returns:
> sss bram boo > sss bram boo
@param [in] str1= string containing words to extract @param [in] str1= () String containing words to extract
@param [in] str2= used to compare with the extract string @param [in] str2= () Used to compare with the extract string
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe

View File

@@ -21,8 +21,8 @@
@param [in] mode= (O) Available options are A or O as follows: @param [in] mode= (O) Available options are A or O as follows:
@li A APPEND mode, writes new records after the current end of the file. @li A APPEND mode, writes new records after the current end of the file.
@li O OUTPUT mode, writes new records from the beginning of the file. @li O OUTPUT mode, writes new records from the beginning of the file.
@param [in] l1= First line @param [in] l1= () First line
@param [in] l2= Second line (etc through to l10) @param [in] l2= () Second line (etc through to l10)
<h4> Related Macros </h4> <h4> Related Macros </h4>
@li mf_writefile.test.sas @li mf_writefile.test.sas

View File

@@ -27,14 +27,15 @@
currently investigating approaches to deal with this. currently investigating approaches to deal with this.
@param mac= (mp_abort.sas) To contain the name of the calling macro. Do not @param [in] mac= (mp_abort.sas) To contain the name of the calling macro. Do
use &sysmacroname as this will always resolve to MP_ABORT. not use &sysmacroname as this will always resolve to MP_ABORT.
@param msg= message to be returned @param [out] msg= message to be returned
@param iftrue= (1=1) Supply a condition for which the macro should be executed @param [in] iftrue= (1=1) Condition under which the macro should be executed
@param errds= (work.mp_abort_errds) There is no clean way to end a process @param [in] errds= (work.mp_abort_errds) There is no clean way to end a
within a %include called within a macro. Furthermore, there is no way to process within a %include called within a macro. Furthermore, there is no
test if a macro is called within a %include. To handle this particular way to test if a macro is called within a %include. To handle this
scenario, the %include should be switched for the mp_include.sas macro. particular scenario, the %include should be switched for the mp_include.sas
macro.
This provides an indicator that we are running a macro within a \%include This provides an indicator that we are running a macro within a \%include
(`_SYSINCLUDEFILEDEVICE`) and allows us to provide a dataset with the abort (`_SYSINCLUDEFILEDEVICE`) and allows us to provide a dataset with the abort
values (msg, mac). values (msg, mac).
@@ -45,8 +46,8 @@
@li msg (the message) @li msg (the message)
@li mac (the mac param) @li mac (the mac param)
@param mode= (REGULAR) If mode=INCLUDE then the &errds dataset is checked for @param [in] mode= (REGULAR) If mode=INCLUDE then the &errds dataset is checked
an abort status. for an abort status.
Valid values: Valid values:
@li REGULAR (default) @li REGULAR (default)
@li INCLUDE @li INCLUDE

View File

@@ -62,8 +62,8 @@
7998580.8415 7998580.8415
@param var The (data step, character) variable to modify @param [in] var The (data step, character) variable to modify
@param width= (8) The number of characters BEFORE the decimal point @param [in] width= (8) The number of characters BEFORE the decimal point
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_getuniquename.sas @li mf_getuniquename.sas

View File

@@ -17,8 +17,8 @@
%mp_appendfile(baseref=tmp1, appendrefs=tmp2 tmp3) %mp_appendfile(baseref=tmp1, appendrefs=tmp2 tmp3)
@param [in] baseref= Fileref of the base file (should exist) @param [in] baseref= (0) Fileref of the base file (should exist)
@param [in] appendrefs= One or more filerefs to be appended to the base @param [in] appendrefs= (0) One or more filerefs to be appended to the base
fileref. Space separated. fileref. Space separated.
@version 9.2 @version 9.2

View File

@@ -31,8 +31,8 @@
@param [in] inds The input library.dataset to test for values @param [in] inds The input library.dataset to test for values
@param [in] cols= The list of columns to check for @param [in] cols= (0) The list of columns to check for
@param [in] desc= (Testing observations) The user provided test description @param [in] desc= (0) The user provided test description
@param [in] test= (ALL) The test to apply. Valid values are: @param [in] test= (ALL) The test to apply. Valid values are:
@li ALL - Test is a PASS if ALL columns exist in &inds @li ALL - Test is a PASS if ALL columns exist in &inds
@li ANY - Test is a PASS if ANY of the columns exist in &inds @li ANY - Test is a PASS if ANY of the columns exist in &inds

View File

@@ -36,7 +36,7 @@
@param [in] indscol The input library.dataset.column to test for values @param [in] indscol The input library.dataset.column to test for values
@param [in] checkvals= A library.dataset.column value containing a UNIQUE @param [in] checkvals= (0) A library.dataset.column value containing a UNIQUE
list of values to be compared against the source (indscol). list of values to be compared against the source (indscol).
@param [in] desc= (Testing observations) The user provided test description @param [in] desc= (Testing observations) The user provided test description
@param [in] test= (ALLVALS) The test to apply. Valid values are: @param [in] test= (ALLVALS) The test to apply. Valid values are:

View File

@@ -28,8 +28,8 @@
put _infile_; put _infile_;
run; run;
@param [in] inref= Fileref of the input file (should exist) @param [in] inref= (0) Fileref of the input file (should exist)
@param [out] outref= Output fileref. If it does not exist, it is created. @param [out] outref= (0) Output fileref. If it does not exist, it is created.
@param [in] action= (ENCODE) The action to take. Valid values: @param [in] action= (ENCODE) The action to take. Valid values:
@li ENCODE - Convert the file to base64 format @li ENCODE - Convert the file to base64 format
@li DECODE - Decode the file from base64 format @li DECODE - Decode the file from base64 format

View File

@@ -22,13 +22,13 @@
%mp_binarycopy(inref=tmp1, outref=tmp2, mode=APPEND) %mp_binarycopy(inref=tmp1, outref=tmp2, mode=APPEND)
@param [in] inloc quoted "path/and/filename.ext" of the file to be copied @param [in] inloc= () quoted "path/and/filename.ext" of the file to be copied
@param [out] outloc quoted "path/and/filename.ext" of the file to be created @param [out] outloc= () quoted "path/and/filename.ext" of the file to create
@param [in] inref (____in) If provided, this fileref will take precedence over @param [in] inref= (____in) If provided, this fileref takes precedence over
the `inloc` parameter the `inloc` parameter
@param [out] outref (____in) If provided, this fileref will take precedence @param [out] outref= (____in) If provided, this fileref takes precedence
over the `outloc` parameter. It must already exist! over the `outloc` parameter. It must already exist!
@param [in] mode (CREATE) Valid values: @param [in] mode= (CREATE) Valid values:
@li CREATE - Create the file (even if it already exists) @li CREATE - Create the file (even if it already exists)
@li APPEND - Append to the file (don't overwrite) @li APPEND - Append to the file (don't overwrite)
@param iftrue= (1=1) Supply a condition for which the macro should be executed @param iftrue= (1=1) Supply a condition for which the macro should be executed

View File

@@ -44,7 +44,7 @@
For more examples, see mp_chop.test.sas For more examples, see mp_chop.test.sas
@param [in] infile The QUOTED path to the file on which to perform the chop @param [in] infile The QUOTED path to the file on which to perform the chop
@param [in] matchvar= Macro variable NAME containing the string to split by @param [in] matchvar= () Macro variable NAME containing the string to split by
@param [in] matchpoint= (START) Valid values: @param [in] matchpoint= (START) Valid values:
@li START - chop at the beginning of the string in `matchvar`. @li START - chop at the beginning of the string in `matchvar`.
@li END - chop at the end of the string in `matchvar`. @li END - chop at the end of the string in `matchvar`.

View File

@@ -18,7 +18,7 @@
@param [in] source Unquoted path to the folder to copy from. @param [in] source Unquoted path to the folder to copy from.
@param [out] target Unquoted path to the folder to copy to. @param [out] target Unquoted path to the folder to copy to.
@param [in] copymax=(MAX) Set to a positive integer to indicate the level of @param [in] copymax= (MAX) Set to a positive integer to indicate the level of
subdirectory copy recursion - eg 3, to go `./3/levels/deep`. For unlimited subdirectory copy recursion - eg 3, to go `./3/levels/deep`. For unlimited
recursion, set to MAX. recursion, set to MAX.

View File

@@ -1,6 +1,6 @@
/** /**
@file mp_createwebservice.sas @file mp_createwebservice.sas
@brief Create a web service in SAS 9, Viya or SASjs Server @brief Create a web service in SAS 9, Viya or SASjs Server (legacy)
@details This is actually a wrapper for mx_createwebservice.sas, remaining @details This is actually a wrapper for mx_createwebservice.sas, remaining
for legacy purposes. For new apps, use mx_createwebservice.sas. for legacy purposes. For new apps, use mx_createwebservice.sas.

View File

@@ -19,11 +19,11 @@
%mp_csv2ds(inref=mycsv,outds=myds,baseds=sashelp.class) %mp_csv2ds(inref=mycsv,outds=myds,baseds=sashelp.class)
@param inref= fileref to the CSV @param inref= (0) Fileref to the CSV
@param outds= output ds (lib.ds format) @param outds= (0) Output ds (lib.ds format)
@param view= Set to YES or NO to determine whether the output should be @param view= (NO) Set to YES or NO to determine whether the output should be
a view or not. Default is NO (not a view). a view or not. Default is NO (not a view).
@param baseds= Template dataset on which to create the input statement. @param baseds= (0) Template dataset on which to create the input statement.
Is used to determine types, lengths, and any informats. Is used to determine types, lengths, and any informats.
@version 9.2 @version 9.2

View File

@@ -17,9 +17,10 @@
%mp_getconstraints(lib=work,ds=example,outds=work.constraints) %mp_getconstraints(lib=work,ds=example,outds=work.constraints)
%mp_deleteconstraints(inds=work.constraints,outds=dropped,execute=YES) %mp_deleteconstraints(inds=work.constraints,outds=dropped,execute=YES)
@param inds= The input table containing the constraint info @param inds= (mp_getconstraints) The input table containing constraint info
@param outds= a table containing the drop statements (drop_statement column) @param outds= (mp_deleteconstraints) Table containing the drop statements
@param execute= `YES|NO` - default is NO. To actually drop, use YES. (drop_statement column)
@param execute= (NO) `YES|NO` - default is NO. To actually drop, use YES.
@version 9.2 @version 9.2

View File

@@ -15,7 +15,7 @@
%mp_deletefolder(&rootdir) %mp_deletefolder(&rootdir)
@param path Unquoted path to the folder to delete. @param [in] folder Unquoted path to the folder to delete.
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_getuniquename.sas @li mf_getuniquename.sas

View File

@@ -29,7 +29,7 @@
![](https://user-images.githubusercontent.com/4420615/188278365-2987db97-0594-4a39-ac81-dbacdef5cdc8.png) ![](https://user-images.githubusercontent.com/4420615/188278365-2987db97-0594-4a39-ac81-dbacdef5cdc8.png)
@param lib= (WORK) The libref in which to create the views @param [in] lib= (WORK) The libref in which to create the views
<h4> Related Files </h4> <h4> Related Files </h4>
@li mp_dictionary.test.sas @li mp_dictionary.test.sas

View File

@@ -7,11 +7,11 @@
%mp_distinctfmtvalues(libds=sashelp.class,var=age,outvar=age,outds=test) %mp_distinctfmtvalues(libds=sashelp.class,var=age,outvar=age,outds=test)
@param libds input dataset @param [in] libds= () input dataset
@param var variable to get distinct values for @param [in] var= (0) variable to get distinct values for
@param outvar variable to create. Default: `formatted_value` @param [out] outvar= (formatteed_value) variable to create.
@param outds dataset to create. Default: work.mp_distinctfmtvalues @param [out] outds= (work.mp_distinctfmtvalues) dataset to create.
@param varlen length of variable to create (default 200) @param [in] varlen= (2000) length of variable to create
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe

View File

@@ -1,8 +1,20 @@
/** /**
@file @file
@brief A wrapper for mp_getddl.sas @brief Fetches DDL for a specific table
@details In the next release, this will be the main version. @details Uses mp_getddl under the hood
@param [in] libds library.dataset to create ddl for
@param [in] fref= (getddl) the fileref to which to _append_ the DDL. If it
does not exist, it will be created.
@param [in] flavour= (SAS) The type of DDL to create. Options:
@li SAS
@li TSQL
@param [in]showlog= (NO) Set to YES to show the DDL in the log
@param [in] schema= () Choose a preferred schema name (default is to use
actual schema, else libref)
@param applydttm= (NO) For non SAS DDL, choose if columns are created with
native datetime2 format or regular decimal type
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mp_getddl.sas @li mp_getddl.sas

View File

@@ -49,8 +49,8 @@
https://support.sas.com/resources/papers/proceedings14/1549-2014.pdf) by https://support.sas.com/resources/papers/proceedings14/1549-2014.pdf) by
[Louise Hadden](https://www.linkedin.com/in/louisehadden/). [Louise Hadden](https://www.linkedin.com/in/louisehadden/).
@param libds The library.dataset to export the metadata for @param [in] libds The library.dataset to export the metadata for
@param outds= (work.dsmeta) The output table to contain the metadata @param [out] outds= (work.dsmeta) The output table to contain the metadata
<h4> Related Files </h4> <h4> Related Files </h4>
@li mp_dsmeta.test.sas @li mp_dsmeta.test.sas

View File

@@ -37,10 +37,12 @@
@param [in] targetds= The target dataset against which to verify VARIABLE_NM. @param [in] targetds= The target dataset against which to verify VARIABLE_NM.
This must be available (ie, the library must be assigned). This must be available (ie, the library must be assigned).
@param [out] abort= (YES) If YES will call mp_abort.sas on any exceptions @param [out] abort= (YES) If YES will call mp_abort.sas on any exceptions
@param [out] outds= The output table, which is a copy of the &inds. table @param [out] outds= (work.badrecords) The output table, which is a copy of the
plus a REASON_CD column, containing only bad records. If bad records found, &inds. table plus a REASON_CD column, containing only bad records.
the SYSCC value will be set to 1008 (general data problem). Downstream If bad records are found, the SYSCC value will be set to 1008
processes should check this table (and return code) before continuing. (a general data problem).
Downstream processes should check this table (and return code) before
continuing.
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mp_abort.sas @li mp_abort.sas

View File

@@ -51,8 +51,8 @@
> ) > )
@param [in] inds The input table with query values @param [in] inds The input table with query values
@param [out] outref= The output fileref to contain the filter clause. Will @param [out] outref= (filter) The output fileref to contain the filter clause.
be created (or replaced). Will be created (or replaced).
<h4> Related Macros </h4> <h4> Related Macros </h4>
@li mp_filtercheck.sas @li mp_filtercheck.sas

View File

@@ -44,9 +44,10 @@
mp_coretable.sas as follows: `mp_coretable(LOCKTABLE)`. mp_coretable.sas as follows: `mp_coretable(LOCKTABLE)`.
@param [in] maxkeytable= (0) Optional permanent reference table used for @param [in] maxkeytable= (0) Optional permanent reference table used for
retained key tracking. Described in mp_retainedkey.sas. retained key tracking. Described in mp_retainedkey.sas.
@param [in] mdebug= set to 1 to enable DEBUG messages @param [in] mdebug= (1) set to 1 to enable DEBUG messages
@param [out] outresult= The result table with the FILTER_RK @param [out] outresult= (work.result) The result table with the FILTER_RK
@param [out] outquery= The original query, taken as extract after table load @param [out] outquery= (work.query) The original query, taken as extract
after table load
<h4> SAS Macros </h4> <h4> SAS Macros </h4>

View File

@@ -20,6 +20,9 @@
|`DATE `|`8 `|`1 `|`DATE `|`MONYY `|`MONYY. `|`N `|`DATE `| |`DATE `|`8 `|`1 `|`DATE `|`MONYY `|`MONYY. `|`N `|`DATE `|
|`REGION `|`3 `|`3 `|`REGION `|` `|`$3. `|`C `|`CHARACTER `| |`REGION `|`3 `|`3 `|`REGION `|` `|`$3. `|`C `|`CHARACTER `|
@param [in] ds The dataset to get the columns from
@param [out] outds= (work.cols) The dataset to create
<h4> Related Macros </h4> <h4> Related Macros </h4>
@li mf_getvarlist.sas @li mf_getvarlist.sas
@li mm_getcols.sas @li mm_getcols.sas

View File

@@ -23,10 +23,10 @@
@li mf_getquotedstr.sas @li mf_getquotedstr.sas
@li mp_getconstraints.sas @li mp_getconstraints.sas
@param liblist= Space seperated list of librefs to take as @param [in] liblist= (SASHELP) Space seperated list of librefs to take as
input (Default=SASHELP) input
@param outref= Fileref to contain the DBML (Default=getdbml) @param [out] outref= (getdbml) Fileref to contain the DBML
@param showlog= set to YES to show the DBML in the log (Default is NO) @param [in] showlog= (NO) set to YES to show the DBML in the log
@version 9.3 @version 9.3
@author Allan Bowe @author Allan Bowe

View File

@@ -22,16 +22,21 @@
@li mf_getvarcount.sas @li mf_getvarcount.sas
@li mp_getconstraints.sas @li mp_getconstraints.sas
@param lib libref of the library to create DDL for. Should be assigned. @param [in] libref Libref of the library to create DDL for. Should already
@param ds dataset to create ddl for (optional) be assigned.
@param fref= the fileref to which to _append_ the DDL. If it does not exist, @param [in] ds dataset to create ddl for (optional)
it will be created. @param [in] fref= (getddl) the fileref to which to _append_ the DDL. If it
@param flavour= The type of DDL to create (default=SAS). Supported=TSQL does not exist, it will be created.
@param showlog= Set to YES to show the DDL in the log @param [in] flavour= (SAS) The type of DDL to create. Options:
@param schema= Choose a preferred schema name (default is to use actual schema @li SAS
,else libref) @li TSQL
@param applydttm= for non SAS DDL, choose if columns are created with native
datetime2 format or regular decimal type @param [in]showlog= (NO) Set to YES to show the DDL in the log
@param [in] schema= () Choose a preferred schema name (default is to use
actual schema, else libref)
@param applydttm= (NO) For non SAS DDL, choose if columns are created with
native datetime2 format or regular decimal type
@version 9.3 @version 9.3
@author Allan Bowe @author Allan Bowe
**/ **/

View File

@@ -18,7 +18,7 @@
%mp_guesspk(sashelp.class,outds=classpks) %mp_guesspk(sashelp.class,outds=classpks)
@param [in] baseds The dataset to analyse @param [in] baseds The dataset to analyse
@param [out] outds= The output dataset to contain the possible PKs @param [out] outds= (mp_guesspk) Output dataset to contain the possible PKs
@param [in] max_guesses= (3) The total number of possible primary keys to @param [in] max_guesses= (3) The total number of possible primary keys to
generate. A table may have multiple (unlikely) PKs, so no need to list them generate. A table may have multiple (unlikely) PKs, so no need to list them
all. all.

View File

@@ -24,7 +24,7 @@
@li mp_hashdirectory.sas @li mp_hashdirectory.sas
@param [in] libds dataset to hash @param [in] libds dataset to hash
@param [in] salt= Provide a salt (could be, for instance, the dataset name) @param [in] salt= () Provide a salt (could be, for instance, the dataset name)
@param [in] iftrue= (1=1) A condition under which the macro should be executed @param [in] iftrue= (1=1) A condition under which the macro should be executed
@param [out] outds= (work._data_) The output dataset to create. This @param [out] outds= (work._data_) The output dataset to create. This
will contain one column (hashkey) with one observation (a $hex32. will contain one column (hashkey) with one observation (a $hex32.

View File

@@ -24,19 +24,19 @@
@li mf_trimstr.sas @li mf_trimstr.sas
@li mp_ds2cards.sas @li mp_ds2cards.sas
@param [in] lib= Library in which to convert all datasets @param [in] lib= () Library in which to convert all datasets
@param [out] outloc= Location in which to store output. Defaults to WORK @param [out] outloc= (%sysfunc(pathname(work))) Location in which to store
library. No quotes. output. No quotes.
@param [out] outfile= Optional output file NAME - if provided, then will create @param [out] outfile= (0) Optional output file NAME - if provided, then
a single output file instead of one file per input table. will create a single output file instead of one file per input table.
@param [in] maxobs= limit output to the first <code>maxobs</code> observations @param [in] maxobs= (max) limit output to the first <code>maxobs</code> rows
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
**/ **/
%macro mp_lib2cards(lib= %macro mp_lib2cards(lib=
,outloc=%sysfunc(pathname(work)) /* without trailing slash */ ,outloc=%sysfunc(pathname(work))
,maxobs=max ,maxobs=max
,random_sample=NO ,random_sample=NO
,outfile=0 ,outfile=0

View File

@@ -28,8 +28,8 @@
@li Global option: `options dsoptions=nonote2err;` @li Global option: `options dsoptions=nonote2err;`
@li Data step option: `data YOURLIB.YOURDATASET /nonote2err;` @li Data step option: `data YOURLIB.YOURDATASET /nonote2err;`
@param cvars= Space seperated list of character variables @param cvars= () Space seperated list of character variables
@param nvars= Space seperated list of numeric variables @param nvars= () Space seperated list of numeric variables
<h4> Related Programs </h4> <h4> Related Programs </h4>
@li mp_init.sas @li mp_init.sas

View File

@@ -11,9 +11,9 @@
%mp_perflog(finished) %mp_perflog(finished)
@param label Provide label to go into the control dataset @param [in] label Provide label to go into the control dataset
@param libds= Provide a dataset in which to store performance stats. Default @param [in] libds= (work.mp_perflog) Provide a dataset in which to store
name is <code>work.mp_perflog</code>; performance stats. Default name is <code>work.mp_perflog</code>;
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe

View File

@@ -34,12 +34,12 @@
Credit is made to `data _null_` for authoring this very helpful paper: Credit is made to `data _null_` for authoring this very helpful paper:
https://www.lexjansen.com/pharmasug/2008/cc/CC08.pdf https://www.lexjansen.com/pharmasug/2008/cc/CC08.pdf
@param action Either FETCH a current or previous record, or INITialise. @param [in] action Either FETCH a current or previous record, or INITialise.
@param record The relative (to current) position of the previous observation @param [in] record The relative (to current) position of the previous row
to return. to return.
@param history= The number of records to retain in the hash table. Default=5 @param [in] history= (5) The number of records to retain in the hash table.
@param prefix= the prefix to give to the variables used to store the hash name @param prefix= (mp_prevobs) The prefix to give to the variables used to
and index. Default=mp_prevobs store the hash name and index.
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe

View File

@@ -23,12 +23,13 @@
,childvar=c ,childvar=c
) )
@param base_ds= base table containing hierarchy (not modified) @param [in] base_ds= base table containing hierarchy (not modified)
@param outds= the output dataset to create with the generated hierarchy @param [out] outds= the output dataset to create with the generated hierarchy
@param matchval= the ultimate parent from which to filter @param [in] matchval= the ultimate parent from which to filter
@param parentvar= name of the parent variable @param [in] parentvar= name of the parent variable
@param childvar= name of the child variable (should be same type as parent) @param [in] childvar= () name of the child variable (should be same type as
@param mdebug= set to 1 to prevent temp tables being dropped parent)
@param [in] mdebug= set to 1 to prevent temp tables being dropped
@returns outds contains the following variables: @returns outds contains the following variables:

View File

@@ -32,10 +32,11 @@
Note - if you are running a version of SAS that will allow the io package in Note - if you are running a version of SAS that will allow the io package in
LUA, you can also use this macro: mp_gsubfile.sas LUA, you can also use this macro: mp_gsubfile.sas
@param infile The QUOTED path to the file on which to perform the substitution @param [in] infile The QUOTED path to the file on which to perform the
@param findvar= Macro variable NAME containing the string to search for substitution
@param replacevar= Macro variable NAME containing the replacement string @param [in] findvar= Macro variable NAME containing the string to search for
@param outfile= (0) Optional QUOTED path to the adjusted output file (to @param [in] replacevar= Macro variable NAME containing the replacement string
@param [out] outfile= (0) Optional QUOTED path to the adjusted output file (to
avoid overwriting the first file). avoid overwriting the first file).
<h4> SAS Macros </h4> <h4> SAS Macros </h4>

View File

@@ -31,9 +31,9 @@
%mp_runddl(/some/rootlib, exc=LIBREF3) * same as above ; %mp_runddl(/some/rootlib, exc=LIBREF3) * same as above ;
@param path location of the DDL folder structure @param [in] path location of the DDL folder structure
@param inc= list of librefs to include @param [in] inc= list of librefs to include
@param exc= list of librefs to exclude (takes precedence over inc=) @param [in] exc= list of librefs to exclude (takes precedence over inc=)
@version 9.3 @version 9.3
@author Allan Bowe @author Allan Bowe

View File

@@ -9,12 +9,12 @@
%mp_searchcols(libs=sashelp work, cols=name sex age) %mp_searchcols(libs=sashelp work, cols=name sex age)
@param libs=(SASHELP) Space separated list of libraries to search for columns @param libs= (SASHELP) Space separated list of libraries to search for columns
@param cols= Space separated list of column names to search for (not case @param cols= Space separated list of column names to search for (not case
sensitive) sensitive)
@param outds=(mp_searchcols) the table to create with the results. Will have @param outds= (mp_searchcols) the table to create with the results. Will have
one line per table match. one line per table match.
@param match=(ANY) The match type. Valid values: @param match= (ANY) The match type. Valid values:
@li ANY - The table contains at least one of the columns @li ANY - The table contains at least one of the columns
@li WILD - The table contains a column with a name that partially matches @li WILD - The table contains a column with a name that partially matches

View File

@@ -21,9 +21,10 @@
%mp_stprequests(status_cd=INIT, libds=YOURLIB.DATASET ) %mp_stprequests(status_cd=INIT, libds=YOURLIB.DATASET )
@param status_cd= Use INIT for INIT and TERM for TERM events @param [in] status_cd= Use INIT for INIT and TERM for TERM events
@param libds= Location of base table (library.dataset). To minimise risk @param [in] libds= (somelib.stp_requests) Location of base table
of table locks, we HIGHLY recommend using a database (NOT a SAS dataset). (library.dataset). To minimise risk of table locks, we HIGHLY recommend
using a database (NOT a SAS dataset).
THE LIBRARY SHOULD BE ASSIGNED ALREADY - eg in autoexec or earlier in the THE LIBRARY SHOULD BE ASSIGNED ALREADY - eg in autoexec or earlier in the
init program proper. init program proper.

View File

@@ -8,8 +8,8 @@
duration=60*5 duration=60*5
) )
@param [in] duration= the time in seconds which the job should run for. Actual @param [in] duration= (30) The time in seconds which the job should run for.
time may vary, as the check is done in between steps. Default = 30 (seconds). Actual time may vary, as the check is done in between steps.
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_getuniquelibref.sas @li mf_getuniquelibref.sas

View File

@@ -11,9 +11,9 @@
,outds=work.results ,outds=work.results
) )
@param lib= (WORK) The library in which to create the table @param [in] lib= (WORK) The library in which to create the table
@param size= (0.1) The size in GB of the table to create @param [in] size= (0.1) The size in GB of the table to create
@param outds= (WORK.RESULTS) The output dataset to be created. @param [out] outds= (WORK.RESULTS) The output dataset to be created.
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_getuniquename.sas @li mf_getuniquename.sas

View File

@@ -15,8 +15,8 @@ https://communities.sas.com/t5/SAS-Programming/listing-all-files-within-a-direct
https://communities.sas.com/t5/SAS-Programming/listing-all-files-of-all-types-from-all-subdirectories/m-p/334113/highlight/true#M75419 https://communities.sas.com/t5/SAS-Programming/listing-all-files-of-all-types-from-all-subdirectories/m-p/334113/highlight/true#M75419
@param dir= Directory to be scanned (default=/tmp) @param [in] dir= (/tmp) Directory to be scanned
@param outds= Dataset to create (default=work.mp_tree) @param [out] outds= (work.mp_tree) Dataset to create
@returns outds contains the following variables: @returns outds contains the following variables:

View File

@@ -13,11 +13,12 @@
%mp_unzip(ziploc="/some/file.zip",outdir=/some/folder) %mp_unzip(ziploc="/some/file.zip",outdir=/some/folder)
More info: https://blogs.sas.com/content/sasdummy/2015/05/11/using-filename-zip-to-unzip-and-read-data-files-in-sas/ More info:
https://blogs.sas.com/content/sasdummy/2015/05/11/using-filename-zip-to-unzip-and-read-data-files-in-sas/
@param ziploc= Fileref or quoted full path to zip file ("/path/to/file.zip") @param [in] ziploc= Fileref or quoted full path, eg: "/path/to/file.zip"
@param outdir= (%sysfunc(pathname(work))) Directory in which to write the @param [out] outdir= (%sysfunc(pathname(work))) Directory in which to write
outputs (created if non existant) the outputs (created if needed)
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_mkdir.sas @li mf_mkdir.sas

View File

@@ -14,9 +14,9 @@
proc sql; proc sql;
describe table example; describe table example;
@param libds the library.dataset to be modified @param [in] libds the library.dataset to be modified
@param var The variable to modify @param [in] var The variable to modify
@param len The new length to apply @param [in] len The new length to apply
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_existds.sas @li mf_existds.sas

View File

@@ -11,7 +11,7 @@
@param [in] file The file to wait for. Must be provided. @param [in] file The file to wait for. Must be provided.
@param [in] maxwait= (0) Number of seconds to wait. If set to zero, will @param [in] maxwait= (0) Number of seconds to wait. If set to zero, will
loop indefinitely (to a maximum of 46 days, per SAS [documentation]( loop indefinitely (to a maximum of 46 days, per SAS [documentation](
https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001418809.htm https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001418809.htm
)). Otherwise, execution will proceed upon sleep expiry. )). Otherwise, execution will proceed upon sleep expiry.
@param [in] interval= (1) The wait period between sleeps, in seconds @param [in] interval= (1) The wait period between sleeps, in seconds

View File

@@ -18,7 +18,7 @@
Usage: Usage:
%mp_webin() %mp_webin()
This was created as a macro procedure (over a macro function) as it will also This was created as a macro procedure (over a macro function) as it will also
use the filename statement in Viya environments (where `_webin_fileuri` is use the filename statement in Viya environments (where `_webin_fileuri` is

View File

@@ -15,14 +15,14 @@
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mp_dirlist.sas @li mp_dirlist.sas
@param in= unquoted filepath, dataset of files or directory to zip @param [in] in= unquoted filepath, dataset of files or directory to zip
@param type= (FILE) Valid values: @param [in] type= (FILE) Valid values:
@li FILE - /full/path/and/filename.extension to a particular file @li FILE - /full/path/and/filename.extension to a particular file
@li DATASET - a dataset containing a list of files to zip (see `incol`) @li DATASET - a dataset containing a list of files to zip (see `incol`)
@li DIRECTORY - a directory to zip @li DIRECTORY - a directory to zip
@param outname= (FILE) Output file to create, _without_ .zip extension @param [out] outname= (FILE) Output file to create, _without_ .zip extension
@param outpath= (%sysfunc(pathname(WORK))) Parent folder for output zip file @param [out] outpath= (%sysfunc(pathname(WORK))) Parent folder for zip file
@param incol= if DATASET input, say which column contains the filepath @param [in] incol= () If DATASET input, say which column contains the filepath
<h4> Related Macros </h4> <h4> Related Macros </h4>
@li mp_unzip.sas @li mp_unzip.sas

View File

@@ -13,9 +13,9 @@
,group=someGroup) ,group=someGroup)
@param user= the user name (not displayname) @param [in] user= the user name (not displayname)
@param group= the group to which to add the user @param [in] group= the group to which to add the user
@param mdebug= (0) set to 1 to show debug info in log @param [in] mdebug= (0) set to 1 to show debug info in log
<h4> Related Files </h4> <h4> Related Files </h4>
@li ms_adduser2group.sas @li ms_adduser2group.sas

View File

@@ -18,12 +18,13 @@
@li mf_getengine.sas @li mf_getengine.sas
@li mp_abort.sas @li mp_abort.sas
@param libref the libref (not name) of the metadata library @param [in] libref the libref (not name) of the metadata library
@param open_passthrough= provide an alias to produce the CONNECT TO statement @param [in] open_passthrough= () Provide an alias to produce the CONNECT TO
for the relevant external database statement for the relevant external database
@param sql_options= an override default output fileref to avoid naming clash @param [in] sql_options= () Add any options to add to proc sql statement,
@param mDebug= set to 1 to show debug messages in the log eg outobs= (only valid for pass through)
@param mAbort= set to 1 to call %mp_abort(). @param [in] mDebug= (0) set to 1 to show debug messages in the log
@param [in] mAbort= (0) set to 1 to call %mp_abort().
@returns libname statement @returns libname statement
@@ -33,12 +34,9 @@
**/ **/
%macro mm_assigndirectlib( %macro mm_assigndirectlib(
libref /* libref to assign from metadata */ libref
,open_passthrough= /* provide an alias to produce the ,open_passthrough=
CONNECT TO statement for the ,sql_options=
relevant external database */
,sql_options= /* add any options to add to proc sql statement eg outobs=
(only valid for pass through) */
,mDebug=0 ,mDebug=0
,mAbort=0 ,mAbort=0
)/*/STORE SOURCE*/; )/*/STORE SOURCE*/;

View File

@@ -14,8 +14,8 @@
@li mp_abort.sas @li mp_abort.sas
@param [in] libref The libref (not name) of the metadata library @param [in] libref The libref (not name) of the metadata library
@param [in] mAbort= If not assigned, HARD will call %mp_abort(), SOFT will @param [in] mAbort= (HARD) If not assigned, HARD will call %mp_abort(), SOFT
silently return will silently return
@returns libname statement @returns libname statement

View File

@@ -22,12 +22,12 @@
@li mm_gettables.sas @li mm_gettables.sas
@li mm_getcols.sas @li mm_getcols.sas
@param libds= library.dataset metadata source. Note - table names in metadata @param [in] libds= library.dataset metadata source. Note - table names in metadata
can be longer than 32 chars (just fyi, not an issue here) can be longer than 32 chars (just fyi, not an issue here)
@param tableuri= Metadata URI of the table to be created @param [in] tableuri= Metadata URI of the table to be created
@param outds= (work.mm_createdataset) The dataset to create. The table name @param [out] outds= (work.mm_createdataset) The dataset to create. The table
needs to be 32 chars or less as per SAS naming rules. name needs to be 32 chars or less as per SAS naming rules.
@param mdebug= (0) Set to 1 to enable DEBUG messages @param [in] mdebug= (0) Set to 1 to enable DEBUG messages
@version 9.4 @version 9.4
@author Allan Bowe @author Allan Bowe

View File

@@ -17,15 +17,15 @@
@li mf_verifymacvars.sas @li mf_verifymacvars.sas
@param tree= The metadata folder uri, or the metadata path, in which to @param [in] tree= The metadata folder uri, or the metadata path, in which to
create the document. This must exist. create the document. This must exist.
@param name= Document object name. Avoid spaces. @param [in] name= Document object name. Avoid spaces.
@param desc= Document description (optional) @param [in] desc= Document description (optional)
@param textrole= TextRole property (optional) @param [in] textrole= TextRole property (optional)
@param frefin= fileref to use (enables change if there is a conflict) @param [in] frefin= fileref to use (enables change if there is a conflict)
@param frefout= fileref to use (enables change if there is a conflict) @param [out] frefout= fileref to use (enables change if there is a conflict)
@param mDebug= set to 1 to show debug messages in the log @param [in] mDebug= set to 1 to show debug messages in the log
@author Allan Bowe @author Allan Bowe

View File

@@ -24,30 +24,33 @@
@li mm_createfolder.sas @li mm_createfolder.sas
@param libname= Library name (as displayed to user, 256 chars). Duplicates @param [in] libname= (My New Library) Library name (as displayed to user,
are not created (case sensitive). 256 chars). Duplicates are not created (case sensitive).
@param libref= Library libref (8 chars). Duplicate librefs are not created, @param [in] libref= (mynewlib) Library libref (8 chars). Duplicate
HOWEVER- the check is not case sensitive - if *libref* exists, *LIBREF* librefs are not created, HOWEVER- the check is not case sensitive - if
will still be created. Librefs created will always be uppercased. *libref* exists, *LIBREF* will still be created.
@param engine= Library engine (currently only BASE supported) Librefs created will always be uppercased.
@param tree= The metadata folder uri, or the metadata path, in which to @param [in] engine= Library engine (currently only BASE supported)
@param [in] tree= The metadata folder uri, or the metadata path, in which to
create the library. create the library.
@param servercontext= The SAS server against which the library is registered. @param [in] servercontext= (SASApp) The SAS server against which
@param IsPreassigned= set to 1 if the library should be pre-assigned. the library is registered.
@param [in] IsPreassigned= set to 1 if the library should be pre-assigned.
@param libdesc= Library description (optional) @param [in] libdesc= Library description (optional)
@param directory= Required for the BASE engine. The metadata directory objects @param [in] directory= (/tmp/somelib) Required for the BASE engine.
are searched to find an existing one with a matching physical path. The metadata directory objects are searched to find an existing
one with a matching physical path.
If more than one uri found with that path, then the first one will be used. If more than one uri found with that path, then the first one will be used.
If no URI is found, a new directory object will be created. The physical If no URI is found, a new directory object will be created. The physical
path will also be created, if it doesn't exist. path will also be created, if it doesn't exist.
@param mDebug= set to 1 to show debug messages in the log @param [in] mDebug= set to 1 to show debug messages in the log
@param frefin= fileref to use (enables change if there is a conflict). The @param [in] frefin= fileref to use (enables change if there is a conflict).
filerefs are left open, to enable inspection after running the The filerefs are left open, to enable inspection after running the
macro (or importing into an xmlmap if needed). macro (or importing into an xmlmap if needed).
@param frefout= fileref to use (enables change if there is a conflict) @param [out] frefout= fileref to use (enables change if there is a conflict)
@version 9.3 @version 9.3

View File

@@ -40,28 +40,32 @@
,Server=SASApp ,Server=SASApp
,stptype=2) ,stptype=2)
@param stpname= Stored Process name. Avoid spaces - testing has shown that @param [in] stpname= (SASjs Default STP) Stored Process name.
Avoid spaces - testing has shown that
the check to avoid creating multiple STPs in the same folder with the same the check to avoid creating multiple STPs in the same folder with the same
name does not work when the name contains spaces. name does not work when the name contains spaces.
@param stpdesc= Stored Process description (optional) @param [in] stpdesc= Stored Process description (optional)
@param filename= the name of the .sas program to run @param [in] filename= the name of the .sas program to run
@param directory= The directory uri, or the actual path to the sas program @param [in] directory= (SASEnvironment/sascode)
(no trailing slash). If more than uri is found with that path, then the The directory uri or the actual path to the sas program (no trailing slash).
first one will be used. If more than uri is found with that path, then the first one will be used.
@param tree= The metadata folder uri, or the metadata path, in which to @param [in] tree= The metadata folder uri, or the metadata path, in which to
create the STP. create the STP.
@param server= The server which will run the STP. Server name or uri is fine. @param [in] server= (SASApp) The server which will run the STP.
@param outds= The two level name of the output dataset. Will contain all the Server name or uri is fine.
meta uris. Defaults to work.mm_createstp. @param [out] outds= (work.mm_createstp)
@param mDebug= set to 1 to show debug messages in the log The two level name of the output dataset. Will contain all the meta uris.
@param stptype= Default is 1 (STP code saved on filesystem). Set to 2 if @param [in] mDebug= set to 1 to show debug messages in the log
@param [in] stptype= Default is 1 (STP code saved on filesystem). Set to 2 if
source code is to be saved in metadata (9.3 and above feature). source code is to be saved in metadata (9.3 and above feature).
@param minify= set to YES to strip comments / blank lines etc @param [in] minify= set to YES to strip comments / blank lines etc
@param frefin= fileref to use (enables change if there is a conflict). The @param [in] frefin= (mm_in) fileref to use (enables change if there is
filerefs are left open, to enable inspection after running the a conflict).
The filerefs are left open, to enable inspection after running the
macro (or importing into an xmlmap if needed). macro (or importing into an xmlmap if needed).
@param frefout= fileref to use (enables change if there is a conflict) @param [out] frefout= (mm_out) fileref to use (enables change if there is
@param repo= ServerContext is tied to a repo, if you are not using the a conflict)
@param [in] repo= ServerContext is tied to a repo, if you are not using the
foundation repo then select a different one here foundation repo then select a different one here
@returns outds dataset containing the following columns: @returns outds dataset containing the following columns:
@@ -88,7 +92,7 @@
**/ **/
%macro mm_createstp( %macro mm_createstp(
stpname=Macro People STP stpname=SASjs Default STP
,stpdesc=This stp was created automatically by the mm_createstp macro ,stpdesc=This stp was created automatically by the mm_createstp macro
,filename=mm_createstp.sas ,filename=mm_createstp.sas
,directory=SASEnvironment/SASCode ,directory=SASEnvironment/SASCode

View File

@@ -29,22 +29,23 @@ Usage:
For more examples of using these web services with the SASjs Adapter, see: For more examples of using these web services with the SASjs Adapter, see:
https://github.com/sasjs/adapter#readme https://github.com/sasjs/adapter#readme
@param path= The full path (in SAS Metadata) where the service will be created @param [in] path= () The full path (in SAS Metadata) where the service
@param name= Stored Process name. Avoid spaces - testing has shown that will be created
@param [in] name= Stored Process name. Avoid spaces - testing has shown that
the check to avoid creating multiple STPs in the same folder with the same the check to avoid creating multiple STPs in the same folder with the same
name does not work when the name contains spaces. name does not work when the name contains spaces.
@param desc= The description of the service (optional) @param [in] desc= The description of the service (optional)
@param precode= Space separated list of filerefs, pointing to the code that @param [in] precode= () Space separated list of filerefs, pointing to the
needs to be attached to the beginning of the service (optional) code that needs to be attached to the beginning of the service (optional)
@param code= (ft15f001) Space seperated fileref(s) of the actual code to be @param [in] code= (ft15f001) Space seperated fileref(s) of the actual code
added to be added
@param server= (SASApp) The server which will run the STP. Server name or uri @param [in] server= (SASApp) The server which will run the STP. Server
is fine. name or uri is fine.
@param mDebug= (0) set to 1 to show debug messages in the log @param [in] mDebug= (0) set to 1 to show debug messages in the log
@param replace= (YES) select NO to avoid replacing an existing service in that @param [in] replace= (YES) select NO to avoid replacing an existing service
location in that location
@param adapter= (sasjs) the macro uses the sasjs adapter by default. To use @param [in] adapter= (sasjs) the macro uses the sasjs adapter by default.
another adapter, add a (different) fileref here. To use another adapter, add a (different) fileref here.
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mm_createstp.sas @li mm_createstp.sas

View File

@@ -10,7 +10,7 @@
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@param target= full path to the document being deleted @param [in] target= full path to the document being deleted
@version 9.4 @version 9.4
@author Allan Bowe @author Allan Bowe

View File

@@ -20,7 +20,7 @@
![](https://i.imgur.com/Y4Tog24.png) ![](https://i.imgur.com/Y4Tog24.png)
@param [in] name= the name (not libref) of the library to be deleted @param [in] name= () the name (not libref) of the library to be deleted
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_getuniquefileref.sas @li mf_getuniquefileref.sas

View File

@@ -9,7 +9,7 @@
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@param target= full path to the STP being deleted @param [in] target= full path to the STP being deleted
@version 9.4 @version 9.4
@author Allan Bowe @author Allan Bowe

View File

@@ -7,8 +7,8 @@
%mm_getcols(tableuri=A5X8AHW1.B40001S5) %mm_getcols(tableuri=A5X8AHW1.B40001S5)
@param outds the dataset to create that contains the list of columns @param [out] outds the dataset to create that contains the list of columns
@param uri the uri of the table for which to return columns @param [in] uri the uri of the table for which to return columns
@returns outds dataset containing all columns, specifically: @returns outds dataset containing all columns, specifically:
- colname - colname

View File

@@ -2,9 +2,12 @@
@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
@param uri the metadata object for which to return attributes / associations @param [in] uri the metadata object for which to return
@param outattrs= the dataset to create that contains the list of attributes attributes / associations
@param outassocs= the dataset to contain the list of associations @param [out] outattrs= (work.attributes)
The dataset to create that contains the list of attributes
@param [out] outassocs= (work.associations)
The dataset to contain the list of associations
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe

View File

@@ -5,9 +5,10 @@
blank to return all directories. The Directory object is used to reference blank to return all directories. The Directory object is used to reference
a physical filepath (eg when registering a .sas program in a Stored process) a physical filepath (eg when registering a .sas program in a Stored process)
@param path= the physical path for which to return a meta Directory object @param [in] path= Physical path for which to return a meta Directory object
@param outds= the dataset to create that contains the list of directories @param [out] outds= (work.mm_getdirectories)
@param mDebug= set to 1 to show debug messages in the log the dataset to create that contains the list of directories
@param [in] mDebug= (0) set to 1 to show debug messages in the log
@returns outds dataset containing the following columns: @returns outds dataset containing the following columns:
- directoryuri - directoryuri

View File

@@ -14,10 +14,10 @@
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mp_abort.sas @li mp_abort.sas
@param tree= The metadata path of the document @param [in] tree= The metadata path of the document
@param name= Document object name. @param [in] name= Document object name.
@param outref= full and unquoted path to the desired text file. This will be @param [out] outref= full and unquoted path to the desired text file.
overwritten if it already exists. This will be overwritten if it already exists.
@author Allan Bowe @author Allan Bowe

View File

@@ -11,11 +11,11 @@
,emails=YES ,emails=YES
) )
@param group metadata group for which to bring back members @param [in] group metadata group for which to bring back members
@param outds= (work.mm_getgroupmembers) The dataset to create that contains @param [out] outds= (work.mm_getgroupmembers)
the list of members The dataset to create that contains the list of members
@param emails= (NO) Set to YES to bring back email addresses @param [in] emails= (NO) Set to YES to bring back email addresses
@param id= (NO) Set to yes if passing an ID rather than a group name @param [in] id= (NO) Set to yes if passing an ID rather than a group name
@returns outds dataset containing all members of the metadata group @returns outds dataset containing all members of the metadata group

View File

@@ -4,8 +4,8 @@
@details Will only show the libraries to which a user has the requisite @details Will only show the libraries to which a user has the requisite
metadata access. metadata access.
@param outds the dataset to create that contains the list of libraries @param [out] outds= (work.mm_getlibs)
@param mDebug set to anything but * or 0 to show debug messages in the log The library.dataset to create that contains the list of libraries
@returns outds dataset containing all groups in a column named "metagroup" @returns outds dataset containing all groups in a column named "metagroup"
(defaults to work.mm_getlibs). The following columns are provided: (defaults to work.mm_getlibs). The following columns are provided:

View File

@@ -2,8 +2,8 @@
@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
@param type= the metadata type for which to return all objects @param [in] type= the metadata type for which to return all objects
@param outds= the dataset to create that contains the list of types @param [out] outds= the dataset to create that contains the list of types
@returns outds dataset containing all objects @returns outds dataset containing all objects

View File

@@ -9,6 +9,8 @@
* dataset will contain one column - publictype ($64); * dataset will contain one column - publictype ($64);
%mm_getpublictypes(outds=types) %mm_getpublictypes(outds=types)
@param [out] outds= (work.mm_getpublictypes) The library.dataset to create
@returns outds= dataset containing all types @returns outds= dataset containing all types
@version 9.3 @version 9.3

View File

@@ -2,7 +2,8 @@
@file @file
@brief Creates a dataset with all available repositories @brief Creates a dataset with all available repositories
@param outds= the dataset to create that contains the list of repos @param [out] outds= (work.mm_getrepos)
The dataset to create that contains the list of repos
@returns outds dataset containing all repositories @returns outds dataset containing all repositories

View File

@@ -7,7 +7,8 @@
%mm_getroles() %mm_getroles()
@param [out] outds the dataset to create that contains the list of roles @param [out] outds= (work.mm_getroles)
The dataset to create that contains the list of roles
@returns outds dataset containing all roles, with the following columns: @returns outds dataset containing all roles, with the following columns:
- uri - uri

View File

@@ -17,15 +17,16 @@
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mm_gettree.sas @li mm_gettree.sas
@param tree= the metadata folder location in which to search. Leave blank @param [in] tree= () the metadata folder location in which to search.
for all folders. Does not search subdirectories. Leave blank for all folders. Does not search subdirectories.
@param name= Provide the name of an STP to search for just that one. Can @param [in] name= Provide the name of an STP to search for just that one. Can
combine with the <code>tree=</code> parameter. combine with the <code>tree=</code> parameter.
@param outds= the dataset to create that contains the list of stps. @param [out] outds= the dataset to create that contains the list of stps.
@param mDebug= set to 1 to show debug messages in the log @param [in] mDebug= set to 1 to show debug messages in the log
@param showDesc= provide a non blank value to return stored process @param [in] showDesc= provide a non blank value to return stored process
descriptions descriptions
@param showUsageVersion= provide a non blank value to return the UsageVersion. @param [in] showUsageVersion= ()
Provide a non blank value to return the UsageVersion.
This is either 1000000 (type 1, 9.2) or 2000000 (type2, 9.3 onwards). This is either 1000000 (type 1, 9.2) or 2000000 (type2, 9.3 onwards).
@returns outds dataset containing the following columns @returns outds dataset containing the following columns

View File

@@ -9,10 +9,10 @@
- get a table id - get a table id
%mm_gettableid(libref=METALIB,ds=SOMETABLE,outds=iwant) %mm_gettableid(libref=METALIB,ds=SOMETABLE,outds=iwant)
@param libref= The libref to search @param [in] libref= The libref to search
@param ds= The input dataset to check @param [in] ds= The input dataset to check
@param outds= the dataset to create that contains the `tableuri` @param [out] outds= the dataset to create that contains the `tableuri`
@param mDebug= set to 1 to show debug messages in the log @param [in] mDebug= set to 1 to show debug messages in the log
@returns outds dataset containing `tableuri` and `tablename` @returns outds dataset containing `tableuri` and `tablename`

View File

@@ -10,10 +10,10 @@
%mm_getTree(tree=/User Folders/sasdemo) %mm_getTree(tree=/User Folders/sasdemo)
@param tree= the BIP Tree folder path or uri @param [in] tree= the BIP Tree folder path or uri
@param outds= the dataset to create that contains the tree path & uri @param [out] outds= the dataset to create that contains the tree path & uri
@param inds= an optional input dataset to augment with treepath & treeuri @param [in] inds= an optional input dataset to augment with treepath & treeuri
@param mDebug= set to 1 to show debug messages in the log @param [in] mDebug= set to 1 to show debug messages in the log
@returns outds dataset containing the following columns: @returns outds dataset containing the following columns:
- treeuri - treeuri

View File

@@ -5,7 +5,8 @@
%mm_gettypes(outds=types) %mm_gettypes(outds=types)
@param outds the dataset to create that contains the list of types @param [in] outds= (work.mm_gettypes)
The dataset to create that contains the list of types
@returns outds dataset containing all types @returns outds dataset containing all types
@warning The following filenames are created and then de-assigned: @warning The following filenames are created and then de-assigned:

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