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

View File

@@ -12,7 +12,8 @@
%put %mfv_existfile(/does/exist.txt);
%put %mfv_existfile(/does/not/exist.txt);
@param filepath The full path to the file on SAS drive (eg /Public/myfile.txt)
@param [in] filepath The full path to the file on SAS drive
(eg /Public/myfile.txt)
<h4> SAS Macros </h4>
@li mf_abort.sas

View File

@@ -12,7 +12,7 @@
%put %mfv_existfolder(/does/exist);
%put %mfv_existfolder(/does/not/exist);
@param path The path to the folder on SAS drive
@param [in] path The path to the folder on SAS drive
<h4> SAS Macros </h4>
@li mf_abort.sas

View File

@@ -13,10 +13,10 @@
To force a rescan, just use a new `&outprefix` value, or delete the table(s)
before running the function.
@param libds library.dataset
@param outprefix= (work.mfv_existsashdat) Used to store the current HDATA
tables to improve subsequent query performance. This reference is a prefix
and is converted to `&prefix._{libref}`
@param [in] libds library.dataset
@param [out] outprefix= (work.mfv_existsashdat)
Used to store current HDATA tables to improve subsequent query performance.
This reference is a prefix and is converted to `&prefix._{libref}`
@return output returns 1 or 0

View File

