@sasjs/core 4.68.1 → 4.68.3

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.
@@ -331,7 +331,8 @@
331
331
  prxchange('s/\\/\\\\/',-1,&&name&i)
332
332
  )))))))))))))!!'"';
333
333
  end;
334
- else &&name&i=quote(cats(&&name&i));
334
+ /* trim (not cats) so leading blanks are retained */
335
+ else &&name&i='"'!!trim(&&name&i)!!'"';
335
336
  %end;
336
337
  %end;
337
338
  run;
@@ -94,10 +94,10 @@
94
94
  else &outcol=0;
95
95
  %end;
96
96
  %else %if &rule=FORMAT %then %do;
97
- /* match valid format - regex could probably be improved */
97
+ /* match valid SAS format*/
98
98
  if _n_=1 then do;
99
99
  retain &tempcol;
100
- &tempcol=prxparse('/^[_a-z\$]\w{0,31}\.[0-9]*$/i');
100
+ &tempcol=prxparse('/^(?:[_a-z\$]\w{0,31}|[0-9]+)\.[0-9]*$/i');
101
101
  if missing(&tempcol) then do;
102
102
  putlog 'ERR' +(-1) "OR: Invalid expression for FORMAT";
103
103
  stop;
@@ -355,7 +355,8 @@ data _null_;
355
355
  put ' prxchange(''s/\\/\\\\/'',-1,&&name&i) ';
356
356
  put ' )))))))))))))!!''"''; ';
357
357
  put ' end; ';
358
- put ' else &&name&i=quote(cats(&&name&i)); ';
358
+ put ' /* trim (not cats) so leading blanks are retained */ ';
359
+ put ' else &&name&i=''"''!!trim(&&name&i)!!''"''; ';
359
360
  put ' %end; ';
360
361
  put ' %end; ';
361
362
  put ' run; ';
@@ -474,7 +475,10 @@ data _null_;
474
475
  put ' data _null_; ';
475
476
  put ' infile &&_webin_fileref&i termstr=crlf; ';
476
477
  put ' input; ';
477
- put ' call symputx(''input_statement'',_infile_); ';
478
+ put ' /* a plain $ informat strips leading blanks - use $char instead */ ';
479
+ put ' call symputx(''input_statement'' ';
480
+ put ' ,prxchange(''s/:\$(?=[0-9 ])/:\$char/i'',-1,_infile_) ';
481
+ put ' ); ';
478
482
  put ' putlog "&&_webin_name&i input statement: " _infile_; ';
479
483
  put ' stop; ';
480
484
  put ' data &&_webin_name&i; ';
@@ -77,7 +77,10 @@
77
77
  data _null_;
78
78
  infile &&_webin_fileref&i termstr=crlf;
79
79
  input;
80
- call symputx('input_statement',_infile_);
80
+ /* a plain $ informat strips leading blanks - use $char instead */
81
+ call symputx('input_statement'
82
+ ,prxchange('s/:\$(?=[0-9 ])/:\$char/i',-1,_infile_)
83
+ );
81
84
  putlog "&&_webin_name&i input statement: " _infile_;
82
85
  stop;
83
86
  data &&_webin_name&i;
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "maintainers": [
36
36
  "https://sasapps.io"
37
37
  ],
38
- "version": "4.68.1"
38
+ "version": "4.68.3"
39
39
  }
@@ -355,7 +355,8 @@ data _null_;
355
355
  put ' prxchange(''s/\\/\\\\/'',-1,&&name&i) ';
356
356
  put ' )))))))))))))!!''"''; ';
357
357
  put ' end; ';
358
- put ' else &&name&i=quote(cats(&&name&i)); ';
358
+ put ' /* trim (not cats) so leading blanks are retained */ ';
359
+ put ' else &&name&i=''"''!!trim(&&name&i)!!''"''; ';
359
360
  put ' %end; ';
360
361
  put ' %end; ';
361
362
  put ' run; ';
@@ -472,7 +473,10 @@ data _null_;
472
473
  put ' data _null_; ';
473
474
  put ' infile &&_webin_fileref&i termstr=crlf lrecl=32767; ';
474
475
  put ' input; ';
475
- put ' call symputx(''input_statement'',_infile_); ';
476
+ put ' /* a plain $ informat strips leading blanks - use $char instead */ ';
477
+ put ' call symputx(''input_statement'' ';
478
+ put ' ,prxchange(''s/:\$(?=[0-9 ])/:\$char/i'',-1,_infile_) ';
479
+ put ' ); ';
476
480
  put ' putlog "&&_webin_name&i input statement: " _infile_; ';
477
481
  put ' stop; ';
478
482
  put ' data &&_webin_name&i; ';
@@ -74,7 +74,10 @@
74
74
  data _null_;
75
75
  infile &&_webin_fileref&i termstr=crlf lrecl=32767;
76
76
  input;
77
- call symputx('input_statement',_infile_);
77
+ /* a plain $ informat strips leading blanks - use $char instead */
78
+ call symputx('input_statement'
79
+ ,prxchange('s/:\$(?=[0-9 ])/:\$char/i',-1,_infile_)
80
+ );
78
81
  putlog "&&_webin_name&i input statement: " _infile_;
79
82
  stop;
80
83
  data &&_webin_name&i;
@@ -497,7 +497,8 @@ data _null_;
497
497
  put ' prxchange(''s/\\/\\\\/'',-1,&&name&i) ';
