@sasjs/core 4.46.6 → 4.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +3 -2
  2. package/base/mf_abort.sas +5 -0
  3. package/base/mf_deletefile.sas +1 -1
  4. package/base/mf_existds.sas +1 -1
  5. package/base/mf_existfileref.sas +1 -1
  6. package/base/mf_existfunction.sas +1 -1
  7. package/base/mf_existvarlist.sas +2 -2
  8. package/base/mf_getapploc.sas +1 -0
  9. package/base/mf_getattrc.sas +2 -2
  10. package/base/mf_getattrn.sas +2 -2
  11. package/base/mf_getkeyvalue.sas +3 -2
  12. package/base/mf_getplatform.sas +1 -1
  13. package/base/mf_getschema.sas +1 -1
  14. package/base/mf_getuniquelibref.sas +1 -1
  15. package/base/mf_getuniquename.sas +1 -1
  16. package/base/mf_getuser.sas +0 -2
  17. package/base/mf_getvalue.sas +3 -3
  18. package/base/mf_getvarformat.sas +2 -1
  19. package/base/mf_getvarlen.sas +2 -2
  20. package/base/mf_getvarnum.sas +2 -2
  21. package/base/mf_getvartype.sas +2 -2
  22. package/base/mf_getxengine.sas +1 -1
  23. package/base/mf_increment.sas +2 -2
  24. package/base/mf_isblank.sas +1 -1
  25. package/base/mf_isdir.sas +1 -1
  26. package/base/mf_loc.sas +6 -1
  27. package/base/mf_mkdir.sas +1 -1
  28. package/base/mf_mval.sas +2 -0
  29. package/base/mf_nobs.sas +1 -1
  30. package/base/mf_trimstr.sas +2 -2
  31. package/base/mf_wordsinstr1andstr2.sas +2 -2
  32. package/base/mf_wordsinstr1butnotstr2.sas +2 -2
  33. package/base/mf_writefile.sas +2 -2
  34. package/base/mp_abort.sas +11 -10
  35. package/base/mp_aligndecimal.sas +2 -2
  36. package/base/mp_appendfile.sas +2 -2
  37. package/base/mp_assertcols.sas +2 -2
  38. package/base/mp_assertcolvals.sas +1 -1
  39. package/base/mp_base64copy.sas +2 -2
  40. package/base/mp_binarycopy.sas +7 -6
  41. package/base/mp_chop.sas +3 -2
  42. package/base/mp_cleancsv.sas +5 -4
  43. package/base/mp_copyfolder.sas +1 -1
  44. package/base/mp_createconstraints.sas +3 -3
  45. package/base/mp_createwebservice.sas +1 -1
  46. package/base/mp_csv2ds.sas +6 -5
  47. package/base/mp_deleteconstraints.sas +5 -3
  48. package/base/mp_deletefolder.sas +1 -1
  49. package/base/mp_dictionary.sas +1 -1
  50. package/base/mp_distinctfmtvalues.sas +5 -5
  51. package/base/mp_ds2ddl.sas +14 -2
  52. package/base/mp_dsmeta.sas +2 -2
  53. package/base/mp_filtercheck.sas +6 -4
  54. package/base/mp_filtergenerate.sas +2 -2
  55. package/base/mp_filterstore.sas +4 -3
  56. package/base/mp_getcols.sas +3 -2
  57. package/base/mp_getdbml.sas +4 -4
  58. package/base/mp_getddl.sas +15 -10
  59. package/base/mp_gsubfile.sas +6 -6
  60. package/base/mp_guesspk.sas +1 -1
  61. package/base/mp_hashdataset.sas +1 -1
  62. package/base/mp_lib2cards.sas +7 -7
  63. package/base/mp_md5.sas +2 -2
  64. package/base/mp_perflog.sas +3 -3
  65. package/base/mp_prevobs.sas +5 -5
  66. package/base/mp_recursivejoin.sas +7 -6
  67. package/base/mp_replace.sas +5 -4
  68. package/base/mp_runddl.sas +3 -3
  69. package/base/mp_searchcols.sas +7 -6
  70. package/base/mp_stprequests.sas +4 -3
  71. package/base/mp_testjob.sas +2 -2
  72. package/base/mp_testwritespeedlibrary.sas +3 -3
  73. package/base/mp_tree.sas +2 -2
  74. package/base/mp_unzip.sas +5 -4
  75. package/base/mp_updatevarlength.sas +3 -3
  76. package/base/mp_wait4file.sas +1 -1
  77. package/base/mp_webin.sas +1 -1
  78. package/base/mp_zip.sas +5 -5
  79. package/ddl/mddl_sas_cntlout.sas +12 -1
  80. package/meta/mm_adduser2group.sas +3 -3
  81. package/meta/mm_assigndirectlib.sas +10 -12
  82. package/meta/mm_assignlib.sas +2 -2
  83. package/meta/mm_createapplication.sas +13 -10
  84. package/meta/mm_createdataset.sas +5 -5
  85. package/meta/mm_createdocument.sas +7 -7
  86. package/meta/mm_createlibrary.sas +20 -17
  87. package/meta/mm_createstp.sas +22 -18
  88. package/meta/mm_createwebservice.sas +15 -14
  89. package/meta/mm_deletedocument.sas +1 -1
  90. package/meta/mm_deletelibrary.sas +1 -1
  91. package/meta/mm_deletestp.sas +1 -1
  92. package/meta/mm_getcols.sas +2 -2
  93. package/meta/mm_getdetails.sas +6 -3
  94. package/meta/mm_getdirectories.sas +4 -3
  95. package/meta/mm_getdocument.sas +4 -4
  96. package/meta/mm_getgroupmembers.sas +5 -5
  97. package/meta/mm_getlibs.sas +2 -2
  98. package/meta/mm_getobjects.sas +2 -2
  99. package/meta/mm_getpublictypes.sas +2 -0
  100. package/meta/mm_getrepos.sas +2 -1
  101. package/meta/mm_getroles.sas +2 -1
  102. package/meta/mm_getservercontexts.sas +2 -1
  103. package/meta/mm_getstps.sas +8 -7
  104. package/meta/mm_gettableid.sas +4 -4
  105. package/meta/mm_gettree.sas +4 -4
  106. package/meta/mm_gettypes.sas +2 -1
  107. package/meta/mm_getusers.sas +2 -4
  108. package/meta/mm_getwebappsrvprops.sas +1 -1
  109. package/meta/mm_tree.sas +3 -3
  110. package/meta/mm_updateappextension.sas +8 -8
  111. package/meta/mm_updatedocument.sas +6 -6
  112. package/meta/mm_updatestpservertype.sas +2 -2
  113. package/meta/mm_updatestpsourcecode.sas +6 -4
  114. package/metax/mmx_createmetafolder.sas +3 -3
  115. package/metax/mmx_deletemetafolder.sas +3 -3
  116. package/metax/mmx_spkexport.sas +6 -5
  117. package/package.json +1 -1
  118. package/viya/mfv_existfile.sas +2 -1
  119. package/viya/mfv_existfolder.sas +1 -1
  120. package/viya/mfv_existsashdat.sas +4 -4
  121. package/viya/mv_createjob.sas +16 -14
  122. package/viya/mv_deletefoldermember.sas +8 -6
  123. package/viya/mv_deletejes.sas +7 -5
  124. package/viya/mv_getclients.sas +2 -4
  125. package/viya/mv_getgroupmembers.sas +8 -5
  126. package/viya/mv_getgroups.sas +6 -4
  127. package/viya/mv_getjobstate.sas +6 -4
  128. package/viya/mv_getusergroups.sas +7 -4
  129. package/viya/mv_getusers.sas +8 -6
  130. package/viya/mv_registerclient.sas +4 -4
  131. package/viya/mv_tokenauth.sas +14 -13
  132. package/viya/mv_tokenrefresh.sas +11 -10
