diff --git a/README.md b/README.md index b10007f..ba2e2a4 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Documentation: https://core.sasjs.io This library will not be used for storing data entries (such as formats or datalines). Where this becomes necessary in the future, a new repo will be created, in order to keep the NPM bundle size down (for the benefit of those looking to embed purely macros in their applications). -#### FCMP library (All Platforms) +### FCMP library (All Platforms) - Function and macro names are identical, except for special cases - Prefixes: _mcf_ @@ -217,7 +217,6 @@ If you find this library useful, please leave a [star](https://github.com/sasjs/  - ## Contributors ✨ [](#contributors-) diff --git a/base/mp_assertscope.sas b/base/mp_assertscope.sas index f6477d1..786361c 100644 --- a/base/mp_assertscope.sas +++ b/base/mp_assertscope.sas @@ -74,7 +74,8 @@ outds=work.test_results )/*/STORE SOURCE*/; %local ds test_result test_comments del add mod ilist; -%let ilist=%upcase(&sasjs_prefix._FUNCTIONS &ignorelist); +%let ilist=%upcase(&sasjs_prefix._FUNCTIONS SYS_PROCHTTP_STATUS_CODE + SYS_PROCHTTP_STATUS_CODE SYS_PROCHTTP_STATUS_PHRASE &ignorelist); /** * this sets up the global vars, it will also enter STRICT mode. If this @@ -89,7 +90,7 @@ create table &scopeds as select name,offset,value from dictionary.macros - where scope="&scope" and name not in (%mf_getquotedstr(&ilist)) + where scope="&scope" and upcase(name) not in (%mf_getquotedstr(&ilist)) order by name,offset; %end; %else %if &action=COMPARE %then %do; @@ -141,4 +142,4 @@ drop table &ds; %end; -%mend mp_assertscope; \ No newline at end of file +%mend mp_assertscope; diff --git a/base/mp_lockanytable.sas b/base/mp_lockanytable.sas index a47e09b..40ce710 100644 --- a/base/mp_lockanytable.sas +++ b/base/mp_lockanytable.sas @@ -1,7 +1,8 @@ /** @file @brief Mechanism for locking tables to prevent parallel modifications - @details Uses a control table to enable ANY table to be locked for updates. + @details Uses a control table to enable ANY table to be locked for updates + (not just SAS datasets). Only useful if every update uses the macro! Used heavily within [Data Controller for SAS](https://datacontroller.io). @@ -15,7 +16,7 @@ length is 200 characters. @param [out] ctl_ds= (0) The control table which controls the actual locking. Should already be assigned and available. The definition is available by - running mp_coretable.sas as follows: `%mp_coretable(LOCKTABLE)`. + running the mddl_dc_locktable.sas macro. @param [in] loops= (25) Number of times to check for a lock. @param [in] loop_secs= (1) Seconds to wait between each lock attempt diff --git a/base/mp_streamfile.sas b/base/mp_streamfile.sas index b442415..179740f 100644 --- a/base/mp_streamfile.sas +++ b/base/mp_streamfile.sas @@ -12,7 +12,7 @@ %mp_streamfile(contenttype=csv,inloc=/some/where.txt,outname=myfile.txt) - @param [in] contenttype= (TEXTS) Either TEXT, ZIP, CSV, EXCEL + @param [in] contenttype= (TEXT) Either TEXT, ZIP, CSV, EXCEL @param [in] inloc= /path/to/file.ext to be sent @param [in] inref= fileref of file to be sent (if provided, overrides `inloc`) @param [in] iftrue= (1=1) Provide a condition under which to execute. diff --git a/meta/mm_assignlib.sas b/meta/mm_assignlib.sas index b430211..68698aa 100755 --- a/meta/mm_assignlib.sas +++ b/meta/mm_assignlib.sas @@ -40,6 +40,12 @@ /* now try and assign it */ if libname("&libref",,'meta',cats('liburi="',liburi,'";')) ne 0 then do; putlog "&libref could not be assigned"; + putlog liburi=; + /** + * Fetch the system message for display in the abort modal. This is + * not always helpful though. One example, previously received: + * NOTE: Libref XX refers to the same library metadata as libref XX. + */ call symputx('msg',sysmsg(),'l'); if "&mabort"='HARD' then call symputx('mp_abort',1,'l'); end; @@ -61,7 +67,7 @@ %if &mp_abort=1 %then %do; %mp_abort(iftrue= (&mp_abort=1) - ,mac=&sysmacroname + ,mac=mm_assignlib.sas ,msg=&msg ) %return; diff --git a/sasjs/sasjsconfig.json b/sasjs/sasjsconfig.json index 39402a2..d7c348f 100644 --- a/sasjs/sasjsconfig.json +++ b/sasjs/sasjsconfig.json @@ -73,17 +73,24 @@ "name": "server", "serverUrl": "https://sas.analytium.co.uk:5000", "serverType": "SASJS", - "appLoc": "/Shared Data/temp/macrocore", + "httpsAgentOptions": { + "allowInsecureRequests": false + }, + "appLoc": "/sasjs/core", "macroFolders": [ "tests/serveronly" ], + "programFolders": [], + "binaryFolders": [], "deployConfig": { - "deployServicePack": true + "deployServicePack": true, + "deployScripts": [] } }, { "name": "docsonly", "serverType": "SAS9", + "appLoc": "dummy", "macroFolders": [ "tests/sas9only", "tests/viyaonly" diff --git a/server/ms_createfile.sas b/server/ms_createfile.sas new file mode 100644 index 0000000..f38c71d --- /dev/null +++ b/server/ms_createfile.sas @@ -0,0 +1,89 @@ +/** + @file + @brief Creates a file on SASjs Drive + @details Creates a file on SASjs Drive. To use the file as a Stored Program, + it must have a ".sas" extension. + + Example: + + filename stpcode temp; + data _null_; + file stpcode; + put '%put hello world;'; + run; + %ms_createfile(/some/stored/program.sas, inref=stpcode) + + @param [in] driveloc The full path to the file in SASjs Drive + @param [in] inref= (0) The fileref containing the file to create. + @param [in] mdebug= (0) Set to 1 to enable DEBUG messages + +