498
498
  put ' )))))))))))))!!''"''; ';
499
499
  put ' end; ';
500
- put ' else &&name&i=quote(cats(&&name&i)); ';
500
+ put ' /* trim (not cats) so leading blanks are retained */ ';
501
+ put ' else &&name&i=''"''!!trim(&&name&i)!!''"''; ';
501
502
  put ' %end; ';
502
503
  put ' %end; ';
503
504
  put ' run; ';
@@ -643,7 +644,10 @@ data _null_;
643
644
  put ' data _null_; ';
644
645
  put ' infile "%sysfunc(pathname(work))/&table..csv" termstr=crlf ; ';
645
646
  put ' input; ';
646
- put ' if _n_=1 then call symputx(''input_statement'',_infile_); ';
647
+ put ' /* a plain $ informat strips leading blanks - use $char instead */ ';
648
+ put ' if _n_=1 then call symputx(''input_statement'' ';
649
+ put ' ,prxchange(''s/:\$(?=[0-9 ])/:\$char/i'',-1,_infile_) ';
650
+ put ' ); ';
647
651
  put ' list; ';
648
652
  put ' data work.&table; ';
649
653
  put ' infile "%sysfunc(pathname(work))/&table..csv" firstobs=2 dsd ';
@@ -663,7 +667,10 @@ data _null_;
663
667
  put ' data _null_; ';
664
668
  put ' infile indata termstr=crlf lrecl=32767; ';
665
669
  put ' input; ';
666
- put ' if _n_=1 then call symputx(''input_statement'',_infile_); ';
670
+ put ' /* a plain $ informat strips leading blanks - use $char instead */ ';
671
+ put ' if _n_=1 then call symputx(''input_statement'' ';
672
+ put ' ,prxchange(''s/:\$(?=[0-9 ])/:\$char/i'',-1,_infile_) ';
673
+ put ' ); ';
667
674
  put ' %if %str(&_debug) ge 128 %then %do; ';
668
675
  put ' if _n_<20 then putlog _infile_; ';
669
676
  put ' else stop; ';
@@ -104,7 +104,10 @@
104
104
  data _null_;
105
105
  infile "%sysfunc(pathname(work))/&table..csv" termstr=crlf ;
106
106
  input;
107
- if _n_=1 then call symputx('input_statement',_infile_);
107
+ /* a plain $ informat strips leading blanks - use $char instead */
108
+ if _n_=1 then call symputx('input_statement'
109
+ ,prxchange('s/:\$(?=[0-9 ])/:\$char/i',-1,_infile_)
110
+ );
108
111
  list;
109
112
  data work.&table;
110
113
  infile "%sysfunc(pathname(work))/&table..csv" firstobs=2 dsd
@@ -124,7 +127,10 @@
124
127
  data _null_;
125
128
  infile indata termstr=crlf lrecl=32767;
126
129
  input;
127
- if _n_=1 then call symputx('input_statement',_infile_);
130
+ /* a plain $ informat strips leading blanks - use $char instead */
131
+ if _n_=1 then call symputx('input_statement'
132
+ ,prxchange('s/:\$(?=[0-9 ])/:\$char/i',-1,_infile_)
133
+ );
128
134
  %if %str(&_debug) ge 128 %then %do;
129
135
  if _n_<20 then putlog _infile_;
130
136
  else stop;
@@ -1,8 +0,0 @@
1
- # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/javascript-node/.devcontainer/base.Dockerfile
2
-
3
- # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
4
- ARG VARIANT="18-bullseye"
5
- FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
6
-
7
- RUN apt-get update \
8
- && apt-get install -y doxygen
@@ -1,26 +0,0 @@
1
- // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2
- // https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/typescript-node
3
- {
4
- "name": "Node.js & TypeScript",
5
- "build": {
6
- "dockerfile": "Dockerfile",
7
- // Update 'VARIANT' to pick a Node version: 18, 16, 14.
8
- // Append -bullseye or -buster to pin to an OS version.
9
- // Use -bullseye variants on local on arm64/Apple Silicon.
10
- "args": {
11
- "VARIANT": "16-bullseye"
12
- }
13
- },
14
- // Set *default* container specific settings.json values on container create.
15
- "settings": {},
16
- // Add the IDs of extensions you want installed when the container is created.
17
- "extensions": [
18
- "SASjs.sasjs-for-vscode"
19
- ],
20
- // Use 'forwardPorts' to make a list of ports inside the container available locally.
21
- // "forwardPorts": [],
22
- // Use 'postCreateCommand' to run commands after the container is created.
23
- "postCreateCommand": "npm i && npm i -g @sasjs/cli",
24
- // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
25
- "remoteUser": "node"
26
- }
package/.env.server DELETED
@@ -1,3 +0,0 @@
1
- CLIENT=longExpiringClient
2
- ACCESS_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6ImNsaWVudElEMSIsInVzZXJJZCI6MSwiaWF0IjoxNzQwNTk2OTAzLCJleHAiOjE3NDA2ODMzMDN9.krSCyJBDPqshLYTNBH2RVhp7gVTMYFB6TqBvlbSEEoQ
3
- REFRESH_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6ImNsaWVudElEMSIsInVzZXJJZCI6MSwiaWF0IjoxNzQwNTk2OTAzLCJleHAiOjE3NDMxODg5MDN9.Yn998JPzCgQYrkhWM_70dldi3ZAnuI-E7wQ_gS5OJ60