@sasjs/core 4.37.2 → 4.37.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.
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "@sasjs/cli": "3.13.0"
37
37
  },
38
- "version": "4.37.2"
38
+ "version": "4.37.3"
39
39
  }
@@ -34,14 +34,25 @@
34
34
 
35
35
  @param path= The full path (on SAS Drive) where the job will be created
36
36
  @param name= The name of the job
37
- @param desc= The description of the job
37
+ @param desc= (Created by the mv_createjob.sas macro) The job description
38
38
  @param precode= Space separated list of filerefs, pointing to the code that
39
39
  needs to be attached to the beginning of the job
40
- @param code= Fileref(s) of the actual code to be added
41
- @param access_token_var= The global macro variable to contain the access token
42
- @param grant_type= valid values are "password" or "authorization_code"
43
- (unquoted). The default is authorization_code.
44
- @param replace= select NO to avoid replacing any existing job in that location
40
+ @param code= (ft15f001) Fileref(s) of the actual code to be added
41
+ @param access_token_var= (ACCESS_TOKEN) Global macro variable containing the
42
+ access token
43
+ @param grant_type= (sas_services) Valid values:
44
+ @li sas_services
45
+ @li detect
46
+ @li authorization_code
47
+ @li password
48
+ @param replace= (YES) select NO to avoid replacing any existing job
49
+ @param addjesbeginendmacros= (false) Relates to the `_addjesbeginendmacros`
50
+ setting. Normally this would always be false however due to a Viya bug
51
+ (https://github.com/sasjs/cli/issues/1229) this is now configurable. Valid
52
+ values:
53
+ @li true
54
+ @li false
55
+ @li 0 - this will prevent the flag from being set (job will default to true)
45
56
  @param contextname= Choose a specific context on which to run the Job. Leave
46
57
  blank to use the default context. From Viya 3.5 it is possible to configure
47
58
  a shared context - see
@@ -62,6 +73,7 @@ https://go.documentation.sas.com/?docsetId=calcontexts&docsetTarget=n1hjn8eobk5p
62
73
  ,replace=YES
63
74
  ,debug=0
64
75
  ,contextname=
76
+ ,addjesbeginendmacros=false
65
77
  );
66
78
  %local oauth_bearer;
67
79
  %if &grant_type=detect %then %do;
@@ -185,19 +197,29 @@ run;
185
197
  %end;
186
198
 
187
199
  /* set up the body of the request to create the service */
188
- %local fname3;
200
+ %local fname3 comma;
189
201
  %let fname3=%mf_getuniquefileref();
190
202
  data _null_;
191
203
  file &fname3 TERMSTR=' ';
192
204
  length string $32767;
193
205
  string=cats('{"version": 0,"name":"'
194
206
  ,"&name"
195
- ,'","type":"Compute","parameters":[{"name":"_addjesbeginendmacros"'
196
- ,',"type":"CHARACTER","defaultValue":"false"}');
207
+ ,'","type":"Compute","parameters":['
208
+ %if &addjesbeginendmacros ne 0 %then %do;
209
+ ,'{"name":"_addjesbeginendmacros"'
210
+ ,',"type":"CHARACTER","defaultValue":"'
211
+ ,"&addjesbeginendmacros"
212
+ ,'"}'
213
+ %let comma=%str(,);
214
+ %end;
215
+ );
197
216
  context=quote(cats(symget('contextname')));
198
217
  if context ne '""' then do;
199
- string=cats(string,',{"version": 1,"name": "_contextName","defaultValue":'
200
- ,context,',"type":"CHARACTER","label":"Context Name","required": false}');
218
+ string=cats(string
219
+ ,"&comma"
220
+ ,'{"version": 1,"name": "_contextName","defaultValue":'
221
+ ,context,',"type":"CHARACTER","label":"Context Name","required": false}'
222
+ );
201
223
  end;
202
224
  string=cats(string,'],"code":"');
203
225
  put string;