@sasjs/core 5.5.0 → 5.5.1

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/base/mp_abort.sas CHANGED
@@ -66,7 +66,7 @@
66
66
  , mode=REGULAR
67
67
  )/*/STORE SOURCE*/;
68
68
 
69
- %global sysprocessmode sysprocessname sasjs_stpsrv_header_loc sasjsprocessmode;
69
+ %global sysprocessmode sysprocessname _sasjs_webout_headers sasjsprocessmode;
70
70
  %local fref fid i;
71
71
 
72
72
  %if not(%eval(%unquote(&iftrue))) %then %return;
@@ -171,7 +171,7 @@ and %superq(SYSPROCESSNAME) ne %str(Compute Server)
171
171
  name="_webout.json" lrecl=999999 mod;
172
172
  %end;
173
173
  %end;
174
- %else %if %sysfunc(filename(fref,&sasjs_stpsrv_header_loc))=0 %then %do;
174
+ %else %if %sysfunc(filename(fref,&_sasjs_webout_headers))=0 %then %do;
175
175
  options nobomfile;
176
176
  /* set up http header for SASjs Server */
177
177
  %let fid=%sysfunc(fopen(&fref,A));
@@ -6,7 +6,8 @@
6
6
 
7
7
  @li Blank labels are filled in with column names
8
8
  @li Formats are reconstructed with default values
9
- @li Types such as DATE / TIME / DATETIME are inferred from the formats
9
+ @li Types such as DATE / TIME / DATETIME are inferred from the formats,
10
+ using mf_dttmfmts.sas so every caller shares one set of format lists
10
11
 
11
12
  Example usage:
12
13
 
@@ -21,6 +22,9 @@
21
22
  |`REGION `|`3 `|`3 `|`REGION `|` `|`$3. `|`C `|`CHARACTER `|
22
23
 
23
24
 
25
+ <h4> SAS Macros </h4>
26
+ @li mf_dttmfmts.sas
27
+
24
28
  <h4> Related Macros </h4>
25
29
  @li mf_getvarlist.sas
26
30
  @li mm_getcols.sas
@@ -53,13 +57,9 @@ data &outds(keep=name type length varnum format label ddtype fmtname);
53
57
  else if formatd=0 then format=cats(fmtname,formatl,'.');
54
58
  else format=cats(fmtname,formatl,'.',formatd);
55
59
  type='N';
56
- if format=:'DATETIME' or format=:'E8601DT' or format=:'NLDATM'
57
- then ddtype='DATETIME';
58
- else if format=:'DATE' or format=:'DDMMYY' or format=:'MMDDYY'
59
- or format=:'YYMMDD' or format=:'E8601DA' or format=:'B8601DA'
60
- or format=:'MONYY' or format=:'NLDATE'
61
- then ddtype='DATE';
62
- else if format=:'TIME' then ddtype='TIME';
60
+ if upcase(fmtname) in (%mf_dttmfmts(DATETIME)) then ddtype='DATETIME';
61
+ else if upcase(fmtname) in (%mf_dttmfmts(DATE)) then ddtype='DATE';
62
+ else if upcase(fmtname) in (%mf_dttmfmts(TIME)) then ddtype='TIME';
63
63
  else ddtype='NUMERIC';
64
64
  end;
65
65
  if label='' then label=name;
package/package.json CHANGED
@@ -43,5 +43,5 @@
43
43
  "devDependencies": {
44
44
  "@nogoo9/gitleaks": "8.30.1-post.2"
45
45
  },
46
- "version": "5.5.0"
46
+ "version": "5.5.1"
47
47
  }
@@ -8,7 +8,7 @@
8
8
  the server.
9
9
 
10
10
  The location of this file is driven by the global variable
11
- `sasjs_stpsrv_header_loc` which is made available in the autoexec.
11
+ `_sasjs_webout_headers` which is made available in the autoexec.
12
12
 
13
13
  Usage:
14
14
 
@@ -28,11 +28,11 @@
28
28
  %macro mfs_httpheader(header_name
29
29
  ,header_value
30
30
  )/*/STORE SOURCE*/;
31
- %global sasjs_stpsrv_header_loc;
31
+ %global _sasjs_webout_headers;
32
32
  %local fref fid i;
33
33
 
34
- %if %sysfunc(filename(fref,&sasjs_stpsrv_header_loc)) ne 0 %then %do;
35
- %put &=fref &=sasjs_stpsrv_header_loc;
34
+ %if %sysfunc(filename(fref,&_sasjs_webout_headers)) ne 0 %then %do;
35
+ %put &=fref &=_sasjs_webout_headers;
36
36
  %put %str(ERR)OR: %sysfunc(sysmsg());
37
37
  %return;
38
38
  %end;
@@ -632,11 +632,11 @@ data _null_;
632
632
  put '%macro mfs_httpheader(header_name ';
633
633
  put ' ,header_value ';
634
634
  put ')/*/STORE SOURCE*/; ';
635
- put '%global sasjs_stpsrv_header_loc; ';
635
+ put '%global _sasjs_webout_headers; ';
636
636
  put '%local fref fid i; ';
637
637
  put ' ';
638
- put '%if %sysfunc(filename(fref,&sasjs_stpsrv_header_loc)) ne 0 %then %do; ';
639
- put ' %put &=fref &=sasjs_stpsrv_header_loc; ';
638
+ put '%if %sysfunc(filename(fref,&_sasjs_webout_headers)) ne 0 %then %do; ';
639
+ put ' %put &=fref &=_sasjs_webout_headers; ';
640
640
  put ' %put %str(ERR)OR: %sysfunc(sysmsg()); ';
641
641
  put ' %return; ';
642
642
  put '%end; ';