@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.
- package/README.md +3 -2
- package/base/mf_abort.sas +5 -0
- package/base/mf_deletefile.sas +1 -1
- package/base/mf_existds.sas +1 -1
- package/base/mf_existfileref.sas +1 -1
- package/base/mf_existfunction.sas +1 -1
- package/base/mf_existvarlist.sas +2 -2
- package/base/mf_getapploc.sas +1 -0
- package/base/mf_getattrc.sas +2 -2
- package/base/mf_getattrn.sas +2 -2
- package/base/mf_getkeyvalue.sas +3 -2
- package/base/mf_getplatform.sas +1 -1
- package/base/mf_getschema.sas +1 -1
- package/base/mf_getuniquelibref.sas +1 -1
- package/base/mf_getuniquename.sas +1 -1
- package/base/mf_getuser.sas +0 -2
- package/base/mf_getvalue.sas +3 -3
- package/base/mf_getvarformat.sas +2 -1
- package/base/mf_getvarlen.sas +2 -2
- package/base/mf_getvarnum.sas +2 -2
- package/base/mf_getvartype.sas +2 -2
- package/base/mf_getxengine.sas +1 -1
- package/base/mf_increment.sas +2 -2
- package/base/mf_isblank.sas +1 -1
- package/base/mf_isdir.sas +1 -1
- package/base/mf_loc.sas +6 -1
- package/base/mf_mkdir.sas +1 -1
- package/base/mf_mval.sas +2 -0
- package/base/mf_nobs.sas +1 -1
- package/base/mf_trimstr.sas +2 -2
- package/base/mf_wordsinstr1andstr2.sas +2 -2
- package/base/mf_wordsinstr1butnotstr2.sas +2 -2
- package/base/mf_writefile.sas +2 -2
- package/base/mp_abort.sas +11 -10
- package/base/mp_aligndecimal.sas +2 -2
- package/base/mp_appendfile.sas +2 -2
- package/base/mp_assertcols.sas +2 -2
- package/base/mp_assertcolvals.sas +1 -1
- package/base/mp_base64copy.sas +2 -2
- package/base/mp_binarycopy.sas +7 -6
- package/base/mp_chop.sas +3 -2
- package/base/mp_cleancsv.sas +5 -4
- package/base/mp_copyfolder.sas +1 -1
- package/base/mp_createconstraints.sas +3 -3
- package/base/mp_createwebservice.sas +1 -1
- package/base/mp_csv2ds.sas +6 -5
- package/base/mp_deleteconstraints.sas +5 -3
- package/base/mp_deletefolder.sas +1 -1
- package/base/mp_dictionary.sas +1 -1
- package/base/mp_distinctfmtvalues.sas +5 -5
- package/base/mp_ds2ddl.sas +14 -2
- package/base/mp_dsmeta.sas +2 -2
- package/base/mp_filtercheck.sas +6 -4
- package/base/mp_filtergenerate.sas +2 -2
- package/base/mp_filterstore.sas +4 -3
- package/base/mp_getcols.sas +3 -2
- package/base/mp_getdbml.sas +4 -4
- package/base/mp_getddl.sas +15 -10
- package/base/mp_gsubfile.sas +6 -6
- package/base/mp_guesspk.sas +1 -1
- package/base/mp_hashdataset.sas +1 -1
- package/base/mp_lib2cards.sas +7 -7
- package/base/mp_md5.sas +2 -2
- package/base/mp_perflog.sas +3 -3
- package/base/mp_prevobs.sas +5 -5
- package/base/mp_recursivejoin.sas +7 -6
- package/base/mp_replace.sas +5 -4
- package/base/mp_runddl.sas +3 -3
- package/base/mp_searchcols.sas +7 -6
- package/base/mp_stprequests.sas +4 -3
- package/base/mp_testjob.sas +2 -2
- package/base/mp_testwritespeedlibrary.sas +3 -3
- package/base/mp_tree.sas +2 -2
- package/base/mp_unzip.sas +5 -4
- package/base/mp_updatevarlength.sas +3 -3
- package/base/mp_wait4file.sas +1 -1
- package/base/mp_webin.sas +1 -1
- package/base/mp_zip.sas +5 -5
- package/ddl/mddl_sas_cntlout.sas +12 -1
- package/meta/mm_adduser2group.sas +3 -3
- package/meta/mm_assigndirectlib.sas +10 -12
- package/meta/mm_assignlib.sas +2 -2
- package/meta/mm_createapplication.sas +13 -10
- package/meta/mm_createdataset.sas +5 -5
- package/meta/mm_createdocument.sas +7 -7
- package/meta/mm_createlibrary.sas +20 -17
- package/meta/mm_createstp.sas +22 -18
- package/meta/mm_createwebservice.sas +15 -14
- package/meta/mm_deletedocument.sas +1 -1
- package/meta/mm_deletelibrary.sas +1 -1
- package/meta/mm_deletestp.sas +1 -1
- package/meta/mm_getcols.sas +2 -2
- package/meta/mm_getdetails.sas +6 -3
- package/meta/mm_getdirectories.sas +4 -3
- package/meta/mm_getdocument.sas +4 -4
- package/meta/mm_getgroupmembers.sas +5 -5
- package/meta/mm_getlibs.sas +2 -2
- package/meta/mm_getobjects.sas +2 -2
- package/meta/mm_getpublictypes.sas +2 -0
- package/meta/mm_getrepos.sas +2 -1
- package/meta/mm_getroles.sas +2 -1
- package/meta/mm_getservercontexts.sas +2 -1
- package/meta/mm_getstps.sas +8 -7
- package/meta/mm_gettableid.sas +4 -4
- package/meta/mm_gettree.sas +4 -4
- package/meta/mm_gettypes.sas +2 -1
- package/meta/mm_getusers.sas +2 -4
- package/meta/mm_getwebappsrvprops.sas +1 -1
- package/meta/mm_tree.sas +3 -3
- package/meta/mm_updateappextension.sas +8 -8
- package/meta/mm_updatedocument.sas +6 -6
- package/meta/mm_updatestpservertype.sas +2 -2
- package/meta/mm_updatestpsourcecode.sas +6 -4
- package/metax/mmx_createmetafolder.sas +3 -3
- package/metax/mmx_deletemetafolder.sas +3 -3
- package/metax/mmx_spkexport.sas +6 -5
- package/package.json +1 -1
- package/viya/mfv_existfile.sas +2 -1
- package/viya/mfv_existfolder.sas +1 -1
- package/viya/mfv_existsashdat.sas +4 -4
- package/viya/mv_createjob.sas +16 -14
- package/viya/mv_deletefoldermember.sas +8 -6
- package/viya/mv_deletejes.sas +7 -5
- package/viya/mv_getclients.sas +2 -4
- package/viya/mv_getgroupmembers.sas +8 -5
- package/viya/mv_getgroups.sas +6 -4
- package/viya/mv_getjobstate.sas +6 -4
- package/viya/mv_getusergroups.sas +7 -4
- package/viya/mv_getusers.sas +8 -6
- package/viya/mv_registerclient.sas +4 -4
- package/viya/mv_tokenauth.sas +14 -13
- package/viya/mv_tokenrefresh.sas +11 -10
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
%mp_distinctfmtvalues(libds=sashelp.class,var=age,outvar=age,outds=test)
|
|
9
9
|
|
|
10
|
-
@param libds input dataset
|
|
11
|
-
@param var variable to get distinct values for
|
|
12
|
-
@param outvar variable to create.
|
|
13
|
-
@param outds dataset to create.
|
|
14
|
-
@param varlen length of variable to create
|
|
10
|
+
@param [in] libds= () input dataset
|
|
11
|
+
@param [in] var= (0) variable to get distinct values for
|
|
12
|
+
@param [out] outvar= (formatteed_value) variable to create.
|
|
13
|
+
@param [out] outds= (work.mp_distinctfmtvalues) dataset to create.
|
|
14
|
+
@param [in] varlen= (2000) length of variable to create
|
|
15
15
|
|
|
16
16
|
@version 9.2
|
|
17
17
|
@author Allan Bowe
|
package/base/mp_ds2ddl.sas
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
@file
|
|
3
|
-
@brief
|
|
4
|
-
@details
|
|
3
|
+
@brief Fetches DDL for a specific table
|
|
4
|
+
@details Uses mp_getddl under the hood
|
|
5
5
|
|
|
6
|
+
@param [in] libds library.dataset to create ddl for
|
|
7
|
+
@param [in] fref= (getddl) the fileref to which to _append_ the DDL. If it
|
|
8
|
+
does not exist, it will be created.
|
|
9
|
+
@param [in] flavour= (SAS) The type of DDL to create. Options:
|
|
10
|
+
@li SAS
|
|
11
|
+
@li TSQL
|
|
12
|
+
|
|
13
|
+
@param [in]showlog= (NO) Set to YES to show the DDL in the log
|
|
14
|
+
@param [in] schema= () Choose a preferred schema name (default is to use
|
|
15
|
+
actual schema, else libref)
|
|
16
|
+
@param [in] applydttm= (NO) For non SAS DDL, choose if columns are created with
|
|
17
|
+
native datetime2 format or regular decimal type
|
|
6
18
|
|
|
7
19
|
<h4> SAS Macros </h4>
|
|
8
20
|
@li mp_getddl.sas
|
package/base/mp_dsmeta.sas
CHANGED
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
https://support.sas.com/resources/papers/proceedings14/1549-2014.pdf) by
|
|
50
50
|
[Louise Hadden](https://www.linkedin.com/in/louisehadden/).
|
|
51
51
|
|
|
52
|
-
@param libds The library.dataset to export the metadata for
|
|
53
|
-
@param outds= (work.dsmeta) The output table to contain the metadata
|
|
52
|
+
@param [in] libds The library.dataset to export the metadata for
|
|
53
|
+
@param [out] outds= (work.dsmeta) The output table to contain the metadata
|
|
54
54
|
|
|
55
55
|
<h4> Related Files </h4>
|
|
56
56
|
@li mp_dsmeta.test.sas
|
package/base/mp_filtercheck.sas
CHANGED
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
@param [in] targetds= The target dataset against which to verify VARIABLE_NM.
|
|
38
38
|
This must be available (ie, the library must be assigned).
|
|
39
39
|
@param [out] abort= (YES) If YES will call mp_abort.sas on any exceptions
|
|
40
|
-
@param [out] outds= The output table, which is a copy of the
|
|
41
|
-
plus a REASON_CD column, containing only bad records.
|
|
42
|
-
the SYSCC value will be set to 1008
|
|
43
|
-
|
|
40
|
+
@param [out] outds= (work.badrecords) The output table, which is a copy of the
|
|
41
|
+
&inds. table plus a REASON_CD column, containing only bad records.
|
|
42
|
+
If bad records are found, the SYSCC value will be set to 1008
|
|
43
|
+
(a general data problem).
|
|
44
|
+
Downstream processes should check this table (and return code) before
|
|
45
|
+
continuing.
|
|
44
46
|
|
|
45
47
|
<h4> SAS Macros </h4>
|
|
46
48
|
@li mp_abort.sas
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
> )
|
|
52
52
|
|
|
53
53
|
@param [in] inds The input table with query values
|
|
54
|
-
@param [out] outref= The output fileref to contain the filter clause.
|
|
55
|
-
be created (or replaced).
|
|
54
|
+
@param [out] outref= (filter) The output fileref to contain the filter clause.
|
|
55
|
+
Will be created (or replaced).
|
|
56
56
|
|
|
57
57
|
<h4> Related Macros </h4>
|
|
58
58
|
@li mp_filtercheck.sas
|
package/base/mp_filterstore.sas
CHANGED
|
@@ -44,9 +44,10 @@
|
|
|
44
44
|
mp_coretable.sas as follows: `mp_coretable(LOCKTABLE)`.
|
|
45
45
|
@param [in] maxkeytable= (0) Optional permanent reference table used for
|
|
46
46
|
retained key tracking. Described in mp_retainedkey.sas.
|
|
47
|
-
@param [in] mdebug= set to 1 to enable DEBUG messages
|
|
48
|
-
@param [out] outresult= The result table with the FILTER_RK
|
|
49
|
-
@param [out] outquery= The original query, taken as extract
|
|
47
|
+
@param [in] mdebug= (1) set to 1 to enable DEBUG messages
|
|
48
|
+
@param [out] outresult= (work.result) The result table with the FILTER_RK
|
|
49
|
+
@param [out] outquery= (work.query) The original query, taken as extract
|
|
50
|
+
after table load
|
|
50
51
|
|
|
51
52
|
|
|
52
53
|
<h4> SAS Macros </h4>
|
package/base/mp_getcols.sas
CHANGED
|
@@ -12,14 +12,15 @@
|
|
|
12
12
|
|
|
13
13
|
%mp_getcols(sashelp.airline,outds=work.myds)
|
|
14
14
|
|
|
15
|
-
@param ds The dataset from which to obtain column metadata
|
|
16
|
-
@param outds= (work.cols) The output dataset to create. Sample data:
|
|
15
|
+
@param [in] ds The dataset from which to obtain column metadata
|
|
16
|
+
@param [out] outds= (work.cols) The output dataset to create. Sample data:
|
|
17
17
|
|NAME:$32.|LENGTH:best.|VARNUM:best.|LABEL:$256.|FMTNAME:$32.|FORMAT:$49.|TYPE:$1.|DDTYPE:$9.|
|
|
18
18
|
|---|---|---|---|---|---|---|---|
|
|
19
19
|
|`AIR `|`8 `|`2 `|`international airline travel (thousands) `|` `|`8. `|`N `|`NUMERIC `|
|
|
20
20
|
|`DATE `|`8 `|`1 `|`DATE `|`MONYY `|`MONYY. `|`N `|`DATE `|
|
|
21
21
|
|`REGION `|`3 `|`3 `|`REGION `|` `|`$3. `|`C `|`CHARACTER `|
|
|
22
22
|
|
|
23
|
+
|
|
23
24
|
<h4> Related Macros </h4>
|
|
24
25
|
@li mf_getvarlist.sas
|
|
25
26
|
@li mm_getcols.sas
|
package/base/mp_getdbml.sas
CHANGED
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
@li mf_getquotedstr.sas
|
|
24
24
|
@li mp_getconstraints.sas
|
|
25
25
|
|
|
26
|
-
@param liblist= Space seperated list of librefs to take as
|
|
27
|
-
input
|
|
28
|
-
@param outref= Fileref to contain the DBML
|
|
29
|
-
@param showlog= set to YES to show the DBML in the log
|
|
26
|
+
@param [in] liblist= (SASHELP) Space seperated list of librefs to take as
|
|
27
|
+
input
|
|
28
|
+
@param [out] outref= (getdbml) Fileref to contain the DBML
|
|
29
|
+
@param [in] showlog= (NO) set to YES to show the DBML in the log
|
|
30
30
|
|
|
31
31
|
@version 9.3
|
|
32
32
|
@author Allan Bowe
|
package/base/mp_getddl.sas
CHANGED
|
@@ -22,16 +22,21 @@
|
|
|
22
22
|
@li mf_getvarcount.sas
|
|
23
23
|
@li mp_getconstraints.sas
|
|
24
24
|
|
|
25
|
-
@param
|
|
26
|
-
|
|
27
|
-
@param
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@param
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
@param [in] libref Libref of the library to create DDL for. Should already
|
|
26
|
+
be assigned.
|
|
27
|
+
@param [in] ds dataset to create ddl for (optional)
|
|
28
|
+
@param [in] fref= (getddl) the fileref to which to _append_ the DDL. If it
|
|
29
|
+
does not exist, it will be created.
|
|
30
|
+
@param [in] flavour= (SAS) The type of DDL to create. Options:
|
|
31
|
+
@li SAS
|
|
32
|
+
@li TSQL
|
|
33
|
+
|
|
34
|
+
@param [in]showlog= (NO) Set to YES to show the DDL in the log
|
|
35
|
+
@param [in] schema= () Choose a preferred schema name (default is to use
|
|
36
|
+
actual schema, else libref)
|
|
37
|
+
@param [in] applydttm= (NO) For non SAS DDL, choose if columns are created
|
|
38
|
+
with native datetime2 format or regular decimal type
|
|
39
|
+
|
|
35
40
|
@version 9.3
|
|
36
41
|
@author Allan Bowe
|
|
37
42
|
**/
|
package/base/mp_gsubfile.sas
CHANGED
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
list;
|
|
23
23
|
run;
|
|
24
24
|
|
|
25
|
-
@param file= (0) The file to perform the substitution on
|
|
26
|
-
@param patternvar= A macro variable containing the Lua
|
|
25
|
+
@param [in] file= (0) The file to perform the substitution on
|
|
26
|
+
@param [in] patternvar= A macro variable containing the Lua
|
|
27
27
|
[pattern](https://www.lua.org/pil/20.2.html) to search for. Due to the use
|
|
28
28
|
of special (magic) characters in Lua patterns, it is safer to pass the NAME
|
|
29
29
|
of the macro variable containing the string, rather than the value itself.
|
|
30
|
-
@param replacevar=
|
|
31
|
-
_string_.
|
|
32
|
-
@param outfile= (0) The file to write the output to.
|
|
33
|
-
is overwritten in-place.
|
|
30
|
+
@param [in] replacevar= ()
|
|
31
|
+
The name of the macro variable containing the replacement _string_.
|
|
32
|
+
@param [out] outfile= (0) The file to write the output to.
|
|
33
|
+
If zero, then the file is overwritten in-place.
|
|
34
34
|
|
|
35
35
|
<h4> SAS Macros </h4>
|
|
36
36
|
@li ml_gsubfile.sas
|
package/base/mp_guesspk.sas
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
%mp_guesspk(sashelp.class,outds=classpks)
|
|
19
19
|
|
|
20
20
|
@param [in] baseds The dataset to analyse
|
|
21
|
-
@param [out] outds=
|
|
21
|
+
@param [out] outds= (mp_guesspk) Output dataset to contain the possible PKs
|
|
22
22
|
@param [in] max_guesses= (3) The total number of possible primary keys to
|
|
23
23
|
generate. A table may have multiple (unlikely) PKs, so no need to list them
|
|
24
24
|
all.
|
package/base/mp_hashdataset.sas
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
@li mp_hashdirectory.sas
|
|
25
25
|
|
|
26
26
|
@param [in] libds dataset to hash
|
|
27
|
-
@param [in] salt= Provide a salt (could be, for instance, the dataset name)
|
|
27
|
+
@param [in] salt= () Provide a salt (could be, for instance, the dataset name)
|
|
28
28
|
@param [in] iftrue= (1=1) A condition under which the macro should be executed
|
|
29
29
|
@param [out] outds= (work._data_) The output dataset to create. This
|
|
30
30
|
will contain one column (hashkey) with one observation (a $hex32.
|
package/base/mp_lib2cards.sas
CHANGED
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
@li mf_trimstr.sas
|
|
25
25
|
@li mp_ds2cards.sas
|
|
26
26
|
|
|
27
|
-
@param [in] lib= Library in which to convert all datasets
|
|
28
|
-
@param [out] outloc= Location in which to store
|
|
29
|
-
|
|
30
|
-
@param [out] outfile= Optional output file NAME - if provided, then
|
|
31
|
-
|
|
32
|
-
@param [in] maxobs= limit output to the first <code>maxobs</code>
|
|
27
|
+
@param [in] lib= () Library in which to convert all datasets
|
|
28
|
+
@param [out] outloc= (%sysfunc(pathname(work))) Location in which to store
|
|
29
|
+
output. No quotes.
|
|
30
|
+
@param [out] outfile= (0) Optional output file NAME - if provided, then
|
|
31
|
+
will create a single output file instead of one file per input table.
|
|
32
|
+
@param [in] maxobs= (max) limit output to the first <code>maxobs</code> rows
|
|
33
33
|
|
|
34
34
|
@version 9.2
|
|
35
35
|
@author Allan Bowe
|
|
36
36
|
**/
|
|
37
37
|
|
|
38
38
|
%macro mp_lib2cards(lib=
|
|
39
|
-
,outloc=%sysfunc(pathname(work))
|
|
39
|
+
,outloc=%sysfunc(pathname(work))
|
|
40
40
|
,maxobs=max
|
|
41
41
|
,random_sample=NO
|
|
42
42
|
,outfile=0
|
package/base/mp_md5.sas
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
@li Global option: `options dsoptions=nonote2err;`
|
|
29
29
|
@li Data step option: `data YOURLIB.YOURDATASET /nonote2err;`
|
|
30
30
|
|
|
31
|
-
@param cvars= Space seperated list of character variables
|
|
32
|
-
@param nvars= Space seperated list of numeric variables
|
|
31
|
+
@param [in] cvars= () Space seperated list of character variables
|
|
32
|
+
@param [in] nvars= () Space seperated list of numeric variables
|
|
33
33
|
|
|
34
34
|
<h4> Related Programs </h4>
|
|
35
35
|
@li mp_init.sas
|
package/base/mp_perflog.sas
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
%mp_perflog(finished)
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@param label Provide label to go into the control dataset
|
|
15
|
-
@param libds= Provide a dataset in which to store
|
|
16
|
-
|
|
14
|
+
@param [in] label Provide label to go into the control dataset
|
|
15
|
+
@param [in] libds= (work.mp_perflog) Provide a dataset in which to store
|
|
16
|
+
performance stats. Default name is <code>work.mp_perflog</code>;
|
|
17
17
|
|
|
18
18
|
@version 9.2
|
|
19
19
|
@author Allan Bowe
|
package/base/mp_prevobs.sas
CHANGED
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
Credit is made to `data _null_` for authoring this very helpful paper:
|
|
35
35
|
https://www.lexjansen.com/pharmasug/2008/cc/CC08.pdf
|
|
36
36
|
|
|
37
|
-
@param action Either FETCH a current or previous record, or INITialise.
|
|
38
|
-
@param record The relative (to current) position of the previous
|
|
37
|
+
@param [in] action Either FETCH a current or previous record, or INITialise.
|
|
38
|
+
@param [in] record The relative (to current) position of the previous row
|
|
39
39
|
to return.
|
|
40
|
-
@param history= The number of records to retain in the hash table.
|
|
41
|
-
@param prefix=
|
|
42
|
-
and index.
|
|
40
|
+
@param [in] history= (5) The number of records to retain in the hash table.
|
|
41
|
+
@param [in] prefix= (mp_prevobs) The prefix to give to the variables used to
|
|
42
|
+
store the hash name and index.
|
|
43
43
|
|
|
44
44
|
@version 9.2
|
|
45
45
|
@author Allan Bowe
|
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
,childvar=c
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
-
@param base_ds= base table containing hierarchy (not modified)
|
|
27
|
-
@param outds= the output dataset to create with the generated hierarchy
|
|
28
|
-
@param matchval= the ultimate parent from which to filter
|
|
29
|
-
@param parentvar= name of the parent variable
|
|
30
|
-
@param childvar= name of the child variable (should be same type as
|
|
31
|
-
|
|
26
|
+
@param [in] base_ds= base table containing hierarchy (not modified)
|
|
27
|
+
@param [out] outds= the output dataset to create with the generated hierarchy
|
|
28
|
+
@param [in] matchval= the ultimate parent from which to filter
|
|
29
|
+
@param [in] parentvar= name of the parent variable
|
|
30
|
+
@param [in] childvar= () name of the child variable (should be same type as
|
|
31
|
+
parent)
|
|
32
|
+
@param [in] mdebug= set to 1 to prevent temp tables being dropped
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
@returns outds contains the following variables:
|
package/base/mp_replace.sas
CHANGED
|
@@ -32,10 +32,11 @@
|
|
|
32
32
|
Note - if you are running a version of SAS that will allow the io package in
|
|
33
33
|
LUA, you can also use this macro: mp_gsubfile.sas
|
|
34
34
|
|
|
35
|
-
@param infile The QUOTED path to the file on which to perform the
|
|
36
|
-
|
|
37
|
-
@param
|
|
38
|
-
@param
|
|
35
|
+
@param [in] infile The QUOTED path to the file on which to perform the
|
|
36
|
+
substitution
|
|
37
|
+
@param [in] findvar= Macro variable NAME containing the string to search for
|
|
38
|
+
@param [in] replacevar= Macro variable NAME containing the replacement string
|
|
39
|
+
@param [out] outfile= (0) Optional QUOTED path to the adjusted output file (to
|
|
39
40
|
avoid overwriting the first file).
|
|
40
41
|
|
|
41
42
|
<h4> SAS Macros </h4>
|
package/base/mp_runddl.sas
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
%mp_runddl(/some/rootlib, exc=LIBREF3) * same as above ;
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
@param path location of the DDL folder structure
|
|
35
|
-
@param inc= list of librefs to include
|
|
36
|
-
@param exc= list of librefs to exclude (takes precedence over inc=)
|
|
34
|
+
@param [in] path location of the DDL folder structure
|
|
35
|
+
@param [in] inc= list of librefs to include
|
|
36
|
+
@param [in] exc= list of librefs to exclude (takes precedence over inc=)
|
|
37
37
|
|
|
38
38
|
@version 9.3
|
|
39
39
|
@author Allan Bowe
|
package/base/mp_searchcols.sas
CHANGED
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
%mp_searchcols(libs=sashelp work, cols=name sex age)
|
|
11
11
|
|
|
12
|
-
@param libs=(SASHELP)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
@param [in] libs= (SASHELP)
|
|
13
|
+
Space separated list of libraries to search for columns
|
|
14
|
+
@param [in] cols=
|
|
15
|
+
Space separated list of column names to search for (not case sensitive)
|
|
16
|
+
@param [out] outds= (mp_searchcols)
|
|
17
|
+
The table to create with the results. Will have one line per table match.
|
|
18
|
+
@param [in] match= (ANY) The match type. Valid values:
|
|
18
19
|
@li ANY - The table contains at least one of the columns
|
|
19
20
|
@li WILD - The table contains a column with a name that partially matches
|
|
20
21
|
|
package/base/mp_stprequests.sas
CHANGED
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
%mp_stprequests(status_cd=INIT, libds=YOURLIB.DATASET )
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
@param status_cd= Use INIT for INIT and TERM for TERM events
|
|
25
|
-
@param libds= Location of base table
|
|
26
|
-
of table locks, we HIGHLY recommend
|
|
24
|
+
@param [in] status_cd= Use INIT for INIT and TERM for TERM events
|
|
25
|
+
@param [in] libds= (somelib.stp_requests) Location of base table
|
|
26
|
+
(library.dataset). To minimise risk of table locks, we HIGHLY recommend
|
|
27
|
+
using a database (NOT a SAS dataset).
|
|
27
28
|
THE LIBRARY SHOULD BE ASSIGNED ALREADY - eg in autoexec or earlier in the
|
|
28
29
|
init program proper.
|
|
29
30
|
|
package/base/mp_testjob.sas
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
duration=60*5
|
|
9
9
|
)
|
|
10
10
|
|
|
11
|
-
@param [in] duration=
|
|
12
|
-
|
|
11
|
+
@param [in] duration= (30) The time in seconds which the job should run for.
|
|
12
|
+
Actual time may vary, as the check is done in between steps.
|
|
13
13
|
|
|
14
14
|
<h4> SAS Macros </h4>
|
|
15
15
|
@li mf_getuniquelibref.sas
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
,outds=work.results
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
-
@param lib= (WORK) The library in which to create the table
|
|
15
|
-
@param size= (0.1) The size in GB of the table to create
|
|
16
|
-
@param outds= (WORK.RESULTS) The output dataset to be created.
|
|
14
|
+
@param [in] lib= (WORK) The library in which to create the table
|
|
15
|
+
@param [in] size= (0.1) The size in GB of the table to create
|
|
16
|
+
@param [out] outds= (WORK.RESULTS) The output dataset to be created.
|
|
17
17
|
|
|
18
18
|
<h4> SAS Macros </h4>
|
|
19
19
|
@li mf_getuniquename.sas
|
package/base/mp_tree.sas
CHANGED
|
@@ -15,8 +15,8 @@ https://communities.sas.com/t5/SAS-Programming/listing-all-files-within-a-direct
|
|
|
15
15
|
https://communities.sas.com/t5/SAS-Programming/listing-all-files-of-all-types-from-all-subdirectories/m-p/334113/highlight/true#M75419
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
@param dir= Directory to be scanned
|
|
19
|
-
@param outds= Dataset to create
|
|
18
|
+
@param [in] dir= (/tmp) Directory to be scanned
|
|
19
|
+
@param [out] outds= (work.mp_tree) Dataset to create
|
|
20
20
|
|
|
21
21
|
@returns outds contains the following variables:
|
|
22
22
|
|
package/base/mp_unzip.sas
CHANGED
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
|
|
14
14
|
%mp_unzip(ziploc="/some/file.zip",outdir=/some/folder)
|
|
15
15
|
|
|
16
|
-
More info:
|
|
16
|
+
More info:
|
|
17
|
+
https://blogs.sas.com/content/sasdummy/2015/05/11/using-filename-zip-to-unzip-and-read-data-files-in-sas/
|
|
17
18
|
|
|
18
|
-
@param ziploc= Fileref or quoted full path
|
|
19
|
-
@param outdir= (%sysfunc(pathname(work))) Directory in which to write
|
|
20
|
-
outputs (created if
|
|
19
|
+
@param [in] ziploc= Fileref or quoted full path, eg: "/path/to/file.zip"
|
|
20
|
+
@param [out] outdir= (%sysfunc(pathname(work))) Directory in which to write
|
|
21
|
+
the outputs (created if needed)
|
|
21
22
|
|
|
22
23
|
<h4> SAS Macros </h4>
|
|
23
24
|
@li mf_mkdir.sas
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
proc sql;
|
|
15
15
|
describe table example;
|
|
16
16
|
|
|
17
|
-
@param libds the library.dataset to be modified
|
|
18
|
-
@param var The variable to modify
|
|
19
|
-
@param len The new length to apply
|
|
17
|
+
@param [in] libds the library.dataset to be modified
|
|
18
|
+
@param [in] var The variable to modify
|
|
19
|
+
@param [in] len The new length to apply
|
|
20
20
|
|
|
21
21
|
<h4> SAS Macros </h4>
|
|
22
22
|
@li mf_existds.sas
|
package/base/mp_wait4file.sas
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
@param [in] file The file to wait for. Must be provided.
|
|
12
12
|
@param [in] maxwait= (0) Number of seconds to wait. If set to zero, will
|
|
13
13
|
loop indefinitely (to a maximum of 46 days, per SAS [documentation](
|
|
14
|
-
|
|
14
|
+
https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001418809.htm
|
|
15
15
|
)). Otherwise, execution will proceed upon sleep expiry.
|
|
16
16
|
@param [in] interval= (1) The wait period between sleeps, in seconds
|
|
17
17
|
|
package/base/mp_webin.sas
CHANGED
package/base/mp_zip.sas
CHANGED
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
<h4> SAS Macros </h4>
|
|
16
16
|
@li mp_dirlist.sas
|
|
17
17
|
|
|
18
|
-
@param in= unquoted filepath, dataset of files or directory to zip
|
|
19
|
-
@param type= (FILE) Valid values:
|
|
18
|
+
@param [in] in= unquoted filepath, dataset of files or directory to zip
|
|
19
|
+
@param [in] type= (FILE) Valid values:
|
|
20
20
|
@li FILE - /full/path/and/filename.extension to a particular file
|
|
21
21
|
@li DATASET - a dataset containing a list of files to zip (see `incol`)
|
|
22
22
|
@li DIRECTORY - a directory to zip
|
|
23
|
-
@param outname= (FILE) Output file to create, _without_ .zip extension
|
|
24
|
-
@param outpath= (%sysfunc(pathname(WORK))) Parent folder for
|
|
25
|
-
@param incol=
|
|
23
|
+
@param [out] outname= (FILE) Output file to create, _without_ .zip extension
|
|
24
|
+
@param [out] outpath= (%sysfunc(pathname(WORK))) Parent folder for zip file
|
|
25
|
+
@param [in] incol= () If DATASET input, say which column contains the filepath
|
|
26
26
|
|
|
27
27
|
<h4> Related Macros </h4>
|
|
28
28
|
@li mp_unzip.sas
|
package/ddl/mddl_sas_cntlout.sas
CHANGED
|
@@ -35,7 +35,18 @@
|
|
|
35
35
|
,NOEDIT num length=3 label='Is picture string noedit?'
|
|
36
36
|
,SEXCL char(1) label='Start exclusion'
|
|
37
37
|
,EEXCL char(1) label='End exclusion'
|
|
38
|
-
,HLO char(13) label='Additional information.
|
|
38
|
+
,HLO char(13) label='Additional information.
|
|
39
|
+
F=Standard format/informat.
|
|
40
|
+
H=Range ending value is HIGH.
|
|
41
|
+
I=Numeric informat.
|
|
42
|
+
J=Justification for an informat.
|
|
43
|
+
L=Range starting value is LOW.
|
|
44
|
+
M=MultiLabel.
|
|
45
|
+
N=Format or informat has no ranges, including no OTHER= range.
|
|
46
|
+
O=Range is OTHER.
|
|
47
|
+
R=ROUND option is in effect.
|
|
48
|
+
S=Specifies that NOTSORTED is in effect.
|
|
49
|
+
U=Specifies that the UPCASE option for an informat be used.'
|
|
39
50
|
,DECSEP char(1) label='Decimal separator'
|
|
40
51
|
,DIG3SEP char(1) label='Three-digit separator'
|
|
41
52
|
,DATATYPE char(8) label='Date/time/datetime?'
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
,group=someGroup)
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
@param user= the user name (not displayname)
|
|
17
|
-
@param group= the group to which to add the user
|
|
18
|
-
@param mdebug= (0) set to 1 to show debug info in log
|
|
16
|
+
@param [in] user= the user name (not displayname)
|
|
17
|
+
@param [in] group= the group to which to add the user
|
|
18
|
+
@param [in] mdebug= (0) set to 1 to show debug info in log
|
|
19
19
|
|
|
20
20
|
<h4> Related Files </h4>
|
|
21
21
|
@li ms_adduser2group.sas
|
|
@@ -18,12 +18,13 @@
|
|
|
18
18
|
@li mf_getengine.sas
|
|
19
19
|
@li mp_abort.sas
|
|
20
20
|
|
|
21
|
-
@param libref the libref (not name) of the metadata library
|
|
22
|
-
@param open_passthrough=
|
|
23
|
-
for the relevant external database
|
|
24
|
-
@param sql_options=
|
|
25
|
-
|
|
26
|
-
@param
|
|
21
|
+
@param [in] libref the libref (not name) of the metadata library
|
|
22
|
+
@param [in] open_passthrough= () Provide an alias to produce the CONNECT TO
|
|
23
|
+
statement for the relevant external database
|
|
24
|
+
@param [in] sql_options= () Add any options to add to proc sql statement,
|
|
25
|
+
eg outobs= (only valid for pass through)
|
|
26
|
+
@param [in] mDebug= (0) set to 1 to show debug messages in the log
|
|
27
|
+
@param [in] mAbort= (0) set to 1 to call %mp_abort().
|
|
27
28
|
|
|
28
29
|
@returns libname statement
|
|
29
30
|
|
|
@@ -33,12 +34,9 @@
|
|
|
33
34
|
**/
|
|
34
35
|
|
|
35
36
|
%macro mm_assigndirectlib(
|
|
36
|
-
libref
|
|
37
|
-
,open_passthrough=
|
|
38
|
-
|
|
39
|
-
relevant external database */
|
|
40
|
-
,sql_options= /* add any options to add to proc sql statement eg outobs=
|
|
41
|
-
(only valid for pass through) */
|
|
37
|
+
libref
|
|
38
|
+
,open_passthrough=
|
|
39
|
+
,sql_options=
|
|
42
40
|
,mDebug=0
|
|
43
41
|
,mAbort=0
|
|
44
42
|
)/*/STORE SOURCE*/;
|
package/meta/mm_assignlib.sas
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
@li mp_abort.sas
|
|
15
15
|
|
|
16
16
|
@param [in] libref The libref (not name) of the metadata library
|
|
17
|
-
@param [in] mAbort= If not assigned, HARD will call %mp_abort(), SOFT
|
|
18
|
-
silently return
|
|
17
|
+
@param [in] mAbort= (HARD) If not assigned, HARD will call %mp_abort(), SOFT
|
|
18
|
+
will silently return
|
|
19
19
|
|
|
20
20
|
@returns libname statement
|
|
21
21
|
|
|
@@ -21,21 +21,24 @@
|
|
|
21
21
|
@li mp_abort.sas
|
|
22
22
|
@li mf_verifymacvars.sas
|
|
23
23
|
|
|
24
|
-
@param tree= The metadata folder uri, or the metadata path, in which to
|
|
24
|
+
@param [in] tree= The metadata folder uri, or the metadata path, in which to
|
|
25
25
|
create the object. This must exist.
|
|
26
|
-
@param name= Application object name. Avoid spaces.
|
|
27
|
-
@param ClassIdentifier=
|
|
28
|
-
|
|
26
|
+
@param [in] name= Application object name. Avoid spaces.
|
|
27
|
+
@param [in] ClassIdentifier=
|
|
28
|
+
The class of applications to which this app belongs
|
|
29
|
+
@param [in] params=
|
|
30
|
+
name=value pairs which will become public properties of the
|
|
29
31
|
application object. These are delimited using 
 (newline character)
|
|
30
32
|
|
|
31
|
-
@param desc= Application description (optional).
|
|
33
|
+
@param [in] desc= Application description (optional).
|
|
34
|
+
Avoid ampersands as these
|
|
32
35
|
are illegal characters (unless they are escapted- eg &)
|
|
33
|
-
@param version= version number of application
|
|
34
|
-
@param frefin= fileref to use (enables change if there is a conflict).
|
|
35
|
-
filerefs are left open, to enable inspection after running the
|
|
36
|
+
@param [in] version= version number of application
|
|
37
|
+
@param [in] frefin= fileref to use (enables change if there is a conflict).
|
|
38
|
+
The filerefs are left open, to enable inspection after running the
|
|
36
39
|
macro (or importing into an xmlmap if needed).
|
|
37
|
-
@param frefout= fileref to use (enables change if there is a conflict)
|
|
38
|
-
@param mDebug= set to 1 to show debug messages in the log
|
|
40
|
+
@param [out] frefout= fileref to use (enables change if there is a conflict)
|
|
41
|
+
@param [in] mDebug= set to 1 to show debug messages in the log
|
|
39
42
|
|
|
40
43
|
@author Allan Bowe
|
|
41
44
|
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
@li mm_gettables.sas
|
|
23
23
|
@li mm_getcols.sas
|
|
24
24
|
|
|
25
|
-
@param libds= library.dataset metadata source. Note - table names in metadata
|
|
25
|
+
@param [in] libds= library.dataset metadata source. Note - table names in metadata
|
|
26
26
|
can be longer than 32 chars (just fyi, not an issue here)
|
|
27
|
-
@param tableuri= Metadata URI of the table to be created
|
|
28
|
-
@param outds= (work.mm_createdataset) The dataset to create. The table
|
|
29
|
-
needs to be 32 chars or less as per SAS naming rules.
|
|
30
|
-
@param mdebug= (0) Set to 1 to enable DEBUG messages
|
|
27
|
+
@param [in] tableuri= Metadata URI of the table to be created
|
|
28
|
+
@param [out] outds= (work.mm_createdataset) The dataset to create. The table
|
|
29
|
+
name needs to be 32 chars or less as per SAS naming rules.
|
|
30
|
+
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
|
|
31
31
|
|
|
32
32
|
@version 9.4
|
|
33
33
|
@author Allan Bowe
|