1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-16 04:50:05 +00:00

chore: more indentation fixes

This commit is contained in:
Allan Bowe
2021-04-03 18:21:29 +00:00
parent 030c4a4fc1
commit 096bf4fa11
5 changed files with 52 additions and 49 deletions

View File

@@ -5,7 +5,8 @@
Code is passed in as one or more filerefs. Code is passed in as one or more filerefs.
%* Step 1 - compile macros ; %* Step 1 - compile macros ;
filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas"; filename mc url
"https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc; %inc mc;
%* Step 2 - Create some SAS code and add it to a job; %* Step 2 - Create some SAS code and add it to a job;
@@ -154,7 +155,7 @@ proc http method='GET'
'Accept'='application/vnd.sas.collection+json' 'Accept'='application/vnd.sas.collection+json'
'Accept-Language'='string'; 'Accept-Language'='string';
%if &debug=1 %then %do; %if &debug=1 %then %do;
debug level = 3; debug level = 3;
%end; %end;
run; run;
/*data _null_;infile &fname2;input;putlog _infile_;run;*/ /*data _null_;infile &fname2;input;putlog _infile_;run;*/
@@ -191,13 +192,13 @@ data _null_;
file &fname3 TERMSTR=' '; file &fname3 TERMSTR=' ';
length string $32767; length string $32767;
string=cats('{"version": 0,"name":"' string=cats('{"version": 0,"name":"'
,"&name" ,"&name"
,'","type":"Compute","parameters":[{"name":"_addjesbeginendmacros"' ,'","type":"Compute","parameters":[{"name":"_addjesbeginendmacros"'
,',"type":"CHARACTER","defaultValue":"false"}'); ,',"type":"CHARACTER","defaultValue":"false"}');
context=quote(cats(symget('contextname'))); context=quote(cats(symget('contextname')));
if context ne '""' then do; if context ne '""' then do;
string=cats(string,',{"version": 1,"name": "_contextName","defaultValue":' string=cats(string,',{"version": 1,"name": "_contextName","defaultValue":'
,context,',"type":"CHARACTER","label":"Context Name","required": false}'); ,context,',"type":"CHARACTER","label":"Context Name","required": false}');
end; end;
string=cats(string,'],"code":"'); string=cats(string,'],"code":"');
put string; put string;
@@ -267,7 +268,7 @@ proc http method='POST'
%end; %end;
"Accept"="application/vnd.sas.job.definition+json"; "Accept"="application/vnd.sas.job.definition+json";
%if &debug=1 %then %do; %if &debug=1 %then %do;
debug level = 3; debug level = 3;
%end; %end;
run; run;
/*data _null_;infile &fname4;input;putlog _infile_;run;*/ /*data _null_;infile &fname4;input;putlog _infile_;run;*/

View File

