1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-15 16:14: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

View File

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

View File

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

View File

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

View File

@@ -22,12 +22,12 @@
@li mm_gettables.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)
@param tableuri= Metadata URI of the table to be created
@param outds= (work.mm_createdataset) The dataset to create. The table 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] tableuri= Metadata URI of the table to be created
@param [out] outds= (work.mm_createdataset) The dataset to create. The table
name needs to be 32 chars or less as per SAS naming rules.
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
@version 9.4
@author Allan Bowe

View File

@@ -17,15 +17,15 @@
@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.
@param name= Document object name. Avoid spaces.
@param [in] name= Document object name. Avoid spaces.
@param desc= Document description (optional)
@param textrole= TextRole property (optional)
@param frefin= fileref to use (enables change if there is a conflict)
@param 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] desc= Document description (optional)
@param [in] textrole= TextRole property (optional)
@param [in] frefin= fileref to use (enables change if there is a conflict)
@param [out] frefout= fileref to use (enables change if there is a conflict)
@param [in] mDebug= set to 1 to show debug messages in the log
@author Allan Bowe

View File

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

View File

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

View File

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

View File

@@ -10,7 +10,7 @@
<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
@author Allan Bowe

View File

@@ -20,7 +20,7 @@
![](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>
@li mf_getuniquefileref.sas

View File

@@ -9,7 +9,7 @@
<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
@author Allan Bowe

View File

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

View File

@@ -2,9 +2,12 @@
@file mm_getdetails.sas
@brief extracts metadata attributes and associations for a particular uri
@param uri the metadata object for which to return attributes / associations
@param outattrs= the dataset to create that contains the list of attributes
@param outassocs= the dataset to contain the list of associations
@param [in] uri the metadata object for which to return
attributes / 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
@author Allan Bowe

View File

@@ -5,9 +5,10 @@
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)
@param path= the physical path for which to return a meta Directory object
@param outds= the dataset to create that contains the list of directories
@param mDebug= set to 1 to show debug messages in the log
@param [in] path= Physical path for which to return a meta Directory object
@param [out] outds= (work.mm_getdirectories)
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:
- directoryuri

View File

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

View File

@@ -11,11 +11,11 @@
,emails=YES
)
@param group metadata group for which to bring back members
@param outds= (work.mm_getgroupmembers) The dataset to create that contains
the list of members
@param 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] group metadata group for which to bring back members
@param [out] outds= (work.mm_getgroupmembers)
The dataset to create that contains the list of members
@param [in] emails= (NO) Set to YES to bring back email addresses
@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

View File

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

View File

@@ -2,8 +2,8 @@
@file
@brief Creates a dataset with all metadata objects for a particular type
@param type= the metadata type for which to return all objects
@param outds= the dataset to create that contains the list of types
@param [in] type= the metadata type for which to return all objects
@param [out] outds= the dataset to create that contains the list of types
@returns outds dataset containing all objects

View File

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

View File

@@ -2,7 +2,8 @@
@file
@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

View File

@@ -7,7 +7,8 @@
%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:
- uri

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,8 @@
%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
@warning The following filenames are created and then de-assigned:

View File

@@ -12,8 +12,6 @@
%mm_getusers(user=&_metaperson)
@param outds the dataset to create that contains the list of libraries
@returns outds dataset containing all users, with the following columns:
- uri
- name

View File

@@ -10,7 +10,7 @@
put value=;
run;
@param outds the dataset to create that contains the list of properties
@param [out] outds= the dataset to create that contains the list of properties
@returns outds dataset containing all properties

View File

@@ -52,9 +52,9 @@
@li mm_getpublictypes.sas
@li mf_isblank.sas
@param root= the parent folder under which to return all contents
@param outds= the dataset to create that contains the list of directories
@param types= Space-seperated, unquoted list of types for filtering the
@param [in] root= the parent folder under which to return all contents
@param [in] outds= the dataset to create that contains the list of directories
@param [in] types= Space-seperated, unquoted list of types for filtering the
output. Special types:
* ALl - return all types (the default)

View File

@@ -17,14 +17,14 @@
,paramdesc=some description)
@param app= the BIP Tree folder path plus Application Name
@param paramname= Parameter name
@param paramvalue= Parameter value
@param paramdesc= Parameter description
@param [in] app= the BIP Tree folder path plus Application Name
@param [in] paramname= Parameter name
@param [in] paramvalue= Parameter value
@param [in] paramdesc= Parameter description
@param frefin= change default inref if it clashes with an existing one
@param frefout= change default outref if it clashes with an existing one
@param mDebug= set to 1 to show debug messages in the log
@param [in] frefin= change default inref if it clashes with an existing one
@param [out] frefout= change default outref if it clashes with an existing one
@param [in] mDebug= set to 1 to show debug messages in the log
@version 9.4
@author Allan Bowe

View File

@@ -10,13 +10,13 @@
,text="/file/system/some.txt")
@param path= the BIP Tree folder path
@param name=Document Name
@param text=a source file containing the text to be added
@param [in] path= the BIP Tree folder path
@param [in] name=Document Name
@param [in] text=a source file containing the text to be added
@param frefin= change default inref if it clashes with an existing one
@param frefout= change default outref if it clashes with an existing one
@param mDebug= set to 1 to show debug messages in the log
@param [in] frefin= change default inref if it clashes with an existing one
@param [out] frefout= change default outref if it clashes with an existing one
@param [in] mDebug= set to 1 to show debug messages in the log
@version 9.3
@author Allan Bowe

View File

@@ -9,8 +9,8 @@
,type=WKS)
@param target= full path to the STP being deleted
@param type= Either WKS or STP depending on whether Workspace or
@param [in] target= full path to the STP being deleted
@param [in] type= Either WKS or STP depending on whether Workspace or
Stored Process type required
@version 9.4

View File

@@ -10,10 +10,12 @@
,stpcode="/file/system/source.sas")
@param [in] stp= the BIP Tree folder path plus Stored Process Name
@param [in] stpcode= the source file (or fileref) containing the SAS code to load
into the stp. For multiple files, they should simply be concatenated first.
@param [in] minify= set to YES in order to strip comments, blank lines, and CRLFs.
@param mDebug= set to 1 to show debug messages in the log
@param [in] stpcode= () The source file (or fileref) containing the SAS
code to load into the stp.
For multiple files, they should simply be concatenated first.
@param [in] minify= (NO) Set to YES in order to strip comments, blank lines,
and CRLFs.
@param [in] mDebug= set to 1 to show debug messages in the log
@version 9.3
@author Allan Bowe