@sasjs/core 4.51.2 → 4.51.4

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.
@@ -120,7 +120,7 @@ run;
120
120
  %let ds3=%upcase(work.%mf_getuniquename(prefix=mpsd_keychar));
121
121
  proc transpose data=&ds2(where=(tgtvar_type='C'))
122
122
  out=&ds3(drop=_name_);
123
- by KEY_HASH;
123
+ by KEY_HASH PROCESSED_DTTM;
124
124
  id TGTVAR_NM;
125
125
  var charval;
126
126
  run;
@@ -128,7 +128,7 @@ run;
128
128
  %let ds4=%upcase(work.%mf_getuniquename(prefix=mpsd_keynum));
129
129
  proc transpose data=&ds2(where=(tgtvar_type='N'))
130
130
  out=&ds4(drop=_name_);
131
- by KEY_HASH;
131
+ by KEY_HASH PROCESSED_DTTM;
132
132
  id TGTVAR_NM;
133
133
  var numval;
134
134
  run;
@@ -138,7 +138,7 @@ run;
138
138
 
139
139
  %let ds5=%upcase(work.%mf_getuniquename(prefix=mpsd_merged));
140
140
  data &ds5;
141
- length key_hash $32;
141
+ length key_hash $32 processed_dttm 8;
142
142
  merge &ds3 &ds4;
143
143
  by key_hash;
144
144
  if not missing(key_hash);
@@ -159,7 +159,8 @@ create table &outds as select "No " as _____DELETE__THIS__RECORD_____,
159
159
  /* create SAS code to apply to stage_ds */
160
160
  data _null_;
161
161
  set &ds1;
162
- file &fref1;
162
+ file &fref1 lrecl=33000;
163
+ length charval $32767;
163
164
  if _n_=1 then put 'proc sql noprint;';
164
165
  by descending processed_dttm key_hash is_pk;
165
166
  if move_type='M' then do;
@@ -168,7 +169,8 @@ data _null_;
168
169
  end;
169
170
  if IS_PK=0 then do;
170
171
  put " " tgtvar_nm '=' @@;
171
- charval=quote(cats(oldval_char));
172
+ cnt=count(oldval_char,'"');
173
+ charval=quote(trim(substr(oldval_char,1,32765-cnt)));
172
174
  if tgtvar_type='C' then put charval @@;
173
175
  else put oldval_num @@;
174
176
  if not last.is_pk then put ',';
@@ -176,7 +178,8 @@ data _null_;
176
178
  else do;
177
179
  if first.is_pk then put " where 1=1 " @@;
178
180
  put " and " tgtvar_nm '=' @@;
179
- charval=quote(cats(oldval_char));
181
+ cnt=count(oldval_char,'"');
182
+ charval=quote(trim(substr(oldval_char,1,32765-cnt)));
180
183
  if tgtvar_type='C' then put charval @@;
181
184
  else put oldval_num @@;
182
185
  end;
@@ -188,7 +191,8 @@ data _null_;
188
191
  /* gating if - as only need PK now */
189
192
  if is_pk=1;
190
193
  put ' AND ' tgtvar_nm '=' @@;
191
- charval=quote(cats(newval_char));
194
+ cnt=count(newval_char,'"');
195
+ charval=quote(trim(substr(newval_char,1,32765-cnt)));
192
196
  if tgtvar_type='C' then put charval @@;
193
197
  else put newval_num @@;
194
198
  end;
@@ -197,7 +201,8 @@ data _null_;
197
201
  put "insert into &outds set _____DELETE__THIS__RECORD_____='No' " @@;
198
202
  end;
199
203
  put " ," tgtvar_nm '=' @@;
200
- charval=quote(cats(oldval_char));
204
+ cnt=count(oldval_char,'"');
205
+ charval=quote(trim(substr(oldval_char,1,32765-cnt)));
201
206
  if tgtvar_type='C' then put charval @@;
202
207
  else put oldval_num @@;
203
208
  end;
@@ -205,7 +210,7 @@ data _null_;
205
210
  run;
206
211
 
207
212
  /* apply the modification statements */
208
- %inc &fref1/source2;
213
+ %inc &fref1/source2 lrecl=33000;
209
214
 
210
215
  %if &mdebug=0 %then %do;
211
216
  proc sql;
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "@sasjs/cli": "^4.4.1"
37
37
  },
38
- "version": "4.51.2"
38
+ "version": "4.51.4"
39
39
  }