@@ -5,7 +5,8 @@
Code is passed in as one or more filerefs. Code is passed in as one or more filerefs.
%* Step 1 - compile macros ; %* Step 1 - compile macros ;
filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas"; filename mc url
"https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc; %inc mc;
%* Step 2 - Create some code and add it to a web service; %* Step 2 - Create some code and add it to a web service;
@@ -18,7 +19,7 @@
run; run;
%* send data back; %* send data back;
%webout(OPEN) %webout(OPEN)
%webout(ARR,example1) * Array format, fast, suitable for large tables ; %webout(ARR,example1) * Array format, fast, suitable for large tables;
%webout(OBJ,example2) * Object format, easier to work with ; %webout(OBJ,example2) * Object format, easier to work with ;
%webout(CLOSE) %webout(CLOSE)
;;;; ;;;;
@@ -52,7 +53,8 @@
adapter, add a (different) fileref here. adapter, add a (different) fileref here.
@param contextname= Choose a specific context on which to run the Job. Leave @param contextname= Choose a specific context on which to run the Job. Leave
blank to use the default context. From Viya 3.5 it is possible to configure blank to use the default context. From Viya 3.5 it is possible to configure
a shared context - see https://go.documentation.sas.com/?docsetId=calcontexts&docsetTarget=n1hjn8eobk5pyhn1wg3ja0drdl6h.htm&docsetVersion=3.5&locale=en a shared context - see
https://go.documentation.sas.com/?docsetId=calcontexts&docsetTarget=n1hjn8eobk5pyhn1wg3ja0drdl6h.htm&docsetVersion=3.5&locale=en
@version VIYA V.03.04 @version VIYA V.03.04
@author Allan Bowe, source: https://github.com/sasjs/core @author Allan Bowe, source: https://github.com/sasjs/core
@@ -163,7 +165,7 @@ proc http method='GET'
'Accept'='application/vnd.sas.collection+json' 'Accept'='application/vnd.sas.collection+json'
'Accept-Language'='string'; 'Accept-Language'='string';
%if &debug=1 %then %do; %if &debug=1 %then %do;
debug level = 3; debug level = 3;
%end; %end;
run; run;
/*data _null_;infile &fname2;input;putlog _infile_;run;*/ /*data _null_;infile &fname2;input;putlog _infile_;run;*/
@@ -200,23 +202,23 @@ data _null_;
file &fname3 TERMSTR=' '; file &fname3 TERMSTR=' ';
length string $32767; length string $32767;
string=cats('{"version": 0,"name":"' string=cats('{"version": 0,"name":"'
,"&name" ,"&name"
,'","type":"Compute","parameters":[{"name":"_addjesbeginendmacros"' ,'","type":"Compute","parameters":[{"name":"_addjesbeginendmacros"'
,',"type":"CHARACTER","defaultValue":"false"}'); ,',"type":"CHARACTER","defaultValue":"false"}');
context=quote(cats(symget('contextname'))); context=quote(cats(symget('contextname')));
if context ne '""' then do; if context ne '""' then do;
string=cats(string,',{"version": 1,"name": "_contextName","defaultValue":' string=cats(string,',{"version": 1,"name": "_contextName","defaultValue":'
,context,',"type":"CHARACTER","label":"Context Name","required": false}'); ,context,',"type":"CHARACTER","label":"Context Name","required": false}');
end; end;
string=cats(string,'],"code":"'); string=cats(string,'],"code":"');
put string; put string;
run; run;
/** /**
* Add webout macro * Add webout macro
* These put statements are auto generated - to change the macro, change the * These put statements are auto generated - to change the macro, change the
* source (mv_webout) and run `build.py` * source (mv_webout) and run `build.py`
*/ */
filename sasjs temp lrecl=3000; filename sasjs temp lrecl=3000;
data _null_; data _null_;
file sasjs; file sasjs;
@@ -616,7 +618,7 @@ proc http method='POST'
%end; %end;
"Accept"="application/vnd.sas.job.definition+json"; "Accept"="application/vnd.sas.job.definition+json";
%if &debug=1 %then %do; %if &debug=1 %then %do;
debug level = 3; debug level = 3;
%end; %end;
run; run;
/*data _null_;infile &fname4;input;putlog _infile_;run;*/ /*data _null_;infile &fname4;input;putlog _infile_;run;*/

View File

@@ -1,24 +1,24 @@
/** /**
@file mv_getaccesstoken.sas @file mv_getaccesstoken.sas
@brief deprecated - replaced by mv_tokenrefresh.sas @brief deprecated - replaced by mv_tokenrefresh.sas
@version VIYA V.03.04 @version VIYA V.03.04
@author Allan Bowe, source: https://github.com/sasjs/core @author Allan Bowe, source: https://github.com/sasjs/core
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mv_tokenrefresh.sas @li mv_tokenrefresh.sas
**/ **/
%macro mv_getaccesstoken(client_id=someclient %macro mv_getaccesstoken(client_id=someclient
,client_secret=somesecret ,client_secret=somesecret
,grant_type=authorization_code ,grant_type=authorization_code
,code= ,code=
,user= ,user=
,pass= ,pass=
,access_token_var=ACCESS_TOKEN ,access_token_var=ACCESS_TOKEN
,refresh_token_var=REFRESH_TOKEN ,refresh_token_var=REFRESH_TOKEN
); );
%mv_tokenrefresh(client_id=&client_id %mv_tokenrefresh(client_id=&client_id
,client_secret=&client_secret ,client_secret=&client_secret

View File

@@ -1,19 +1,19 @@
/** /**
@file @file
@brief deprecated - replaced by mv_registerclient.sas @brief deprecated - replaced by mv_registerclient.sas
@version VIYA V.03.04 @version VIYA V.03.04
@author Allan Bowe, source: https://github.com/sasjs/core @author Allan Bowe, source: https://github.com/sasjs/core
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mv_registerclient.sas @li mv_registerclient.sas
**/ **/
%macro mv_getapptoken(client_id=someclient %macro mv_getapptoken(client_id=someclient
,client_secret=somesecret ,client_secret=somesecret
,grant_type=authorization_code ,grant_type=authorization_code
); );
%mv_registerclient(client_id=&client_id %mv_registerclient(client_id=&client_id
,client_secret=&client_secret ,client_secret=&client_secret

View File

@@ -5,7 +5,7 @@
Example: Example:
%mv_getjobcode( %mv_getjobcode(
path=/Public/jobs path=/Public/jobs
,name=some_job ,name=some_job
,outfile=/tmp/some_job.sas ,outfile=/tmp/some_job.sas
) )
@@ -129,7 +129,7 @@ data _null_;
outfile:write(job) outfile:write(job)
io.close(infile) io.close(infile)
io.close(outfile) io.close(outfile)
'; ';
run; run;
%inc "&fpath3..lua"; %inc "&fpath3..lua";
/* export to desired destination */ /* export to desired destination */