@sasjs/utils 3.5.0 → 3.5.2
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/.all-contributorsrc +12 -1
- package/.github/workflows/run-tests-windows.yml +1 -1
- package/.github/workflows/run-tests.yml +1 -1
- package/README.md +15 -12
- package/file/file.d.ts +1 -1
- package/file/file.js +4 -2
- package/file/file.js.map +1 -1
- package/macros/mf_abort.sas +7 -2
- package/macros/mf_deletefile.sas +1 -1
- package/macros/mf_existds.sas +1 -1
- package/macros/mf_existfileref.sas +2 -2
- package/macros/mf_existfunction.sas +1 -1
- package/macros/mf_existvar.sas +8 -4
- package/macros/mf_existvarlist.sas +2 -2
- package/macros/mf_getapploc.sas +1 -0
- package/macros/mf_getattrc.sas +2 -2
- package/macros/mf_getattrn.sas +2 -2
- package/macros/mf_getfmtlist.sas +3 -4
- package/macros/mf_getgitbranch.sas +37 -0
- package/macros/mf_getkeyvalue.sas +3 -2
- package/macros/mf_getplatform.sas +1 -1
- package/macros/mf_getschema.sas +1 -1
- package/macros/mf_getuniquelibref.sas +1 -1
- package/macros/mf_getuniquename.sas +1 -1
- package/macros/mf_getuser.sas +0 -2
- package/macros/mf_getvalue.sas +3 -3
- package/macros/mf_getvarformat.sas +2 -1
- package/macros/mf_getvarlen.sas +2 -2
- package/macros/mf_getvarnum.sas +2 -2
- package/macros/mf_getvartype.sas +2 -2
- package/macros/mf_getxengine.sas +1 -1
- package/macros/mf_increment.sas +2 -2
- package/macros/mf_isblank.sas +2 -2
- package/macros/mf_isdir.sas +1 -1
- package/macros/mf_loc.sas +6 -1
- package/macros/mf_mkdir.sas +1 -1
- package/macros/mf_mval.sas +2 -0
- package/macros/mf_nobs.sas +1 -1
- package/macros/mf_readfile.sas +63 -0
- package/macros/mf_trimstr.sas +2 -2
- package/macros/mf_wordsinstr1andstr2.sas +2 -2
- package/macros/mf_wordsinstr1butnotstr2.sas +2 -2
- package/macros/mf_writefile.sas +2 -2
- package/macros/mp_abort.sas +50 -13
- package/macros/mp_aligndecimal.sas +95 -0
- package/macros/mp_appendfile.sas +2 -2
- package/macros/mp_applyformats.sas +5 -5
- package/macros/mp_assert.sas +1 -1
- package/macros/mp_assertcols.sas +3 -3
- package/macros/mp_assertcolvals.sas +9 -5
- package/macros/mp_base64copy.sas +2 -2
- package/macros/mp_binarycopy.sas +7 -6
- package/macros/mp_chop.sas +4 -3
- package/macros/mp_cleancsv.sas +5 -4
- package/macros/mp_cntlout.sas +16 -7
- package/macros/mp_copyfolder.sas +2 -2
- package/macros/mp_createconstraints.sas +3 -3
- package/macros/mp_createwebservice.sas +1 -1
- package/macros/mp_csv2ds.sas +6 -5
- package/macros/mp_deleteconstraints.sas +5 -3
- package/macros/mp_deletefolder.sas +1 -1
- package/macros/mp_dictionary.sas +1 -1
- package/macros/mp_dirlist.sas +1 -1
- package/macros/mp_distinctfmtvalues.sas +5 -5
- package/macros/mp_ds2csv.sas +10 -1
- package/macros/mp_ds2ddl.sas +14 -2
- package/macros/mp_ds2md.sas +1 -0
- package/macros/mp_dsmeta.sas +2 -2
- package/macros/mp_filtercheck.sas +105 -16
- package/macros/mp_filtergenerate.sas +2 -2
- package/macros/mp_filterstore.sas +4 -3
- package/macros/mp_getcols.sas +3 -2
- package/macros/mp_getdbml.sas +4 -4
- package/macros/mp_getddl.sas +15 -10
- package/macros/mp_getformats.sas +13 -3
- package/macros/mp_gitlog.sas +104 -0
- package/macros/mp_gitstatus.sas +1 -1
- package/macros/mp_gsubfile.sas +6 -6
- package/macros/mp_guesspk.sas +1 -1
- package/macros/mp_hashdataset.sas +1 -1
- package/macros/mp_init.sas +1 -0
- package/macros/mp_lib2cards.sas +7 -7
- package/macros/mp_loadformat.sas +127 -47
- package/macros/mp_lockanytable.sas +31 -24
- package/macros/mp_md5.sas +3 -4
- package/macros/mp_perflog.sas +3 -3
- package/macros/mp_prevobs.sas +5 -5
- package/macros/mp_recursivejoin.sas +7 -6
- package/macros/mp_replace.sas +5 -4
- package/macros/mp_runddl.sas +3 -3
- package/macros/mp_searchcols.sas +7 -6
- package/macros/mp_stackdiffs.sas +1 -0
- package/macros/mp_storediffs.sas +8 -8
- package/macros/mp_stprequests.sas +4 -3
- package/macros/mp_stripdiffs.sas +255 -0
- package/macros/mp_testjob.sas +2 -2
- package/macros/mp_testwritespeedlibrary.sas +3 -3
- package/macros/mp_tree.sas +2 -2
- package/macros/mp_unzip.sas +5 -4
- package/macros/mp_updatevarlength.sas +3 -3
- package/macros/mp_validatecol.sas +3 -3
- package/macros/mp_wait4file.sas +1 -1
- package/macros/mp_webin.sas +1 -1
- package/macros/mp_zip.sas +5 -5
- package/package.json +5 -6
package/.all-contributorsrc
CHANGED
|
@@ -92,6 +92,15 @@
|
|
|
92
92
|
"test",
|
|
93
93
|
"review"
|
|
94
94
|
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"login": "glM26",
|
|
98
|
+
"name": "glM26",
|
|
99
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/35031631?v=4",
|
|
100
|
+
"profile": "https://github.com/glM26",
|
|
101
|
+
"contributions": [
|
|
102
|
+
"code"
|
|
103
|
+
]
|
|
95
104
|
}
|
|
96
105
|
],
|
|
97
106
|
"contributorsPerLine": 7,
|
|
@@ -99,5 +108,7 @@
|
|
|
99
108
|
"projectOwner": "sasjs",
|
|
100
109
|
"repoType": "github",
|
|
101
110
|
"repoHost": "https://github.com",
|
|
102
|
-
"skipCi": true
|
|
111
|
+
"skipCi": true,
|
|
112
|
+
"commitType": "docs",
|
|
113
|
+
"commitConvention": "angular"
|
|
103
114
|
}
|
package/README.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# @sasjs/utils
|
|
2
2
|
|
|
3
3
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
4
|
-
|
|
5
|
-
[](#contributors-)
|
|
6
|
-
|
|
4
|
+
[](#contributors-)
|
|
7
5
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
8
6
|
|
|
9
7
|
A library of utilities and types for SASjs written in TypeScript.
|
|
@@ -16,15 +14,20 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
16
14
|
<!-- prettier-ignore-start -->
|
|
17
15
|
<!-- markdownlint-disable -->
|
|
18
16
|
<table>
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
<tbody>
|
|
18
|
+
<tr>
|
|
19
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/saadjutt01"><img src="https://avatars.githubusercontent.com/u/8914650?v=4?s=100" width="100px;" alt="Muhammad Saad "/><br /><sub><b>Muhammad Saad </b></sub></a><br /><a href="https://github.com/sasjs/utils/commits?author=saadjutt01" title="Code">💻</a> <a href="https://github.com/sasjs/utils/commits?author=saadjutt01" title="Tests">⚠️</a> <a href="https://github.com/sasjs/utils/pulls?q=is%3Apr+reviewed-by%3Asaadjutt01" title="Reviewed Pull Requests">👀</a> <a href="#mentoring-saadjutt01" title="Mentoring">🧑🏫</a> <a href="https://github.com/sasjs/utils/commits?author=saadjutt01" title="Documentation">📖</a></td>
|
|
20
|
+
<td align="center" valign="top" width="14.28%"><a href="https://www.erudicat.com"><img src="https://avatars.githubusercontent.com/u/25773492?v=4?s=100" width="100px;" alt="Yury Shkoda"/><br /><sub><b>Yury Shkoda</b></sub></a><br /><a href="https://github.com/sasjs/utils/commits?author=YuryShkoda" title="Code">💻</a> <a href="#projectManagement-YuryShkoda" title="Project Management">📆</a> <a href="https://github.com/sasjs/utils/commits?author=YuryShkoda" title="Tests">⚠️</a> <a href="#video-YuryShkoda" title="Videos">📹</a> <a href="https://github.com/sasjs/utils/commits?author=YuryShkoda" title="Documentation">📖</a></td>
|
|
21
|
+
<td align="center" valign="top" width="14.28%"><a href="https://krishna-acondy.io/"><img src="https://avatars.githubusercontent.com/u/2980428?v=4?s=100" width="100px;" alt="Krishna Acondy"/><br /><sub><b>Krishna Acondy</b></sub></a><br /><a href="https://github.com/sasjs/utils/commits?author=krishna-acondy" title="Code">💻</a> <a href="https://github.com/sasjs/utils/commits?author=krishna-acondy" title="Tests">⚠️</a> <a href="#infra-krishna-acondy" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#content-krishna-acondy" title="Content">🖋</a> <a href="#maintenance-krishna-acondy" title="Maintenance">🚧</a> <a href="#platform-krishna-acondy" title="Packaging/porting to new platform">📦</a> <a href="https://github.com/sasjs/utils/pulls?q=is%3Apr+reviewed-by%3Akrishna-acondy" title="Reviewed Pull Requests">👀</a></td>
|
|
22
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/medjedovicm"><img src="https://avatars.githubusercontent.com/u/18329105?v=4?s=100" width="100px;" alt="Mihajlo Medjedovic"/><br /><sub><b>Mihajlo Medjedovic</b></sub></a><br /><a href="https://github.com/sasjs/utils/commits?author=medjedovicm" title="Code">💻</a> <a href="#infra-medjedovicm" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/sasjs/utils/commits?author=medjedovicm" title="Tests">⚠️</a> <a href="https://github.com/sasjs/utils/pulls?q=is%3Apr+reviewed-by%3Amedjedovicm" title="Reviewed Pull Requests">👀</a></td>
|
|
23
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/allanbowe"><img src="https://avatars.githubusercontent.com/u/4420615?v=4?s=100" width="100px;" alt="Allan Bowe"/><br /><sub><b>Allan Bowe</b></sub></a><br /><a href="https://github.com/sasjs/utils/commits?author=allanbowe" title="Code">💻</a> <a href="https://github.com/sasjs/utils/pulls?q=is%3Apr+reviewed-by%3Aallanbowe" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/sasjs/utils/commits?author=allanbowe" title="Tests">⚠️</a> <a href="#video-allanbowe" title="Videos">📹</a> <a href="https://github.com/sasjs/utils/commits?author=allanbowe" title="Documentation">📖</a></td>
|
|
24
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sabhas"><img src="https://avatars.githubusercontent.com/u/82647447?v=4?s=100" width="100px;" alt="Sabir Hassan"/><br /><sub><b>Sabir Hassan</b></sub></a><br /><a href="https://github.com/sasjs/utils/commits?author=sabhas" title="Code">💻</a> <a href="https://github.com/sasjs/utils/pulls?q=is%3Apr+reviewed-by%3Asabhas" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/sasjs/utils/commits?author=sabhas" title="Tests">⚠️</a> <a href="#ideas-sabhas" title="Ideas, Planning, & Feedback">🤔</a></td>
|
|
25
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/VladislavParhomchik"><img src="https://avatars.githubusercontent.com/u/83717836?v=4?s=100" width="100px;" alt="VladislavParhomchik"/><br /><sub><b>VladislavParhomchik</b></sub></a><br /><a href="https://github.com/sasjs/utils/commits?author=VladislavParhomchik" title="Tests">⚠️</a> <a href="https://github.com/sasjs/utils/pulls?q=is%3Apr+reviewed-by%3AVladislavParhomchik" title="Reviewed Pull Requests">👀</a></td>
|
|
26
|
+
</tr>
|
|
27
|
+
<tr>
|
|
28
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/glM26"><img src="https://avatars.githubusercontent.com/u/35031631?v=4?s=100" width="100px;" alt="glM26"/><br /><sub><b>glM26</b></sub></a><br /><a href="https://github.com/sasjs/utils/commits?author=glM26" title="Code">💻</a></td>
|
|
29
|
+
</tr>
|
|
30
|
+
</tbody>
|
|
28
31
|
</table>
|
|
29
32
|
|
|
30
33
|
<!-- markdownlint-restore -->
|
package/file/file.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare function listFilesAndSubFoldersInFolder(folderName: string, recur
|
|
|
22
22
|
export declare function createFolder(folderName: string): Promise<string | undefined>;
|
|
23
23
|
export declare function createFile(fileName: string, content: string, encoding?: BufferEncoding): Promise<void>;
|
|
24
24
|
export declare function deleteFile(filePath: string): Promise<void>;
|
|
25
|
-
export declare function deleteFolder(folderPath: string): Promise<
|
|
25
|
+
export declare function deleteFolder(folderPath: string): Promise<void>;
|
|
26
26
|
export declare function unifyFilePath(filePath: string, separator?: string, separatorToReplace?: string): string;
|
|
27
27
|
export declare function getRelativePath(from: string, to: string): string;
|
|
28
28
|
export declare function moveFile(oldFilePath: string, newFilePath: string): Promise<void>;
|
package/file/file.js
CHANGED
|
@@ -33,7 +33,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.getLineEnding = exports.isTestFile = exports.testFileRegExp = exports.createReadStream = exports.createWriteStream = exports.getRealPath = exports.base64EncodeFile = exports.base64EncodeImageFile = exports.pathSepEscaped = exports.copy = exports.moveFile = exports.getRelativePath = exports.unifyFilePath = exports.deleteFolder = exports.deleteFile = exports.createFile = exports.createFolder = exports.listFilesAndSubFoldersInFolder = exports.listSubFoldersInFolder = exports.listSasFilesInFolder = exports.listIniFilesInFolder = exports.listFilesInFolder = exports.readFileBinary = exports.readFile = exports.isFolder = exports.folderExists = exports.fileExists = void 0;
|
|
35
35
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
36
|
-
const rimraf_1 = require("rimraf");
|
|
37
36
|
const path_1 = __importDefault(require("path"));
|
|
38
37
|
const utils_1 = require("../utils");
|
|
39
38
|
const file = __importStar(require("."));
|
|
@@ -174,7 +173,10 @@ function deleteFile(filePath) {
|
|
|
174
173
|
exports.deleteFile = deleteFile;
|
|
175
174
|
function deleteFolder(folderPath) {
|
|
176
175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
-
return
|
|
176
|
+
return fs_extra_1.default.rm(folderPath, {
|
|
177
|
+
recursive: true,
|
|
178
|
+
force: true
|
|
179
|
+
});
|
|
178
180
|
});
|
|
179
181
|
}
|
|
180
182
|
exports.deleteFolder = deleteFolder;
|
package/file/file.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/file/file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/file/file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAyB;AACzB,gDAAuB;AACvB,oCAAuC;AACvC,wCAAyB;AACzB,oCAAsC;AAEtC,SAAsB,UAAU,CAAC,QAAgB;;QAC/C,OAAO,kBAAE,CAAC,QAAQ;aACf,MAAM,CAAC,QAAQ,EAAE,kBAAE,CAAC,SAAS,CAAC,IAAI,CAAC;aACnC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;aAChB,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;IACvB,CAAC;CAAA;AALD,gCAKC;AAED,SAAsB,YAAY,CAAC,UAAkB;;QACnD,OAAO,kBAAE,CAAC,QAAQ;aACf,MAAM,CAAC,UAAU,EAAE,kBAAE,CAAC,SAAS,CAAC,IAAI,CAAC;aACrC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;aAChB,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;IACvB,CAAC;CAAA;AALD,oCAKC;AAED,SAAsB,QAAQ,CAAC,SAAiB;;QAC9C,OAAO,kBAAE,CAAC,QAAQ;aACf,KAAK,CAAC,SAAS,CAAC;aAChB,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;aAClC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;IACvB,CAAC;CAAA;AALD,4BAKC;AAED,SAAsB,QAAQ,CAC5B,QAAgB,EAChB,WAA2B,MAAM;;QAEjC,OAAO,kBAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IACjD,CAAC;CAAA;AALD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AU,CAAC,QAAQ,CAAC,CAAA;QACrD,IAAI,aAAa,EAAE;YACjB,OAAO,kBAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;SACtD;QAED,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;QACnC,OAAO,kBAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;IACvD,CAAC;CAAA;AARD,8CAQC;AAEM,MAAM,gBAAgB,GAAG,CAAO,QAAgB,EAAE,EAAE,kDACzD,OAAA,kBAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA,GAAA,CAAA;AADlB,QAAA,gBAAgB,oBACE;AAElB,QAAA,cAAc,GAAG,uBAAuB,CAAA;AAE9C,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,sBAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AAAhE,QAAA,UAAU,cAAsD;AAE7E;;;;GAIG;AACI,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,EAAE,CAC/C,IAAI,MAAM,CAAC,mBAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,mBAAW,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAW,CAAC,EAAE,CAAA;AADnE,QAAA,aAAa,iBACsD"}
|
package/macros/mf_abort.sas
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
@brief Abort, ungracefully
|
|
4
4
|
@details Will abort with a straightforward %abort if the condition is true.
|
|
5
5
|
|
|
6
|
+
@param [in] mac= (mf_abort.sas) Name of calling macro (is printed to the log)
|
|
7
|
+
@param [in] msg= ( ) Additional string to print to the log
|
|
8
|
+
@param [in] iftrue= (%str(1=1)) Conditional logic under which to perform the
|
|
9
|
+
abort
|
|
10
|
+
|
|
6
11
|
<h4> Related Macros </h4>
|
|
7
12
|
@li mp_abort.sas
|
|
8
13
|
|
|
@@ -12,7 +17,7 @@
|
|
|
12
17
|
**/
|
|
13
18
|
|
|
14
19
|
%macro mf_abort(mac=mf_abort.sas, msg=, iftrue=%str(1=1)
|
|
15
|
-
)
|
|
20
|
+
)/des='ungraceful abort' /*STORE SOURCE*/;
|
|
16
21
|
|
|
17
22
|
%if not(%eval(%unquote(&iftrue))) %then %return;
|
|
18
23
|
|
|
@@ -24,4 +29,4 @@
|
|
|
24
29
|
|
|
25
30
|
%mend mf_abort;
|
|
26
31
|
|
|
27
|
-
/** @endcond */
|
|
32
|
+
/** @endcond */
|
package/macros/mf_deletefile.sas
CHANGED
package/macros/mf_existds.sas
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@details You can probably do without this macro as it is just a one liner.
|
|
5
5
|
Mainly it is here as a convenient way to remember the syntax!
|
|
6
6
|
|
|
7
|
-
@param fref the fileref to detect
|
|
7
|
+
@param [in] fref the fileref to detect
|
|
8
8
|
|
|
9
9
|
@return output Returns 1 if found and 0 if not found. Note - it is possible
|
|
10
10
|
that the fileref is found, but the file does not (yet) exist. If you need
|
|
@@ -30,4 +30,4 @@
|
|
|
30
30
|
0
|
|
31
31
|
%end;
|
|
32
32
|
|
|
33
|
-
%mend mf_existfileref;
|
|
33
|
+
%mend mf_existfileref;
|
package/macros/mf_existvar.sas
CHANGED
|
@@ -25,13 +25,17 @@
|
|
|
25
25
|
%local dsid rc;
|
|
26
26
|
%let dsid=%sysfunc(open(&libds,is));
|
|
27
27
|
|
|
28
|
-
%if &dsid=0
|
|
28
|
+
%if &dsid=0 %then %do;
|
|
29
29
|
%put %sysfunc(sysmsg());
|
|
30
|
-
|
|
30
|
+
0
|
|
31
|
+
%end;
|
|
32
|
+
%else %if %length(&var)=0 %then %do;
|
|
33
|
+
0
|
|
34
|
+
%let rc=%sysfunc(close(&dsid));
|
|
31
35
|
%end;
|
|
32
36
|
%else %do;
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
%sysfunc(varnum(&dsid,&var))
|
|
38
|
+
%let rc=%sysfunc(close(&dsid));
|
|
35
39
|
%end;
|
|
36
40
|
|
|
37
41
|
%mend mf_existvar;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
%put %mf_existVarList(sashelp.class, age sex name dummyvar);
|
|
8
8
|
|
|
9
|
-
@param libds 2 part dataset or view reference
|
|
10
|
-
@param varlist space separated variable names
|
|
9
|
+
@param [in] libds 2 part dataset or view reference
|
|
10
|
+
@param [in] varlist space separated variable names
|
|
11
11
|
|
|
12
12
|
@version 9.2
|
|
13
13
|
@author Allan Bowe
|
package/macros/mf_getapploc.sas
CHANGED
package/macros/mf_getattrc.sas
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
%put Dataset label = %mf_getattrc(sashelp.class,LABEL);
|
|
7
7
|
%put Member Type = %mf_getattrc(sashelp.class,MTYPE);
|
|
8
8
|
|
|
9
|
-
@param libds library.dataset
|
|
10
|
-
@param attr full list in [documentation](
|
|
9
|
+
@param [in] libds library.dataset
|
|
10
|
+
@param [in] attr full list in [documentation](
|
|
11
11
|
https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000147794.htm)
|
|
12
12
|
@return output returns result of the attrc value supplied, or -1 and log
|
|
13
13
|
message if err.
|
package/macros/mf_getattrn.sas
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
%put Number of observations=%mf_getattrn(sashelp.class,NLOBS);
|
|
7
7
|
%put Number of variables = %mf_getattrn(sashelp.class,NVARS);
|
|
8
8
|
|
|
9
|
-
@param libds library.dataset
|
|
10
|
-
@param attr Common values are NLOBS and NVARS, full list in [documentation](
|
|
9
|
+
@param [in] libds library.dataset
|
|
10
|
+
@param [in] attr Common values are NLOBS and NVARS, full list in [documentation](
|
|
11
11
|
http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212040.htm)
|
|
12
12
|
@return output returns result of the attrn value supplied, or -1 and log
|
|
13
13
|
message if err.
|
package/macros/mf_getfmtlist.sas
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@file
|
|
3
|
+
@brief Retrieves the current branch from a local GIT repo
|
|
4
|
+
@details In a local git repository, the current branch is always available in
|
|
5
|
+
the `.git/HEAD` file in a format like this: `ref: refs/heads/master`
|
|
6
|
+
|
|
7
|
+
This macro simply reads the file and returns the last word (eg `master`).
|
|
8
|
+
|
|
9
|
+
Example usage:
|
|
10
|
+
|
|
11
|
+
%let gitdir=%sysfunc(pathname(work))/core;
|
|
12
|
+
%let repo=https://github.com/sasjs/core;
|
|
13
|
+
%put source clone rc=%sysfunc(GITFN_CLONE(&repo,&gitdir));
|
|
14
|
+
|
|
15
|
+
%put The current branch is %mf_getgitbranch(&gitdir);
|
|
16
|
+
|
|
17
|
+
@param [in] gitdir The directory containing the GIT repository
|
|
18
|
+
|
|
19
|
+
<h4> SAS Macros </h4>
|
|
20
|
+
@li mf_readfile.sas
|
|
21
|
+
|
|
22
|
+
<h4> Related Macros </h4>
|
|
23
|
+
@li mp_gitadd.sas
|
|
24
|
+
@li mp_gitlog.sas
|
|
25
|
+
@li mp_gitreleaseinfo.sas
|
|
26
|
+
@li mp_gitstatus.sas
|
|
27
|
+
|
|
28
|
+
@version 9.2
|
|
29
|
+
@author Allan Bowe
|
|
30
|
+
**/
|
|
31
|
+
|
|
32
|
+
%macro mf_getgitbranch(gitdir
|
|
33
|
+
)/*/STORE SOURCE*/;
|
|
34
|
+
|
|
35
|
+
%scan(%mf_readfile(&gitdir/.git/HEAD),-1)
|
|
36
|
+
|
|
37
|
+
%mend mf_getgitbranch;
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
%put %mf_getkeyvalue(someindex)
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@param key Provide a key on which to perform the lookup
|
|
11
|
-
@param libds=
|
|
10
|
+
@param [in] key Provide a key on which to perform the lookup
|
|
11
|
+
@param [in] libds= (work.mp_setkeyvalue) The library.dataset which holds the
|
|
12
|
+
parameters
|
|
12
13
|
|
|
13
14
|
@version 9.2
|
|
14
15
|
@author Allan Bowe
|
package/macros/mf_getschema.sas
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
@param [in] prefix= (mclib) first part of the returned libref. As librefs can
|
|
20
20
|
be as long as 8 characters, a maximum length of 7 characters is premitted
|
|
21
21
|
for this prefix.
|
|
22
|
-
@param [in] maxtries= Deprecated parameter. Remains here to ensure a
|
|
22
|
+
@param [in] maxtries= (1000) Deprecated parameter. Remains here to ensure a
|
|
23
23
|
non-breaking change. Will be removed in v5.
|
|
24
24
|
|
|
25
25
|
@version 9.2
|
package/macros/mf_getuser.sas
CHANGED
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
%let user= %mf_getUser();
|
|
14
14
|
%put &user;
|
|
15
15
|
|
|
16
|
-
@param type - do not use, may be deprecated in a future release
|
|
17
|
-
|
|
18
16
|
@return SYSUSERID (if workspace server)
|
|
19
17
|
@return _METAPERSON (if stored process server)
|
|
20
18
|
@return SYS_COMPUTE_SESSION_OWNER (if Viya compute session)
|
package/macros/mf_getvalue.sas
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
<h4> Related Macros </h4>
|
|
14
14
|
@li mp_setkeyvalue.sas
|
|
15
15
|
|
|
16
|
-
@param libds dataset to query
|
|
17
|
-
@param variable the variable which contains the value to return.
|
|
18
|
-
@param filter contents of where clause
|
|
16
|
+
@param [in] libds dataset to query
|
|
17
|
+
@param [in] variable the variable which contains the value to return.
|
|
18
|
+
@param [in] filter= (1) contents of where clause
|
|
19
19
|
|
|
20
20
|
@version 9.2
|
|
21
21
|
@author Allan Bowe
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
|
|
26
26
|
@param [in] libds Two part dataset (or view) reference.
|
|
27
27
|
@param [in] var Variable name for which a format should be returned
|
|
28
|
-
@param [in] force=(0) Set to 1 to supply a default if the variable has no
|
|
28
|
+
@param [in] force= (0) Set to 1 to supply a default if the variable has no
|
|
29
|
+
format
|
|
29
30
|
@returns outputs format
|
|
30
31
|
|
|
31
32
|
@author Allan Bowe
|
package/macros/mf_getvarlen.sas
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
8
|
|
19
19
|
NOTE: Variable renegade does not exist in test
|
|
20
20
|
|
|
21
|
-
@param libds Two part dataset (or view) reference.
|
|
22
|
-
@param var Variable name for which a length should be returned
|
|
21
|
+
@param [in] libds Two part dataset (or view) reference.
|
|
22
|
+
@param [in] var Variable name for which a length should be returned
|
|
23
23
|
@returns outputs length
|
|
24
24
|
|
|
25
25
|
@author Allan Bowe
|
package/macros/mf_getvarnum.sas
CHANGED
|
@@ -21,8 +21,8 @@ returns:
|
|
|
21
21
|
|
|
22
22
|
> NOTE: Variable renegade does not exist in test
|
|
23
23
|
|
|
24
|
-
@param libds Two part dataset (or view) reference.
|
|
25
|
-
@param var Variable name for which a position should be returned
|
|
24
|
+
@param [in] libds Two part dataset (or view) reference.
|
|
25
|
+
@param [in] var Variable name for which a position should be returned
|
|
26
26
|
|
|
27
27
|
@author Allan Bowe
|
|
28
28
|
@version 9.2
|
package/macros/mf_getvartype.sas
CHANGED
|
@@ -13,8 +13,8 @@ Usage:
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
@param libds Two part dataset (or view) reference.
|
|
17
|
-
@param var the variable name to be checked
|
|
16
|
+
@param [in] libds Two part dataset (or view) reference.
|
|
17
|
+
@param [in] var the variable name to be checked
|
|
18
18
|
@return output returns C or N depending on variable type. If variable
|
|
19
19
|
does not exist then a blank is returned and a note is written to the log.
|
|
20
20
|
|
package/macros/mf_getxengine.sas
CHANGED
package/macros/mf_increment.sas
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
%put Now we have run %mf_increment(cnt) lines;
|
|
12
12
|
%put There are %mf_increment(cnt) lines in total;
|
|
13
13
|
|
|
14
|
-
@param [in]
|
|
15
|
-
@param [in]
|
|
14
|
+
@param [in] macro_name The name of the macro variable to increment
|
|
15
|
+
@param [in] incr= (1) The amount to add or subtract to the macro
|
|
16
16
|
|
|
17
17
|
<h4> Related Files </h4>
|
|
18
18
|
@li mf_increment.test.sas
|
package/macros/mf_isblank.sas
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
Usage:
|
|
9
9
|
|
|
10
|
-
%put mf_isblank(&var);
|
|
10
|
+
%put %mf_isblank(&var);
|
|
11
11
|
|
|
12
12
|
inspiration:
|
|
13
13
|
https://support.sas.com/resources/papers/proceedings09/022-2009.pdf
|
|
14
14
|
|
|
15
|
-
@param
|
|
15
|
+
@param [in] Param VALUE to be checked
|
|
16
16
|
|
|
17
17
|
@return output returns 1 (if blank) else 0
|
|
18
18
|
|
package/macros/mf_isdir.sas
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
With thanks and full credit to Andrea Defronzo -
|
|
10
10
|
https://www.linkedin.com/in/andrea-defronzo-b1a47460/
|
|
11
11
|
|
|
12
|
-
@param path
|
|
12
|
+
@param [in] path Full path of the file/directory to be checked
|
|
13
13
|
|
|
14
14
|
@return output returns 1 if path is a directory, 0 if it is not
|
|
15
15
|
|
package/macros/mf_loc.sas
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
%put %mf_loc(POF); %*location of PlatformObjectFramework tools;
|
|
8
8
|
|
|
9
|
+
@param [in] loc The item to locate, eg:
|
|
10
|
+
@li PLAATFORMOBJECTFRAMEWORK (or POF)
|
|
11
|
+
@li VIYACONFG
|
|
12
|
+
|
|
9
13
|
@version 9.2
|
|
10
14
|
@author Allan Bowe
|
|
11
15
|
**/
|
|
@@ -15,7 +19,8 @@
|
|
|
15
19
|
%local root;
|
|
16
20
|
|
|
17
21
|
%if &loc=POF or &loc=PLATFORMOBJECTFRAMEWORK %then %do;
|
|
18
|
-
%let root=%
|
|
22
|
+
%let root=%sysget(SASROOT);
|
|
23
|
+
%let root=%substr(&root,1,%index(&root,SASFoundation)-2);
|
|
19
24
|
%let root=&root/SASPlatformObjectFramework/&sysver;
|
|
20
25
|
%put Batch tools located at: &root;
|
|
21
26
|
&root
|
package/macros/mf_mkdir.sas
CHANGED
package/macros/mf_mval.sas
CHANGED