@@ -32,30 +32,32 @@
@li mf_isblank.sas
@li mv_deletejes.sas
@param path= The full path (on SAS Drive) where the job will be created
@param name= The name of the job
@param desc= (Created by the mv_createjob.sas macro) The job description
@param precode= Space separated list of filerefs, pointing to the code that
@param [in] path= The full path (on SAS Drive) where the job will be created
@param [in] name= The name of the job
@param [in] desc= (Created by the mv_createjob.sas macro) The job description
@param [in] precode= ()
Space separated list of filerefs, pointing to the code that
needs to be attached to the beginning of the job
@param code= (ft15f001) Fileref(s) of the actual code to be added
@param access_token_var= (ACCESS_TOKEN) Global macro variable containing the
access token
@param grant_type= (sas_services) Valid values:
@param [in] code= (ft15f001) Fileref(s) of the actual code to be added
@param [in] access_token_var= (ACCESS_TOKEN)
Global macro variable containing the access token
@param [in] grant_type= (sas_services) Valid values:
@li sas_services
@li detect
@li authorization_code
@li password
@param replace= (YES) select NO to avoid replacing any existing job
@param addjesbeginendmacros= (false) Relates to the `_addjesbeginendmacros`
setting. Normally this would always be false however due to a Viya bug
@param [in] replace= (YES) select NO to avoid replacing any existing job
@param [in] addjesbeginendmacros= (false)
Relates to the `_addjesbeginendmacros` setting.
Normally this would always be false however due to a Viya bug
(https://github.com/sasjs/cli/issues/1229) this is now configurable. Valid
values:
@li true
@li false
@li 0 - this will prevent the flag from being set (job will default to true)
@param contextname= Choose a specific context on which to run the Job. Leave
blank to use the default context. From Viya 3.5 it is possible to configure
a shared context - see
@param [in] contextname= () Choose a specific context on which to run the Job.
Leave blank to use the default context.
From Viya 3.5 it is possible to configure a shared context - see
https://go.documentation.sas.com/?docsetId=calcontexts&docsetTarget=n1hjn8eobk5pyhn1wg3ja0drdl6h.htm&docsetVersion=3.5&locale=en
@version VIYA V.03.04

View File

@@ -11,12 +11,14 @@
%mv_deletejes(path=/Public/test, name=blah)
@param path= The full path of the folder containing the item to be deleted
@param name= The name of the item to be deleted
@param contenttype= The contenttype of the item, eg: file, jobDefinition
@param access_token_var= The global macro variable to contain the access token
@param grant_type= valid values are "password" or "authorization_code" (unquoted).
The default is "detect" (which will run in Studio 5+ without a token).
@param [in] path= ()
The full path of the folder containing the item to be deleted
@param [in] name= The name of the item to be deleted
@param [in] contenttype= The contenttype of the item, eg: file, jobDefinition
@param [in] access_token_var= (ACCESS_TOKEN)
The global macro variable to contain the access token
@param [in] grant_type= (sas_services)
valid values are "password" or "authorization_code" (unquoted).
@version VIYA V.03.04

View File

@@ -11,11 +11,13 @@
%mv_deletejes(path=/Public/test, name=blah)
@param path= The full path of the folder containing the Job Execution Service
@param name= The name of the Job Execution Service to be deleted
@param access_token_var= The global macro variable to contain the access token
@param grant_type= valid values are "password" or "authorization_code" (unquoted).
The default is "detect" (which will run in Studio 5+ without a token).
@param [in] path= ()
The full path of the folder containing the Job Execution Service
@param [in] name= The name of the Job Execution Service to be deleted
@param [in] access_token_var= (ACCESS_TOKEN)
The global macro variable to contain the access token
@param [in] grant_type= (sas_services)
Valid values are "password" or "authorization_code" (unquoted).
@version VIYA V.03.04

View File

@@ -22,10 +22,8 @@
%mv_getclients()
@param access_token_var= The global macro variable to contain the access token
@param grant_type= valid values are "password" or "authorization_code" (unquoted).
The default is authorization_code.
@param outds= The library.dataset to be created that contains the list of groups
@param [out] outds= (work.mv_getclients)
The library.dataset to be created that contains the list of clients
@version VIYA V.03.04

View File

@@ -1,7 +1,7 @@
/**
@file mv_getgroupmembers.sas
@brief Creates a dataset with a list of group members
@details First, be sure you have an access token (which requires an app token).
@details First, be sure you have an access token (which requires an app token)
Using the macros here:
@@ -23,10 +23,13 @@
providerId char(5),
implicit num
@param access_token_var= The global macro variable to contain the access token
@param grant_type= valid values are "password" or "authorization_code" (unquoted).
The default is authorization_code.
@param outds= The library.dataset to be created that contains the list of groups
@param [in] group Group id for which to return group members
@param [in] access_token_var= (ACCESS_TOKEN)
The global macro variable to contain the access token
@param [in] grant_type= (sas_services)
valid values are "password" or "authorization_code" (unquoted).
@param [out] outds= (work.viyagroupmembers)
The library.dataset to be created that contains the list of group members
@version VIYA V.03.04

View File

@@ -11,10 +11,12 @@
%mv_getgroups(outds=work.groups)
@param [in] access_token_var= The global macro variable to contain the access token
@param [in] grant_type= valid values are "password" or "authorization_code" (unquoted).
The default is authorization_code.
@param [out] outds= The library.dataset to be created that contains the list of groups
@param [in] access_token_var= (ACCESS_TOKEN)
The global macro variable to contain the access token
@param [in] grant_type= (sas_services)
valid values are "password" or "authorization_code" (unquoted).
@param [out] outds= (work.viyagroups)
The library.dataset to be created that contains the list of groups
@version VIYA V.03.04

View File

@@ -50,7 +50,8 @@
%mv_getjobstate(uri=&uri,outds=results)
You can run this macro as part of a loop to await the final 'completed' status.
You can run this macro as part of a loop to await the final 'completed'
status.
The full list of status values is:
@li idle
@@ -63,12 +64,13 @@
If you have one or more jobs that you'd like to wait for completion you can
also use the [mv_jobwaitfor](/mv__jobwaitfor_8sas.html) macro.
@param [in] access_token_var= The global macro variable to contain the access token
@param [in] access_token_var= (ACCESS_TOKEN)
The global macro variable to contain the access token
@param [in] grant_type= valid values:
@li password
@li authorization_code
@li detect - will check if access_token exists, if not will use sas_services if
a SASStudioV session else authorization_code. Default option.
@li detect - will check if access_token exists, if not will use sas_services
if a SASStudioV session else authorization_code.
@li sas_services - will use oauth_bearer=sas_services.
@param [in] uri= The uri of the running job for which to fetch the status,
in the format `/jobExecution/jobs/$UUID/state` (unquoted).

View File

@@ -13,10 +13,13 @@
%mv_getusergroups(&sysuserid,outds=users)
@param access_token_var= The global macro variable to contain the access token
@param grant_type= valid values are "password" or "authorization_code" (unquoted).
The default is authorization_code.
@param outds= The library.dataset to be created that contains the list of groups
@param [in] user The username for which to return the list of groups
@param [in] access_token_var= (ACCESS_TOKEN)
The global macro variable to contain the access token
@param [in] grant_type= (sas_services)
Valid values are "password" or "authorization_code" (unquoted).
@param [out] outds= (work.mv_getusergroups)
The library.dataset to be created that contains the list of groups
@version VIYA V.03.04

View File

@@ -1,7 +1,7 @@
/**
@file mv_getusers.sas
@brief Creates a dataset with a list of users
@details First, be sure you have an access token (which requires an app token).
@details First, be sure you have an access token (which requires an app token)
Using the macros here:
@@ -35,15 +35,17 @@
modifiedTimeStamp char(24),
state char(6)
@param access_token_var= The global macro variable to contain the access token
@param grant_type= valid values:
@param [in] access_token_var= (ACCESS_TOKEN)
The global macro variable to contain the access token
@param [in] grant_type= (sas_services) Valid values:
* password
* authorization_code
* detect - will check if access_token exists, if not will use sas_services if
a SASStudioV session else authorization_code. Default option.
* detect - will check if access_token exists, if not will use sas_services
if a SASStudioV session else authorization_code.
* sas_services - will use oauth_bearer=sas_services
@param outds= The library.dataset to be created that contains the list of groups
@param [out] outds= (work.mv_getusers)
The library.dataset to be created that contains the list of groups
@version VIYA V.03.04

View File

@@ -28,20 +28,21 @@
https://blogs.sas.com/content/sgf/2019/01/25/authentication-to-sas-viya/
@param inds= A dataset containing client_id, client_secret, and auth_code
@param outds= A dataset containing access_token and refresh_token
@param client_id= The client name
@param client_secret= client secret
@param grant_type= valid values are "password" or "authorization_code"
@param [in] inds= A dataset containing client_id, client_secret, and auth_code
@param [in] outds= A dataset containing access_token and refresh_token
@param [in] client_id= The client name
@param [in] client_secret= client secret
@param [in] grant_type= valid values are "password" or "authorization_code"
(unquoted). The default is authorization_code.
@param code= If grant_type=authorization_code then provide the necessary code
here
@param user= If grant_type=password then provide the username here
@param pass= If grant_type=password then provide the password here
@param access_token_var= The global macro variable to contain the access token
@param refresh_token_var= The global macro variable to contain the refresh
token
@param base_uri= The Viya API server location
@param [in] code= ()
If grant_type=authorization_code then provide the necessary code here
@param [in] user= If grant_type=password then provide the username here
@param [in] pass= If grant_type=password then provide the password here
@param [in] access_token_var= (ACCESS_TOKEN)
The global macro variable to contain the access token
@param [in] refresh_token_var= (REFRESH_TOKEN)
The global macro variable to contain the refresh token
@param [in] base_uri= The Viya API server location
@version VIYA V.03.04
@author Allan Bowe, source: https://github.com/sasjs/core

View File

@@ -28,17 +28,18 @@
https://blogs.sas.com/content/sgf/2019/01/25/authentication-to-sas-viya/
@param inds= A dataset containing client_id and client_secret
@param outds= A dataset containing access_token and refresh_token
@param client_id= The client name (alternative to inds)
@param client_secret= client secret (alternative to inds)
@param grant_type= valid values are "password" or "authorization_code"
@param [in] inds= A dataset containing client_id and client_secret
@param [in] outds= A dataset containing access_token and refresh_token
@param [in] client_id= The client name (alternative to inds)
@param [in] client_secret= client secret (alternative to inds)
@param [in] grant_type= valid values are "password" or "authorization_code"
(unquoted). The default is authorization_code.
@param user= If grant_type=password then provide the username here
@param pass= If grant_type=password then provide the password here
@param access_token_var= The global macro variable to contain the access token
@param refresh_token_var= The global macro variable containing the refresh
token
@param [in] user= If grant_type=password then provide the username here
@param [in] pass= If grant_type=password then provide the password here
@param [in] access_token_var= (ACCESS_TOKEN)
The global macro variable to contain the access token
@param [in] refresh_token_var= (REFRESH_TOKEN)
The global macro variable containing the refresh token
@version VIYA V.03.04
@author Allan Bowe, source: https://github.com/sasjs/core