@sasjs/core 6.1.1 → 6.1.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/.sasjslint +20 -1
- package/README.md +4 -2
- package/base/mf_dttmfmts.sas +1 -1
- package/base/mf_existds.sas +1 -0
- package/base/mf_existfunction.sas +1 -1
- package/base/mf_existvar.sas +1 -1
- package/base/mf_existvarlist.sas +1 -1
- package/base/mf_getapploc.sas +1 -1
- package/base/mf_getattrc.sas +1 -1
- package/base/mf_getattrn.sas +1 -1
- package/base/mf_getengine.sas +2 -1
- package/base/mf_getfilesize.sas +1 -1
- package/base/mf_getfmtlist.sas +1 -1
- package/base/mf_getfmtname.sas +1 -1
- package/base/mf_getkeyvalue.sas +1 -1
- package/base/mf_getquotedstr.sas +1 -1
- package/base/mf_getschema.sas +1 -0
- package/base/mf_getuniquefileref.sas +2 -1
- package/base/mf_getuniquelibref.sas +1 -1
- package/base/mf_getuniquename.sas +1 -1
- package/base/mf_getvarcount.sas +1 -1
- package/base/mf_getvarformat.sas +1 -1
- package/base/mf_getvarlen.sas +1 -1
- package/base/mf_getvarlist.sas +1 -1
- package/base/mf_getvarnum.sas +1 -1
- package/base/mf_getvartype.sas +1 -1
- package/base/mf_isblank.sas +1 -1
- package/base/mf_isdir.sas +1 -1
- package/base/mf_islibds.sas +1 -1
- package/base/mf_mimetype.sas +1 -1
- package/base/mf_nobs.sas +1 -1
- package/base/mf_trimstr.sas +1 -1
- package/base/mf_uid.sas +1 -1
- package/base/mf_verifymacvars.sas +1 -0
- package/base/mf_wordsinstr1andstr2.sas +1 -0
- package/base/mf_writefile.sas +1 -1
- package/base/mp_abort.sas +3 -3
- package/base/mp_appendfile.sas +1 -1
- package/base/mp_applyformats.sas +2 -1
- package/base/mp_assert.sas +1 -1
- package/base/mp_assertcols.sas +1 -1
- package/base/mp_assertcolvals.sas +1 -1
- package/base/mp_assertdsobs.sas +1 -1
- package/base/mp_base64copy.sas +1 -1
- package/base/mp_cleancsv.sas +1 -1
- package/base/mp_cntlout.sas +1 -1
- package/base/mp_csv2ds.sas +1 -1
- package/base/mp_deleteconstraints.sas +1 -1
- package/base/mp_deletefolder.sas +1 -1
- package/base/mp_dirlist.sas +1 -0
- package/base/mp_distinctfmtvalues.sas +1 -1
- package/base/mp_dropmembers.sas +1 -1
- package/base/mp_ds2csv.sas +1 -1
- package/base/mp_ds2ddl.sas +1 -1
- package/base/mp_ds2fmtds.sas +1 -1
- package/base/mp_ds2inserts.sas +1 -1
- package/base/mp_ds2squeeze.sas +1 -1
- package/base/mp_filterstore.sas +1 -1
- package/base/mp_filtervalidate.sas +1 -0
- package/base/mp_getcols.sas +1 -1
- package/base/mp_getconstraints.sas +1 -1
- package/base/mp_getdbml.sas +1 -1
- package/base/mp_getformats.sas +1 -1
- package/base/mp_getmaxvarlengths.sas +1 -1
- package/base/mp_guesspk.sas +1 -1
- package/base/mp_include.sas +1 -1
- package/base/mp_lib2cards.sas +1 -1
- package/base/mp_lib2inserts.sas +1 -1
- package/base/mp_lockfilecheck.sas +1 -1
- package/base/mp_makedata.sas +1 -1
- package/base/mp_perflog.sas +1 -1
- package/base/mp_prevobs.sas +1 -1
- package/base/mp_reseterror.sas +1 -1
- package/base/mp_resetoption.sas +1 -1
- package/base/mp_runddl.sas +1 -1
- package/base/mp_searchcols.sas +1 -1
- package/base/mp_setkeyvalue.sas +1 -1
- package/base/mp_sortinplace.sas +1 -1
- package/base/mp_stackdiffs.sas +1 -1
- package/base/mp_storediffs.sas +1 -1
- package/base/mp_stprequests.sas +1 -1
- package/base/mp_stripdiffs.sas +1 -1
- package/base/mp_testjob.sas +1 -1
- package/base/mp_testwritespeedlibrary.sas +1 -1
- package/base/mp_tree.sas +1 -1
- package/base/mp_wait4file.sas +1 -1
- package/base/mp_webin.sas +1 -1
- package/base/mp_zip.sas +1 -1
- package/ddl/mddl_dc_difftable.sas +1 -1
- package/ddl/mddl_dc_filterdetail.sas +1 -1
- package/ddl/mddl_dc_filtersummary.sas +1 -1
- package/ddl/mddl_dc_locktable.sas +1 -1
- package/ddl/mddl_dc_maxkeytable.sas +1 -1
- package/fcmp/mcf_getfmttype.sas +1 -1
- package/fcmp/mcf_length.sas +1 -1
- package/fcmp/mcf_string2file.sas +2 -1
- package/meta/mm_assigndirectlib.sas +0 -1
- package/meta/mm_assignlib.sas +1 -0
- package/meta/mm_createapplication.sas +2 -1
- package/meta/mm_createdataset.sas +1 -1
- package/meta/mm_createdocument.sas +1 -1
- package/meta/mm_createfolder.sas +1 -1
- package/meta/mm_createstp.sas +1 -1
- package/meta/mm_getauthinfo.sas +1 -1
- package/meta/mm_getcols.sas +1 -1
- package/meta/mm_getdetails.sas +1 -1
- package/meta/mm_getgroups.sas +1 -1
- package/meta/mm_getlibs.sas +2 -1
- package/meta/mm_getobjects.sas +2 -1
- package/meta/mm_getpublictypes.sas +1 -1
- package/meta/mm_getrepos.sas +2 -1
- package/meta/mm_getroles.sas +1 -0
- package/meta/mm_getservercontexts.sas +2 -1
- package/meta/mm_gettableid.sas +1 -1
- package/meta/mm_gettables.sas +1 -1
- package/meta/mm_gettree.sas +1 -1
- package/meta/mm_gettypes.sas +2 -1
- package/meta/mm_getwebappsrvprops.sas +2 -1
- package/meta/mm_updateappextension.sas +1 -1
- package/meta/mm_updatedocument.sas +1 -1
- package/metax/mmx_spkexport.sas +1 -1
- package/package.json +1 -1
- package/server/ms_getfile.sas +1 -1
- package/server/ms_testservice.sas +2 -2
- package/server/ms_triggerstp.sas +1 -1
- package/viya/mfv_existfile.sas +1 -1
- package/viya/mfv_existfolder.sas +1 -1
- package/viya/mfv_getfolderpath.sas +1 -1
- package/viya/mfv_getpathuri.sas +1 -1
- package/viya/mv_createfile.sas +1 -1
- package/viya/mv_createfolder.sas +1 -1
- package/viya/mv_deletefoldermember.sas +1 -1
- package/viya/mv_deletejes.sas +1 -1
- package/viya/mv_getclients.sas +1 -1
- package/viya/mv_getfoldermembers.sas +1 -1
- package/viya/mv_getgroupmembers.sas +1 -1
- package/viya/mv_getjoblog.sas +1 -0
- package/viya/mv_getusergroups.sas +1 -1
- package/viya/mv_getusers.sas +1 -1
- package/viya/mv_jobexecute.sas +1 -1
- package/viya/mv_jobwaitfor.sas +8 -7
- package/viya/mv_tokenauth.sas +1 -1
- package/viya/mv_tokenrefresh.sas +1 -1
- package/xplatform/mx_getgroups.sas +1 -1
package/.sasjslint
CHANGED
|
@@ -11,5 +11,24 @@
|
|
|
11
11
|
"maxLineLength": 300,
|
|
12
12
|
"lowerCaseFileNames": true,
|
|
13
13
|
"noTabs": true,
|
|
14
|
-
"indentationMultiple": 2
|
|
14
|
+
"indentationMultiple": 2,
|
|
15
|
+
"severityLevel": {
|
|
16
|
+
"hasDoxygenHeader": "error",
|
|
17
|
+
"hasMacroNameInMend": "error",
|
|
18
|
+
"hasMacroParentheses": "error",
|
|
19
|
+
"indentationMultiple": "error",
|
|
20
|
+
"lineEndings": "error",
|
|
21
|
+
"lowerCaseFileNames": "error",
|
|
22
|
+
"maxLineLength": "error",
|
|
23
|
+
"minMacroNameLength": "error",
|
|
24
|
+
"noEncodedPasswords": "error",
|
|
25
|
+
"noGremlins": "error",
|
|
26
|
+
"noNestedCommentsInHeader": "error",
|
|
27
|
+
"noSpacesInFileNames": "error",
|
|
28
|
+
"noTabs": "error",
|
|
29
|
+
"noTrailingSpaces": "error",
|
|
30
|
+
"noUndeclaredMacros": "error",
|
|
31
|
+
"noUnusedMacros": "error",
|
|
32
|
+
"strictMacroDefinition": "error"
|
|
33
|
+
}
|
|
15
34
|
}
|
package/README.md
CHANGED
|
@@ -211,11 +211,13 @@ When contributing to this library, it is therefore important to ensure that all
|
|
|
211
211
|
- Avoid naming collisions! All macro variables should be local scope. Use system generated work tables where possible - eg `data ; set sashelp.class; run; data &output; set &syslast; run;`
|
|
212
212
|
- Where global macro variables are absolutely necessary, they must use the hard-coded `_SASJS_` prefix and be declared in mp_init.sas - see mp_init.sas
|
|
213
213
|
- The use of `quit;` for `proc sql` is essential, to avoid `WARNING: You cannot disconnect or terminate session XXXX until the procedure completes.` when terminating CAS sessions in Viya.
|
|
214
|
-
-
|
|
214
|
+
- Macro logic (`%if`, `%do`) belongs inside a macro definition - in open code it needs SAS 9.4M5, which is later than the 9.4M0 floor in General Notes.
|
|
215
|
+
- Use [sasjs lint](https://github.com/sasjs/lint)! The pre-commit hook blocks a commit on lint **errors** and lets warnings through, so a rule becomes a gate the same day its last violation is cleared - add it to `severityLevel` in `.sasjslint` as `error` at that point.
|
|
215
216
|
|
|
216
217
|
## General Notes
|
|
217
218
|
|
|
218
|
-
- All macros should be compatible with SAS
|
|
219
|
+
- All macros should be compatible with SAS 9.4 (every maintenance release, 9.4M0 and later - including the releases in Limited Support) and with SAS Viya.
|
|
220
|
+
- Where a macro needs a later release than that floor, it should say so in the header (`@version` is the EARLIEST SAS version in which the macro is known to work) and exit gracefully when it runs on an older one. The threshold is the macro's own, not the floor above: `mm_createstp.sas` checks `%if %sysevalf(&sysver lt 9.3)` because type 2 stored processes need 9.3, and `mf_fmtdttm.sas` shows the maintenance-level form - `("&sysver"="9.4" and "%substr(&SYSVLONG,9,1)" le "3")`.
|
|
219
221
|
- It's [best to avoid](https://git.datacontroller.io/dc/dc/issues/50) special / non-ASCII characters for compatibility with the widest variety of SAS installations.
|
|
220
222
|
|
|
221
223
|
## Breaking Changes
|
package/base/mf_dttmfmts.sas
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
%local type found;
|
|
31
31
|
%let type=%upcase(&type);
|
|
32
32
|
%let found=0;
|
|
33
|
-
/* so an empty type reaches the abort below
|
|
33
|
+
/* so an empty type reaches the abort below */
|
|
34
34
|
%if %length(&type)=0 %then %let type=INVALID;
|
|
35
35
|
|
|
36
36
|
%if &type=DATE %then %do;
|
package/base/mf_existds.sas
CHANGED
package/base/mf_existvar.sas
CHANGED
package/base/mf_existvarlist.sas
CHANGED
package/base/mf_getapploc.sas
CHANGED
package/base/mf_getattrc.sas
CHANGED
package/base/mf_getattrn.sas
CHANGED
package/base/mf_getengine.sas
CHANGED
package/base/mf_getfilesize.sas
CHANGED
package/base/mf_getfmtlist.sas
CHANGED
package/base/mf_getfmtname.sas
CHANGED
package/base/mf_getkeyvalue.sas
CHANGED
package/base/mf_getquotedstr.sas
CHANGED
package/base/mf_getschema.sas
CHANGED
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
@version 9.2
|
|
35
35
|
@author Allan Bowe
|
|
36
|
+
@sasjslint {"noBannedStrings": false}
|
|
36
37
|
**/
|
|
37
38
|
|
|
38
39
|
%macro mf_getuniquefileref(prefix=_,maxtries=1000,lrecl=32767);
|
|
@@ -57,4 +58,4 @@
|
|
|
57
58
|
%end;
|
|
58
59
|
%put unable to find available fileref after &maxtries attempts;
|
|
59
60
|
%end;
|
|
60
|
-
%mend mf_getuniquefileref;
|
|
61
|
+
%mend mf_getuniquefileref;
|
package/base/mf_getvarcount.sas
CHANGED
package/base/mf_getvarformat.sas
CHANGED
package/base/mf_getvarlen.sas
CHANGED
package/base/mf_getvarlist.sas
CHANGED
package/base/mf_getvarnum.sas
CHANGED
package/base/mf_getvartype.sas
CHANGED
package/base/mf_isblank.sas
CHANGED
package/base/mf_isdir.sas
CHANGED
package/base/mf_islibds.sas
CHANGED
package/base/mf_mimetype.sas
CHANGED
package/base/mf_nobs.sas
CHANGED
package/base/mf_trimstr.sas
CHANGED
package/base/mf_uid.sas
CHANGED
package/base/mf_writefile.sas
CHANGED
package/base/mp_abort.sas
CHANGED
|
@@ -223,9 +223,9 @@ and %superq(SYSPROCESSNAME) ne %str(Compute Server)
|
|
|
223
223
|
put ',"_METAUSER": ' _METAUSER;
|
|
224
224
|
end;
|
|
225
225
|
/* _METAPERSON is not always set when _METAUSER is (e.g. Viya JES
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
sessions provide only _METAUSER) - guard it separately or SYMGET
|
|
227
|
+
raises "Invalid argument" and pollutes SYSERRORTEXT inside the
|
|
228
|
+
very abort JSON we are writing here. */
|
|
229
229
|
if symexist('_metaperson') then do;
|
|
230
230
|
_METAPERSON=quote(trim(symget('_METAPERSON')));
|
|
231
231
|
put ',"_METAPERSON": ' _METAPERSON;
|
package/base/mp_appendfile.sas
CHANGED
package/base/mp_applyformats.sas
CHANGED
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
@version 9.2
|
|
71
71
|
@author Allan Bowe
|
|
72
72
|
|
|
73
|
+
@sasjslint {"noBannedStrings": false}
|
|
73
74
|
**/
|
|
74
75
|
|
|
75
76
|
%macro mp_applyformats(inds,errds=0
|
|
@@ -178,4 +179,4 @@ run;
|
|
|
178
179
|
drop table &outds;
|
|
179
180
|
%end;
|
|
180
181
|
|
|
181
|
-
%mend mp_applyformats;
|
|
182
|
+
%mend mp_applyformats;
|
package/base/mp_assert.sas
CHANGED
package/base/mp_assertcols.sas
CHANGED
package/base/mp_assertdsobs.sas
CHANGED
package/base/mp_base64copy.sas
CHANGED
package/base/mp_cleancsv.sas
CHANGED
package/base/mp_cntlout.sas
CHANGED
package/base/mp_csv2ds.sas
CHANGED
package/base/mp_deletefolder.sas
CHANGED
package/base/mp_dirlist.sas
CHANGED
package/base/mp_dropmembers.sas
CHANGED
package/base/mp_ds2csv.sas
CHANGED
package/base/mp_ds2ddl.sas
CHANGED
package/base/mp_ds2fmtds.sas
CHANGED
package/base/mp_ds2inserts.sas
CHANGED
package/base/mp_ds2squeeze.sas
CHANGED
package/base/mp_filterstore.sas
CHANGED
package/base/mp_getcols.sas
CHANGED
package/base/mp_getdbml.sas
CHANGED
package/base/mp_getformats.sas
CHANGED
package/base/mp_guesspk.sas
CHANGED
package/base/mp_include.sas
CHANGED
package/base/mp_lib2cards.sas
CHANGED
package/base/mp_lib2inserts.sas
CHANGED
package/base/mp_makedata.sas
CHANGED
package/base/mp_perflog.sas
CHANGED
package/base/mp_prevobs.sas
CHANGED
package/base/mp_reseterror.sas
CHANGED
package/base/mp_resetoption.sas
CHANGED
package/base/mp_runddl.sas
CHANGED
package/base/mp_searchcols.sas
CHANGED
package/base/mp_setkeyvalue.sas
CHANGED
package/base/mp_sortinplace.sas
CHANGED