@@ -32,30 +32,32 @@
32
32
  @li mf_isblank.sas
33
33
  @li mv_deletejes.sas
34
34
 
35
- @param path= The full path (on SAS Drive) where the job will be created
36
- @param name= The name of the job
37
- @param desc= (Created by the mv_createjob.sas macro) The job description
38
- @param precode= Space separated list of filerefs, pointing to the code that
35
+ @param [in] path= The full path (on SAS Drive) where the job will be created
36
+ @param [in] name= The name of the job
37
+ @param [in] desc= (Created by the mv_createjob.sas macro) The job description
38
+ @param [in] precode= ()
39
+ Space separated list of filerefs, pointing to the code that
39
40
  needs to be attached to the beginning of the job
40
- @param code= (ft15f001) Fileref(s) of the actual code to be added
41
- @param access_token_var= (ACCESS_TOKEN) Global macro variable containing the
42
- access token
43
- @param grant_type= (sas_services) Valid values:
41
+ @param [in] code= (ft15f001) Fileref(s) of the actual code to be added
42
+ @param [in] access_token_var= (ACCESS_TOKEN)
43
+ Global macro variable containing the access token
44
+ @param [in] grant_type= (sas_services) Valid values:
44
45
  @li sas_services
45
46
  @li detect
46
47
  @li authorization_code
