Skip to content

Commit

Permalink
Merge pull request #347 from sasjs/docfixes
Browse files Browse the repository at this point in the history
chore: updating documentation
  • Loading branch information
allanbowe authored Aug 18, 2023
2 parents d39b1be + 1c4c979 commit 74143bd
Show file tree
Hide file tree
Showing 124 changed files with 980 additions and 820 deletions.
900 changes: 490 additions & 410 deletions all.sas

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions base/mf_abort.sas
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
@brief Abort, ungracefully
@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>
@li mp_abort.sas
Expand Down
2 changes: 1 addition & 1 deletion base/mf_deletefile.sas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%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
Expand Down
2 changes: 1 addition & 1 deletion base/mf_existds.sas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
expected results (depending on whether you 'expect' the result to be
case insensitive in this context!)
@param libds library.dataset
@param [in] libds library.dataset
@return output returns 1 or 0
<h4> Related Macros </h4>
Expand Down
2 changes: 1 addition & 1 deletion base/mf_existfileref.sas
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@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!
@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
that the fileref is found, but the file does not (yet) exist. If you need
Expand Down
2 changes: 1 addition & 1 deletion base/mf_existfunction.sas
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
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
**/
Expand Down
4 changes: 2 additions & 2 deletions base/mf_existvarlist.sas
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
%put %mf_existVarList(sashelp.class, age sex name dummyvar);
@param libds 2 part dataset or view reference
@param varlist space separated variable names
@param [in] libds 2 part dataset or view reference
@param [in] varlist space separated variable names
@version 9.2
@author Allan Bowe
Expand Down
1 change: 1 addition & 0 deletions base/mf_getapploc.sas
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
%put %mf_getapploc(/some/location/jobs/extract/somejob/);
%put %mf_getapploc(/some/location/tests/jobs/somejob/);
@param [in] pgm The _program value from which to extract the appLoc
@author Allan Bowe
**/
Expand Down
4 changes: 2 additions & 2 deletions base/mf_getattrc.sas
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
%put Dataset label = %mf_getattrc(sashelp.class,LABEL);
%put Member Type = %mf_getattrc(sashelp.class,MTYPE);
@param libds library.dataset
@param attr full list in [documentation](
@param [in] libds library.dataset
@param [in] attr full list in [documentation](
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
message if err.
Expand Down
4 changes: 2 additions & 2 deletions base/mf_getattrn.sas
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
%put Number of observations=%mf_getattrn(sashelp.class,NLOBS);
%put Number of variables = %mf_getattrn(sashelp.class,NVARS);
@param libds library.dataset
@param attr Common values are NLOBS and NVARS, full list in [documentation](
@param [in] libds library.dataset
@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)
@return output returns result of the attrn value supplied, or -1 and log
message if err.
Expand Down
5 changes: 3 additions & 2 deletions base/mf_getkeyvalue.sas
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
%put %mf_getkeyvalue(someindex)
@param key Provide a key on which to perform the lookup
@param libds= define the target table which holds the parameters
@param [in] key Provide a key on which to perform the lookup
@param [in] libds= (work.mp_setkeyvalue) The library.dataset which holds the
parameters
@version 9.2
@author Allan Bowe
Expand Down
2 changes: 1 addition & 1 deletion base/mf_getplatform.sas
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@li SASJS
@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>
@li mf_mval.sas
Expand Down
2 changes: 1 addition & 1 deletion base/mf_getschema.sas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
returns:
> 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
Expand Down
2 changes: 1 addition & 1 deletion base/mf_getuniquelibref.sas
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@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
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.
@version 9.2
Expand Down
2 changes: 1 addition & 1 deletion base/mf_getuniquename.sas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
> MCc59c750610321d4c8bf75faadbcd22
@param prefix= set a prefix for the new name
@param prefix= (MC) Sets a prefix for the new name
@version 9.3
@author Allan Bowe
Expand Down
2 changes: 0 additions & 2 deletions base/mf_getuser.sas
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
%let user= %mf_getUser();
%put &user;
@param type - do not use, may be deprecated in a future release
@return SYSUSERID (if workspace server)
@return _METAPERSON (if stored process server)
@return SYS_COMPUTE_SESSION_OWNER (if Viya compute session)
Expand Down
6 changes: 3 additions & 3 deletions base/mf_getvalue.sas
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<h4> Related Macros </h4>
@li mp_setkeyvalue.sas
@param libds dataset to query
@param variable the variable which contains the value to return.
@param filter contents of where clause
@param [in] libds dataset to query
@param [in] variable the variable which contains the value to return.
@param [in] filter= (1) contents of where clause
@version 9.2
@author Allan Bowe
Expand Down
3 changes: 2 additions & 1 deletion base/mf_getvarformat.sas
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
@param [in] libds Two part dataset (or view) reference.
@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
@author Allan Bowe
Expand Down
4 changes: 2 additions & 2 deletions base/mf_getvarlen.sas
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
8
NOTE: Variable renegade does not exist in test
@param libds Two part dataset (or view) reference.
@param var Variable name for which a length should be returned
@param [in] libds Two part dataset (or view) reference.
@param [in] var Variable name for which a length should be returned
@returns outputs length
@author Allan Bowe
Expand Down
4 changes: 2 additions & 2 deletions base/mf_getvarnum.sas
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ returns:
> NOTE: Variable renegade does not exist in test
@param libds Two part dataset (or view) reference.
@param var Variable name for which a position should be returned
@param [in] libds Two part dataset (or view) reference.
@param [in] var Variable name for which a position should be returned
@author Allan Bowe
@version 9.2
Expand Down
4 changes: 2 additions & 2 deletions base/mf_getvartype.sas
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Usage:
@param libds Two part dataset (or view) reference.
@param var the variable name to be checked
@param [in] libds Two part dataset (or view) reference.
@param [in] var the variable name to be checked
@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.
Expand Down
2 changes: 1 addition & 1 deletion base/mf_getxengine.sas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
returns:
> 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.
Expand Down
4 changes: 2 additions & 2 deletions base/mf_increment.sas
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
%put Now we have run %mf_increment(cnt) lines;
%put There are %mf_increment(cnt) lines in total;
@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] macro_name The name of the macro variable to increment
@param [in] incr= (1) The amount to add or subtract to the macro
<h4> Related Files </h4>
@li mf_increment.test.sas
Expand Down
2 changes: 1 addition & 1 deletion base/mf_isblank.sas
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
inspiration:
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
Expand Down
2 changes: 1 addition & 1 deletion base/mf_isdir.sas
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
With thanks and full credit to Andrea Defronzo -
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
Expand Down
7 changes: 6 additions & 1 deletion base/mf_loc.sas
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
%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
@author Allan Bowe
**/
Expand All @@ -15,7 +19,8 @@
%local root;

%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;
%put Batch tools located at: &root;
&root
Expand Down
2 changes: 1 addition & 1 deletion base/mf_mkdir.sas
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Usage:
%mf_mkdir(/some/path/name)
@param dir relative or absolute pathname. Unquoted.
@param [in] dir Relative or absolute pathname. Unquoted.
@version 9.2
**/
Expand Down
2 changes: 2 additions & 0 deletions base/mf_mval.sas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
%if %mf_mval(maynotexist)=itdid %then %do;
@param [in] var The macro variable NAME to return the (possible) value for
@version 9.2
@author Allan Bowe
**/
Expand Down
2 changes: 1 addition & 1 deletion base/mf_nobs.sas
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h4> SAS Macros </h4>
@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
if err.
Expand Down
4 changes: 2 additions & 2 deletions base/mf_trimstr.sas
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<h4> SAS Macros </h4>
@param basestr The string to be modified
@param trimstr The string to be removed from the end of `basestr`, if it
@param [in] basestr The string to be modified
@param [in] trimstr The string to be removed from the end of `basestr`, if it
exists
@return output returns result with the value of `trimstr` removed from the end
Expand Down
4 changes: 2 additions & 2 deletions base/mf_wordsinstr1andstr2.sas
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
returns:
> blah blaaah brah
@param str1= string containing words to extract
@param str2= used to compare with the extract string
@param [in] str1= () string containing words to extract
@param [in] str2= () used to compare with the extract string
@warning CASE SENSITIVE!
Expand Down
4 changes: 2 additions & 2 deletions base/mf_wordsinstr1butnotstr2.sas
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
returns:
> sss bram boo
@param [in] str1= string containing words to extract
@param [in] str2= used to compare with the extract string
@param [in] str1= () String containing words to extract
@param [in] str2= () Used to compare with the extract string
@version 9.2
@author Allan Bowe
Expand Down
4 changes: 2 additions & 2 deletions base/mf_writefile.sas
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
@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 O OUTPUT mode, writes new records from the beginning of the file.
@param [in] l1= First line
@param [in] l2= Second line (etc through to l10)
@param [in] l1= () First line
@param [in] l2= () Second line (etc through to l10)
<h4> Related Macros </h4>
@li mf_writefile.test.sas
Expand Down
21 changes: 11 additions & 10 deletions base/mp_abort.sas
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@
currently investigating approaches to deal with this.
@param mac= (mp_abort.sas) To contain the name of the calling macro. Do not
use &sysmacroname as this will always resolve to MP_ABORT.
@param msg= message to be returned
@param iftrue= (1=1) Supply a condition for which the macro should be executed
@param errds= (work.mp_abort_errds) There is no clean way to end a process
within a %include called within a macro. Furthermore, there is no way to
test if a macro is called within a %include. To handle this particular
scenario, the %include should be switched for the mp_include.sas macro.
@param [in] mac= (mp_abort.sas) To contain the name of the calling macro. Do
not use &sysmacroname as this will always resolve to MP_ABORT.
@param [out] msg= message to be returned
@param [in] iftrue= (1=1) Condition under which the macro should be executed
@param [in] errds= (work.mp_abort_errds) There is no clean way to end a
process within a %include called within a macro. Furthermore, there is no
way to test if a macro is called within a %include. To handle this
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
(`_SYSINCLUDEFILEDEVICE`) and allows us to provide a dataset with the abort
values (msg, mac).
Expand All @@ -45,8 +46,8 @@
@li msg (the message)
@li mac (the mac param)
@param mode= (REGULAR) If mode=INCLUDE then the &errds dataset is checked for
an abort status.
@param [in] mode= (REGULAR) If mode=INCLUDE then the &errds dataset is checked
for an abort status.
Valid values:
@li REGULAR (default)
@li INCLUDE
Expand Down
4 changes: 2 additions & 2 deletions base/mp_aligndecimal.sas
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
7998580.8415
@param var The (data step, character) variable to modify
@param width= (8) The number of characters BEFORE the decimal point
@param [in] var The (data step, character) variable to modify
@param [in] width= (8) The number of characters BEFORE the decimal point
<h4> SAS Macros </h4>
@li mf_getuniquename.sas
Expand Down
4 changes: 2 additions & 2 deletions base/mp_appendfile.sas
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
%mp_appendfile(baseref=tmp1, appendrefs=tmp2 tmp3)
@param [in] baseref= Fileref of the base file (should exist)
@param [in] appendrefs= One or more filerefs to be appended to the base
@param [in] baseref= (0) Fileref of the base file (should exist)
@param [in] appendrefs= (0) One or more filerefs to be appended to the base
fileref. Space separated.
@version 9.2
Expand Down
4 changes: 2 additions & 2 deletions base/mp_assertcols.sas
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
@param [in] inds The input library.dataset to test for values
@param [in] cols= The list of columns to check for
@param [in] desc= (Testing observations) The user provided test description
@param [in] cols= (0) The list of columns to check for
@param [in] desc= (0) The user provided test description
@param [in] test= (ALL) The test to apply. Valid values are:
@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
Expand Down
Loading

0 comments on commit 74143bd

Please sign in to comment.