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

patch: doxy formatting

This commit is contained in:
2020-12-03 22:44:08 +01:00
parent bedc2a443a
commit 0592206f2d
8 changed files with 45 additions and 15 deletions

28
all.sas
View File

@@ -39,8 +39,8 @@ options noquotelenmax;
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
/** @cond */
%macro mf_abort(mac=mf_abort.sas, type=, msg=, iftrue=%str(1=1) %macro mf_abort(mac=mf_abort.sas, type=, msg=, iftrue=%str(1=1)
)/*/STORE SOURCE*/; )/*/STORE SOURCE*/;
@@ -278,6 +278,7 @@ options noquotelenmax;
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
%macro mf_existvarlist(libds, varlist %macro mf_existvarlist(libds, varlist
@@ -317,7 +318,9 @@ options noquotelenmax;
0 0
%put Vars not found: &found; %put Vars not found: &found;
%end; %end;
%mend;/** %mend;
/** @endcond *//**
@file @file
@brief Returns a character attribute of a dataset. @brief Returns a character attribute of a dataset.
@details Can be used in open code, eg as follows: @details Can be used in open code, eg as follows:
@@ -633,6 +636,7 @@ options noquotelenmax;
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
%macro mf_getschema(libref %macro mf_getschema(libref
@@ -654,6 +658,8 @@ options noquotelenmax;
&schema &schema
%mend; %mend;
/** @endcond */
/** /**
@file @file
@brief Assigns and returns an unused fileref @brief Assigns and returns an unused fileref
@@ -1529,11 +1535,11 @@ Usage:
the particulars of an environment. For instance, can stream custom the particulars of an environment. For instance, can stream custom
results back to the client in an STP Web App context, or completely stop results back to the client in an STP Web App context, or completely stop
in the case of a batch run. in the case of a batch run.
Using SAS Abort Cancel mechanisms can cause hung sessions in some Stored Process Using SAS Abort Cancel mechanisms can cause hung sessions in some Stored Process
environments. This macro takes a unique approach - we set the SAS syscc to 0, environments. This macro takes a unique approach - we set the SAS syscc to 0,
run `stpsrvset('program error', 0)` (if SAS 9) and then - we open a macro run `stpsrvset('program error', 0)` (if SAS 9) and then - we open a macro
but don't close it! This provides a graceful abort for SAS web services in all but don't close it! This provides a graceful abort for SAS web services in all
web enabled environments. web enabled environments.
@param mac= to contain the name of the calling macro @param mac= to contain the name of the calling macro
@@ -1542,6 +1548,7 @@ Usage:
@version 9.4M3 @version 9.4M3
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
%macro mp_abort(mac=mp_abort.sas, type=, msg=, iftrue=%str(1=1) %macro mp_abort(mac=mp_abort.sas, type=, msg=, iftrue=%str(1=1)
@@ -1554,7 +1561,7 @@ Usage:
%put NOTE - &msg; %put NOTE - &msg;
/* Stored Process Server web app context */ /* Stored Process Server web app context */
%if %symexist(_metaperson) %if %symexist(_metaperson)
or (%symexist(SYSPROCESSNAME) and "&SYSPROCESSNAME"="Compute Server" ) or (%symexist(SYSPROCESSNAME) and "&SYSPROCESSNAME"="Compute Server" )
%then %do; %then %do;
options obs=max replace nosyntaxcheck mprint; options obs=max replace nosyntaxcheck mprint;
@@ -1675,7 +1682,7 @@ Usage:
%end; %end;
%mend; %mend;
/** /** @endcond *//**
@file @file
@brief Copy any file using binary input / output streams @brief Copy any file using binary input / output streams
@details Reads in a file byte by byte and writes it back out. Is an @details Reads in a file byte by byte and writes it back out. Is an
@@ -1739,6 +1746,7 @@ Usage:
applying CRLF line endings and converting embedded cr and crlf to lf. applying CRLF line endings and converting embedded cr and crlf to lf.
usage: usage:
fileref mycsv "/path/your/csv"; fileref mycsv "/path/your/csv";
%mp_cleancsv(in=mycsv,out=/path/new.csv) %mp_cleancsv(in=mycsv,out=/path/new.csv)
@@ -1748,6 +1756,7 @@ Usage:
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
%macro mp_cleancsv(in=NOTPROVIDED,out=NOTPROVIDED,qchar='22'x); %macro mp_cleancsv(in=NOTPROVIDED,out=NOTPROVIDED,qchar='22'x);
@@ -1796,7 +1805,8 @@ Usage:
else put inchar $char1.; else put inchar $char1.;
end; end;
run; run;
%mend;/** %mend;
/** @endcond *//**
@file mp_createconstraints.sas @file mp_createconstraints.sas
@brief Creates constraints @brief Creates constraints
@details Takes the output from mp_getconstraints.sas as input @details Takes the output from mp_getconstraints.sas as input
@@ -2712,6 +2722,8 @@ create table &outds as
You may need to adjust the rendered DBML to suit your needs. You may need to adjust the rendered DBML to suit your needs.
![dbml for sas](https://i.imgur.com/8T1tIZp.gif)
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_getquotedstr.sas @li mf_getquotedstr.sas

View File

@@ -21,8 +21,8 @@
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
/** @cond */
%macro mf_abort(mac=mf_abort.sas, type=, msg=, iftrue=%str(1=1) %macro mf_abort(mac=mf_abort.sas, type=, msg=, iftrue=%str(1=1)
)/*/STORE SOURCE*/; )/*/STORE SOURCE*/;

View File

@@ -14,6 +14,7 @@
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
%macro mf_existvarlist(libds, varlist %macro mf_existvarlist(libds, varlist
@@ -53,4 +54,6 @@
0 0
%put Vars not found: &found; %put Vars not found: &found;
%end; %end;
%mend; %mend;
/** @endcond */

View File

@@ -17,6 +17,7 @@
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
%macro mf_getschema(libref %macro mf_getschema(libref
@@ -38,3 +39,5 @@
&schema &schema
%mend; %mend;
/** @endcond */

View File

@@ -5,11 +5,11 @@
the particulars of an environment. For instance, can stream custom the particulars of an environment. For instance, can stream custom
results back to the client in an STP Web App context, or completely stop results back to the client in an STP Web App context, or completely stop
in the case of a batch run. in the case of a batch run.
Using SAS Abort Cancel mechanisms can cause hung sessions in some Stored Process Using SAS Abort Cancel mechanisms can cause hung sessions in some Stored Process
environments. This macro takes a unique approach - we set the SAS syscc to 0, environments. This macro takes a unique approach - we set the SAS syscc to 0,
run `stpsrvset('program error', 0)` (if SAS 9) and then - we open a macro run `stpsrvset('program error', 0)` (if SAS 9) and then - we open a macro
but don't close it! This provides a graceful abort for SAS web services in all but don't close it! This provides a graceful abort for SAS web services in all
web enabled environments. web enabled environments.
@param mac= to contain the name of the calling macro @param mac= to contain the name of the calling macro
@@ -18,6 +18,7 @@
@version 9.4M3 @version 9.4M3
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
%macro mp_abort(mac=mp_abort.sas, type=, msg=, iftrue=%str(1=1) %macro mp_abort(mac=mp_abort.sas, type=, msg=, iftrue=%str(1=1)
@@ -30,7 +31,7 @@
%put NOTE - &msg; %put NOTE - &msg;
/* Stored Process Server web app context */ /* Stored Process Server web app context */
%if %symexist(_metaperson) %if %symexist(_metaperson)
or (%symexist(SYSPROCESSNAME) and "&SYSPROCESSNAME"="Compute Server" ) or (%symexist(SYSPROCESSNAME) and "&SYSPROCESSNAME"="Compute Server" )
%then %do; %then %do;
options obs=max replace nosyntaxcheck mprint; options obs=max replace nosyntaxcheck mprint;
@@ -151,3 +152,4 @@
%end; %end;
%mend; %mend;
/** @endcond */

View File

@@ -8,6 +8,7 @@
applying CRLF line endings and converting embedded cr and crlf to lf. applying CRLF line endings and converting embedded cr and crlf to lf.
usage: usage:
fileref mycsv "/path/your/csv"; fileref mycsv "/path/your/csv";
%mp_cleancsv(in=mycsv,out=/path/new.csv) %mp_cleancsv(in=mycsv,out=/path/new.csv)
@@ -17,6 +18,7 @@
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
@cond
**/ **/
%macro mp_cleancsv(in=NOTPROVIDED,out=NOTPROVIDED,qchar='22'x); %macro mp_cleancsv(in=NOTPROVIDED,out=NOTPROVIDED,qchar='22'x);
@@ -65,4 +67,5 @@
else put inchar $char1.; else put inchar $char1.;
end; end;
run; run;
%mend; %mend;
/** @endcond */

View File

@@ -16,6 +16,8 @@
You may need to adjust the rendered DBML to suit your needs. You may need to adjust the rendered DBML to suit your needs.
![dbml for sas](https://i.imgur.com/8T1tIZp.gif)
<h4> SAS Macros </h4> <h4> SAS Macros </h4>
@li mf_getquotedstr.sas @li mf_getquotedstr.sas

View File

@@ -13,6 +13,11 @@
* Not metadata aware * Not metadata aware
* No X command * No X command
* Prefixes: _mf_, _mp_ * Prefixes: _mf_, _mp_
Macros starting `mf_` are macro _functions_ and can be used in assignment
statements. Those starting `mp_` are macro _procedures_, which generate
SAS statements, and must therefore be applied accordingly.
*/ */
/*! \dir meta /*! \dir meta