47
48
  @li password
48
- @param replace= (YES) select NO to avoid replacing any existing job
49
- @param addjesbeginendmacros= (false) Relates to the `_addjesbeginendmacros`
50
- setting. Normally this would always be false however due to a Viya bug
49
+ @param [in] replace= (YES) select NO to avoid replacing any existing job
50
+ @param [in] addjesbeginendmacros= (false)
51
+ Relates to the `_addjesbeginendmacros` setting.
52
+ Normally this would always be false however due to a Viya bug
51
53
  (https://github.com/sasjs/cli/issues/1229) this is now configurable. Valid
52
54
  values:
53
55
  @li true
54
56
  @li false
55
57
  @li 0 - this will prevent the flag from being set (job will default to true)
56
- @param contextname= Choose a specific context on which to run the Job. Leave
57
- blank to use the default context. From Viya 3.5 it is possible to configure
58
- a shared context - see
58
+ @param [in] contextname= () Choose a specific context on which to run the Job.
59
+ Leave blank to use the default context.
60
+ From Viya 3.5 it is possible to configure a shared context - see
59
61
  https://go.documentation.sas.com/?docsetId=calcontexts&docsetTarget=n1hjn8eobk5pyhn1wg3ja0drdl6h.htm&docsetVersion=3.5&locale=en
60
62
 
61
63
  @version VIYA V.03.04
@@ -11,12 +11,14 @@
11
11
  %mv_deletejes(path=/Public/test, name=blah)
12
12
 
13
13
 
14
- @param path= The full path of the folder containing the item to be deleted
15
- @param name= The name of the item to be deleted
16
- @param contenttype= The contenttype of the item, eg: file, jobDefinition
17
- @param access_token_var= The global macro variable to contain the access token
18
- @param grant_type= valid values are "password" or "authorization_code" (unquoted).
19
- The default is "detect" (which will run in Studio 5+ without a token).
14
+ @param [in] path= ()
15
+ The full path of the folder containing the item to be deleted
16
+ @param [in] name= The name of the item to be deleted
17
+ @param [in] contenttype= The contenttype of the item, eg: file, jobDefinition
18
+ @param [in] access_token_var= (ACCESS_TOKEN)
19
+ The global macro variable to contain the access token
20
+ @param [in] grant_type= (sas_services)
21
+ valid values are "password" or "authorization_code" (unquoted).
20
22
 
21
23
 
22
24
  @version VIYA V.03.04
@@ -11,11 +11,13 @@
11
11
  %mv_deletejes(path=/Public/test, name=blah)
12
12
 
13
13
 
14
- @param path= The full path of the folder containing the Job Execution Service
15
- @param name= The name of the Job Execution Service to be deleted
16
- @param access_token_var= The global macro variable to contain the access token
17
- @param grant_type= valid values are "password" or "authorization_code" (unquoted).
18
- The default is "detect" (which will run in Studio 5+ without a token).
14
+ @param [in] path= ()
15
+ The full path of the folder containing the Job Execution Service
16
+ @param [in] name= The name of the Job Execution Service to be deleted
17
+ @param [in] access_token_var= (ACCESS_TOKEN)
18
+ The global macro variable to contain the access token
19
+ @param [in] grant_type= (sas_services)
20
+ Valid values are "password" or "authorization_code" (unquoted).
19
21
 
20
22
 
21
23
  @version VIYA V.03.04
@@ -22,10 +22,8 @@
22
22
 
23
23
  %mv_getclients()
24
24
 
25
- @param access_token_var= The global macro variable to contain the access token
26
- @param grant_type= valid values are "password" or "authorization_code" (unquoted).
27
- The default is authorization_code.
28
- @param outds= The library.dataset to be created that contains the list of groups
25
+ @param [out] outds= (work.mv_getclients)
26
+ The library.dataset to be created that contains the list of clients
29
27
 
30
28
 
31
29
  @version VIYA V.03.04
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  @file mv_getgroupmembers.sas
3
3
  @brief Creates a dataset with a list of group members
4
- @details First, be sure you have an access token (which requires an app token).
4
+ @details First, be sure you have an access token (which requires an app token)
5
5
 
6
6
  Using the macros here:
7
7
 
@@ -23,10 +23,13 @@
23
23
  providerId char(5),
24
24
  implicit num
25
25
 
26
- @param access_token_var= The global macro variable to contain the access token
27
- @param grant_type= valid values are "password" or "authorization_code" (unquoted).
28
- The default is authorization_code.
29
- @param outds= The library.dataset to be created that contains the list of groups
26
+ @param [in] group Group id for which to return group members
27
+ @param [in] access_token_var= (ACCESS_TOKEN)
28
+ The global macro variable to contain the access token
29
+ @param [in] grant_type= (sas_services)
30
+ valid values are "password" or "authorization_code" (unquoted).
31
+ @param [out] outds= (work.viyagroupmembers)
32
+ The library.dataset to be created that contains the list of group members
30
33
 
31
34
 
32
35
  @version VIYA V.03.04
@@ -11,10 +11,12 @@
11
11
 
12
12
  %mv_getgroups(outds=work.groups)
13
13
 
14
- @param [in] access_token_var= The global macro variable to contain the access token
15
- @param [in] grant_type= valid values are "password" or "authorization_code" (unquoted).
16
- The default is authorization_code.
17
- @param [out] outds= The library.dataset to be created that contains the list of groups
14
+ @param [in] access_token_var= (ACCESS_TOKEN)
15
+ The global macro variable to contain the access token
16
+ @param [in] grant_type= (sas_services)
17
+ valid values are "password" or "authorization_code" (unquoted).
18
+ @param [out] outds= (work.viyagroups)
19
+ The library.dataset to be created that contains the list of groups
18
20
 
19
21
 
20
22
  @version VIYA V.03.04
@@ -50,7 +50,8 @@
50
50
 
51
51
  %mv_getjobstate(uri=&uri,outds=results)
52
52
 
53
- You can run this macro as part of a loop to await the final 'completed' status.
53
+ You can run this macro as part of a loop to await the final 'completed'
54
+ status.
54
55
  The full list of status values is:
55
56
 
56
57
  @li idle
@@ -63,12 +64,13 @@
63
64
  If you have one or more jobs that you'd like to wait for completion you can
64
65
  also use the [mv_jobwaitfor](/mv__jobwaitfor_8sas.html) macro.
65
66
 
66
- @param [in] access_token_var= The global macro variable to contain the access token
67
+ @param [in] access_token_var= (ACCESS_TOKEN)
68
+ The global macro variable to contain the access token
67
69
  @param [in] grant_type= valid values:
68
70
  @li password
69
71
  @li authorization_code
70
- @li detect - will check if access_token exists, if not will use sas_services if
71
- a SASStudioV session else authorization_code. Default option.
72
+ @li detect - will check if access_token exists, if not will use sas_services
73
+ if a SASStudioV session else authorization_code.
72
74
  @li sas_services - will use oauth_bearer=sas_services.
73
75
  @param [in] uri= The uri of the running job for which to fetch the status,
74
76
  in the format `/jobExecution/jobs/$UUID/state` (unquoted).
@@ -13,10 +13,13 @@
13
13
 
14
14
  %mv_getusergroups(&sysuserid,outds=users)
15
15
 
16
- @param access_token_var= The global macro variable to contain the access token
17
- @param grant_type= valid values are "password" or "authorization_code" (unquoted).
18
- The default is authorization_code.
19
- @param outds= The library.dataset to be created that contains the list of groups
16
+ @param [in] user The username for which to return the list of groups
17
+ @param [in] access_token_var= (ACCESS_TOKEN)
18
+ The global macro variable to contain the access token
19
+ @param [in] grant_type= (sas_services)
20
+ Valid values are "password" or "authorization_code" (unquoted).
21
+ @param [out] outds= (work.mv_getusergroups)
22
+ The library.dataset to be created that contains the list of groups
20
23
 
21
24
 
22
25
  @version VIYA V.03.04
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  @file mv_getusers.sas
3
3
  @brief Creates a dataset with a list of users
4
- @details First, be sure you have an access token (which requires an app token).
4
+ @details First, be sure you have an access token (which requires an app token)
5
5
 
6
6
  Using the macros here:
7
7
 
@@ -35,15 +35,17 @@
35
35
  modifiedTimeStamp char(24),
36
36
  state char(6)
37
37
 
38
- @param access_token_var= The global macro variable to contain the access token
39
- @param grant_type= valid values:
38
+ @param [in] access_token_var= (ACCESS_TOKEN)
39
+ The global macro variable to contain the access token
40
+ @param [in] grant_type= (sas_services) Valid values:
40
41
  * password
41
42
  * authorization_code
42
- * detect - will check if access_token exists, if not will use sas_services if
43
- a SASStudioV session else authorization_code. Default option.
43
+ * detect - will check if access_token exists, if not will use sas_services
44
+ if a SASStudioV session else authorization_code.
44
45
  * sas_services - will use oauth_bearer=sas_services
45
46
 
46
- @param outds= The library.dataset to be created that contains the list of groups
47
+ @param [out] outds= (work.mv_getusers)
48
+ The library.dataset to be created that contains the list of groups
47
49
 
48
50
 
49
51
  @version VIYA V.03.04
@@ -25,12 +25,12 @@
25
25
  "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
26
26
  %inc mc;
27
27
 
28
+ %* generate random client details with openid scope;
29
+ %mv_registerclient(scopes=openid )
30
+
28
31
  %* generate random client using consul token as input parameter;
29
32
  %mv_registerclient(consul_token=12x34sa43v2345n234lasd)
30
33
 
31
- %* generate random client details with all scopes;
32
- %mv_registerclient(scopes=openid *)
33
-
34
34
  %* specific client with just openid scope;
35
35
  %mv_registerclient(client_id=YourClient
36
36
  ,client_secret=YourSecret
@@ -38,7 +38,7 @@
38
38
  )
39
39
 
40
40
  %* generate random client with 90/180 second access/refresh token expiry;
41
- %mv_registerclient(scopes=openid *
41
+ %mv_registerclient(scopes=openid
42
42
  ,access_token_validity=90
43
43
  ,refresh_token_validity=180
44
44
  )
@@ -28,20 +28,21 @@
28
28
 
29
29
  https://blogs.sas.com/content/sgf/2019/01/25/authentication-to-sas-viya/
30
30
 
31
- @param inds= A dataset containing client_id, client_secret, and auth_code
32
- @param outds= A dataset containing access_token and refresh_token
33
- @param client_id= The client name
34
- @param client_secret= client secret
35
- @param grant_type= valid values are "password" or "authorization_code"
31
+ @param [in] inds= A dataset containing client_id, client_secret, and auth_code
32
+ @param [in] outds= A dataset containing access_token and refresh_token
33
+ @param [in] client_id= The client name
34
+ @param [in] client_secret= client secret
35
+ @param [in] grant_type= valid values are "password" or "authorization_code"
36
36
  (unquoted). The default is authorization_code.
37
- @param code= If grant_type=authorization_code then provide the necessary code
38
- here
39
- @param user= If grant_type=password then provide the username here
40
- @param pass= If grant_type=password then provide the password here
41
- @param access_token_var= The global macro variable to contain the access token
42
- @param refresh_token_var= The global macro variable to contain the refresh
43
- token
44
- @param base_uri= The Viya API server location
37
+ @param [in] code= ()
38
+ If grant_type=authorization_code then provide the necessary code here
39
+ @param [in] user= If grant_type=password then provide the username here
40
+ @param [in] pass= If grant_type=password then provide the password here
41
+ @param [in] access_token_var= (ACCESS_TOKEN)
42
+ The global macro variable to contain the access token
43
+ @param [in] refresh_token_var= (REFRESH_TOKEN)
44
+ The global macro variable to contain the refresh token
45
+ @param [in] base_uri= The Viya API server location
45
46
 
46
47
  @version VIYA V.03.04
47
48
  @author Allan Bowe, source: https://github.com/sasjs/core
@@ -28,17 +28,18 @@
28
28
 
29
29
  https://blogs.sas.com/content/sgf/2019/01/25/authentication-to-sas-viya/
30
30
 
31
- @param inds= A dataset containing client_id and client_secret
32
- @param outds= A dataset containing access_token and refresh_token
33
- @param client_id= The client name (alternative to inds)
34
- @param client_secret= client secret (alternative to inds)
35
- @param grant_type= valid values are "password" or "authorization_code"
31
+ @param [in] inds= A dataset containing client_id and client_secret
32
+ @param [in] outds= A dataset containing access_token and refresh_token
33
+ @param [in] client_id= The client name (alternative to inds)
34
+ @param [in] client_secret= client secret (alternative to inds)
35
+ @param [in] grant_type= valid values are "password" or "authorization_code"
36
36
  (unquoted). The default is authorization_code.
37
- @param user= If grant_type=password then provide the username here
38
- @param pass= If grant_type=password then provide the password here
39
- @param access_token_var= The global macro variable to contain the access token
40
- @param refresh_token_var= The global macro variable containing the refresh
41
- token
37
+ @param [in] user= If grant_type=password then provide the username here
38
+ @param [in] pass= If grant_type=password then provide the password here
39
+ @param [in] access_token_var= (ACCESS_TOKEN)
40
+ The global macro variable to contain the access token
41
+ @param [in] refresh_token_var= (REFRESH_TOKEN)
42
+ The global macro variable containing the refresh token
42
43
 
43
44
  @version VIYA V.03.04
44
45
  @author Allan Bowe, source: https://github.com/sasjs/core