mirror of
https://github.com/sasjs/core.git
synced 2026-01-07 01:20:05 +00:00
Compare commits
53 Commits
v4.47.0
...
all-contri
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1db610a122 | ||
|
|
c9e431142c | ||
|
|
2b2aa5eb58 | ||
|
|
1ac2b480a6 | ||
|
|
4e53544b66 | ||
|
|
9b5f1cf170 | ||
|
|
703fe4ef38 | ||
|
|
f4a4263046 | ||
|
|
02bf9c85db | ||
|
|
5835cfaa83 | ||
|
|
b50521a8de | ||
|
|
fccd6fcc44 | ||
|
|
487ff5faa9 | ||
|
|
5efc20eacc | ||
|
|
cbd62fbfab | ||
|
|
2808145302 | ||
|
|
815e5f3e0e | ||
|
|
843d6e5c2d | ||
|
|
b084f4e84b | ||
|
|
5b5116070e | ||
|
|
a2002db838 | ||
|
|
dc6bcdd69e | ||
|
|
c97dc9a16d | ||
|
|
ef669db622 | ||
|
|
26499d2058 | ||
|
|
17e5d0f0e0 | ||
|
|
fc9205e355 | ||
|
|
ce344fc8e2 | ||
|
|
40239c53d8 | ||
|
|
814ecec94f | ||
|
|
934c501fec | ||
|
|
091b2e28be | ||
|
|
d8ea29bf8c | ||
|
|
993dec4610 | ||
|
|
f905387d66 | ||
|
|
7512423b04 | ||
|
|
50e6d416a4 | ||
|
|
18b6cadce6 | ||
|
|
413743bbe6 | ||
|
|
fcafb1026e | ||
|
|
b8f24264d4 | ||
|
|
5eb87a754e | ||
|
|
3a5fd4bfc5 | ||
|
|
b7ae9a2737 | ||
|
|
4057ac4b2e | ||
|
|
fa0a6ab22d | ||
|
|
2ae7a60be5 | ||
|
|
0a24f3ff7b | ||
|
|
592f477063 | ||
|
|
a91db81894 | ||
|
|
236e7cc4c0 | ||
|
|
2b6882cb9c | ||
|
|
2a3071708a |
@@ -144,8 +144,27 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"doc"
|
"doc"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "rudvfaden",
|
||||||
|
"name": "Rud Faden",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/2445577?v=4",
|
||||||
|
"profile": "http://rudvfaden.github.io/",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "andyjessen",
|
||||||
|
"name": "andyjessen",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/62343929?v=4",
|
||||||
|
"profile": "https://github.com/andyjessen",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
"skipCi": true
|
"skipCi": true,
|
||||||
|
"commitType": "docs"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Ensure lint is passing
|
# Ensure lint is passing
|
||||||
LINT=`sasjs lint`
|
LINT=`sasjs lint`
|
||||||
if [[ "$LINT" != *"✔ All matched files use @sasjs/lint code style!" ]]; then
|
if [[ "$LINT" != *"All matched files use @sasjs/lint code style!" ]]; then
|
||||||
echo "$LINT"
|
echo "$LINT"
|
||||||
echo "To commit in spite of these warnings, use the -n parameter."
|
echo "To commit in spite of these warnings, use the -n parameter."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
3
.github/CONTRIBUTING.md
vendored
3
.github/CONTRIBUTING.md
vendored
@@ -27,5 +27,6 @@ To contribute:
|
|||||||
1. Create your feature branch (`git checkout -b myfeature`)
|
1. Create your feature branch (`git checkout -b myfeature`)
|
||||||
2. Make your change
|
2. Make your change
|
||||||
3. Update the `all.sas` file (`python3 build.py`)
|
3. Update the `all.sas` file (`python3 build.py`)
|
||||||
4. Push and make a PR
|
4. Commit using a [Conventional Commit](https://www.conventionalcommits.org)
|
||||||
|
5. Push and make a PR
|
||||||
|
|
||||||
|
|||||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -15,4 +15,4 @@ What code changes have been made to achieve the intent.
|
|||||||
- [ ] Code is formatted correctly (`sasjs lint`).
|
- [ ] Code is formatted correctly (`sasjs lint`).
|
||||||
- [ ] Any new functionality has been unit tested.
|
- [ ] Any new functionality has been unit tested.
|
||||||
- [ ] All unit tests are passing (`sasjs test`).
|
- [ ] All unit tests are passing (`sasjs test`).
|
||||||
- [ ] `all.sas` has been regenerated (`python3 build.py`)
|
- [ ] The PR desc or underlying commits follow the [Conventional Commit](https://www.conventionalcommits.org) standard
|
||||||
|
|||||||
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@@ -13,10 +13,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: |
|
||||||
|
npm ci
|
||||||
|
|
||||||
- name: Check code style (aborts if errors found)
|
- name: Check code style (aborts if errors found)
|
||||||
run: npx @sasjs/cli lint
|
run: npx @sasjs/cli lint
|
||||||
@@ -36,14 +37,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Open VPN
|
- name: Install Open VPN
|
||||||
run: |
|
run: |
|
||||||
sudo apt install apt-transport-https
|
#sudo apt install apt-transport-https
|
||||||
sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
|
#sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
|
||||||
sudo apt-key add openvpn-repo-pkg-key.pub
|
#sudo apt-key add openvpn-repo-pkg-key.pub
|
||||||
sudo wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-jammy.list
|
#sudo wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-jammy.list
|
||||||
sudo apt update
|
#sudo apt update
|
||||||
sudo apt install openvpn3=17~betaUb22042+jammy
|
#sudo apt install openvpn3=17~betaUb22042+jammy
|
||||||
- name: Start Open VPN 3
|
- name: Start Open VPN 3
|
||||||
run: openvpn3 session-start --config .github/vpn/config.ovpn
|
run: |
|
||||||
|
# openvpn3 session-start --config .github/vpn/config.ovpn
|
||||||
|
|
||||||
- name: Add credentials
|
- name: Add credentials
|
||||||
run: |
|
run: |
|
||||||
@@ -52,7 +54,7 @@ jobs:
|
|||||||
echo "REFRESH_TOKEN=${{secrets.SAS9_4GL_IO_REFRESH_TOKEN}}" >> .env.server
|
echo "REFRESH_TOKEN=${{secrets.SAS9_4GL_IO_REFRESH_TOKEN}}" >> .env.server
|
||||||
|
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v3
|
uses: cycjimmy/semantic-release-action@v4
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|||||||
32
.github/workflows/notmain.yml
vendored
Normal file
32
.github/workflows/notmain.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
||||||
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
||||||
|
|
||||||
|
name: SASjs Core - Update all.sas
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm i -g @sasjs/cli@latest
|
||||||
|
|
||||||
|
- name: Ensure all.sas is always up to date
|
||||||
|
run: |
|
||||||
|
git config user.name github-actions
|
||||||
|
git config user.email github-actions@github.com
|
||||||
|
python3 build.py
|
||||||
|
git add all.sas
|
||||||
|
git commit -m "chore: updating all.sas" --allow-empty
|
||||||
|
git push
|
||||||
|
|
||||||
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ mc_*
|
|||||||
*.env*
|
*.env*
|
||||||
|
|
||||||
~
|
~
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,8 @@ When contributing to this library, it is therefore important to ensure that all
|
|||||||
|
|
||||||
## General Notes
|
## General Notes
|
||||||
|
|
||||||
- All macros should be compatible with SAS versions from support level B and above (so currently 9.2 and later). If an earlier version is not supported, then the macro should say as such in the header documentation, and exit gracefully (eg `%if %sysevalf(&sysver<9.3) %then %return`).
|
- All macros should be compatible with SAS versions from support level B and above (so currently 9.3 and later). If an earlier version is not supported, then the macro should say as such in the header documentation, and exit gracefully.
|
||||||
|
- It's [best to avoid](https://git.datacontroller.io/dc/dc/issues/50) special / non-ASCII characters for compatibility with the widest variety of SAS installations.
|
||||||
|
|
||||||
## Breaking Changes
|
## Breaking Changes
|
||||||
|
|
||||||
@@ -247,7 +248,7 @@ The following repositories are also worth checking out:
|
|||||||
|
|
||||||
## Contributors ✨
|
## Contributors ✨
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||||
[](#contributors-)
|
[](#contributors-)
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||||
|
|
||||||
@@ -272,6 +273,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yabwon"><img src="https://avatars.githubusercontent.com/u/9314894?v=4?s=100" width="100px;" alt="Bart Jablonski"/><br /><sub><b>Bart Jablonski</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=yabwon" title="Code">💻</a></td>
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yabwon"><img src="https://avatars.githubusercontent.com/u/9314894?v=4?s=100" width="100px;" alt="Bart Jablonski"/><br /><sub><b>Bart Jablonski</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=yabwon" title="Code">💻</a></td>
|
||||||
<td align="center" valign="top" width="14.28%"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt="Ikko Ashimine"/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=eltociear" title="Code">💻</a></td>
|
<td align="center" valign="top" width="14.28%"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt="Ikko Ashimine"/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=eltociear" title="Code">💻</a></td>
|
||||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/henrik-forsell"><img src="https://avatars.githubusercontent.com/u/109935936?v=4?s=100" width="100px;" alt="Henrik Forsell"/><br /><sub><b>Henrik Forsell</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=henrik-forsell" title="Documentation">📖</a></td>
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/henrik-forsell"><img src="https://avatars.githubusercontent.com/u/109935936?v=4?s=100" width="100px;" alt="Henrik Forsell"/><br /><sub><b>Henrik Forsell</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=henrik-forsell" title="Documentation">📖</a></td>
|
||||||
|
<td align="center" valign="top" width="14.28%"><a href="http://rudvfaden.github.io/"><img src="https://avatars.githubusercontent.com/u/2445577?v=4?s=100" width="100px;" alt="Rud Faden"/><br /><sub><b>Rud Faden</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=rudvfaden" title="Code">💻</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/andyjessen"><img src="https://avatars.githubusercontent.com/u/62343929?v=4?s=100" width="100px;" alt="andyjessen"/><br /><sub><b>andyjessen</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=andyjessen" title="Documentation">📖</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
76
all.sas
76
all.sas
@@ -1684,7 +1684,7 @@ Usage:
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
%put mf_isblank(&var);
|
%put %mf_isblank(&var);
|
||||||
|
|
||||||
inspiration:
|
inspiration:
|
||||||
https://support.sas.com/resources/papers/proceedings09/022-2009.pdf
|
https://support.sas.com/resources/papers/proceedings09/022-2009.pdf
|
||||||
@@ -10184,6 +10184,7 @@ select distinct lowcase(memname)
|
|||||||
@li mp_aligndecimal.sas
|
@li mp_aligndecimal.sas
|
||||||
@li mp_cntlout.sas
|
@li mp_cntlout.sas
|
||||||
@li mp_lockanytable.sas
|
@li mp_lockanytable.sas
|
||||||
|
@li mp_md5.sas
|
||||||
@li mp_storediffs.sas
|
@li mp_storediffs.sas
|
||||||
|
|
||||||
<h4> Related Macros </h4>
|
<h4> Related Macros </h4>
|
||||||
@@ -13766,7 +13767,7 @@ alter table &libds modify &var char(&len);
|
|||||||
%end;
|
%end;
|
||||||
%else %if &rule=ISNUM %then %do;
|
%else %if &rule=ISNUM %then %do;
|
||||||
/*
|
/*
|
||||||
credit SØREN LASSEN
|
credit SOREN LASSEN
|
||||||
https://sasmacro.blogspot.com/2009/06/welcome-isnum-macro.html
|
https://sasmacro.blogspot.com/2009/06/welcome-isnum-macro.html
|
||||||
*/
|
*/
|
||||||
&tempcol=input(&incol,?? best32.);
|
&tempcol=input(&incol,?? best32.);
|
||||||
@@ -14176,6 +14177,22 @@ ods package close;
|
|||||||
(given various practical restrictions) are described here to enable
|
(given various practical restrictions) are described here to enable
|
||||||
consistency when dealing with format data.
|
consistency when dealing with format data.
|
||||||
|
|
||||||
|
The HLO variable may have a number of values, documented here due to the
|
||||||
|
256 char label description length limit:
|
||||||
|
|
||||||
|
F=Standard format/informat.
|
||||||
|
H=Range ending value is HIGH.
|
||||||
|
I=Numeric informat.
|
||||||
|
J=Justification for an informat.
|
||||||
|
L=Range starting value is LOW.
|
||||||
|
M=MultiLabel.
|
||||||
|
N=Format or informat has no ranges, including no OTHER= range.
|
||||||
|
O=Range is OTHER.
|
||||||
|
R=ROUND option is in effect.
|
||||||
|
S=Specifies that NOTSORTED is in effect.
|
||||||
|
U=Specifies that the UPCASE option for an informat be used.
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
@@ -14183,9 +14200,11 @@ ods package close;
|
|||||||
|
|
||||||
proc sql;
|
proc sql;
|
||||||
create table &libds(
|
create table &libds(
|
||||||
TYPE char(1) label='Type of format - either N (num fmt), C (char fmt), I (num infmt) or J (char infmt)'
|
TYPE char(1) label=
|
||||||
|
'Format Type: either N (num fmt), C (char fmt), I (num infmt) or J (char infmt)'
|
||||||
,FMTNAME char(32) label='Format name'
|
,FMTNAME char(32) label='Format name'
|
||||||
,FMTROW num label='CALCULATED Position of record by FMTNAME (reqd for multilabel formats)'
|
,FMTROW num label=
|
||||||
|
'CALCULATED Position of record by FMTNAME (reqd for multilabel formats)'
|
||||||
,START char(32767) label='Starting value for format'
|
,START char(32767) label='Starting value for format'
|
||||||
/*
|
/*
|
||||||
Keep lengths of START and END the same to avoid this err:
|
Keep lengths of START and END the same to avoid this err:
|
||||||
@@ -14205,18 +14224,8 @@ ods package close;
|
|||||||
,NOEDIT num length=3 label='Is picture string noedit?'
|
,NOEDIT num length=3 label='Is picture string noedit?'
|
||||||
,SEXCL char(1) label='Start exclusion'
|
,SEXCL char(1) label='Start exclusion'
|
||||||
,EEXCL char(1) label='End exclusion'
|
,EEXCL char(1) label='End exclusion'
|
||||||
,HLO char(13) label='Additional information.
|
,HLO char(13) label=
|
||||||
F=Standard format/informat.
|
'More info: https://core.sasjs.io/mddl__sas__cntlout_8sas_source.html'
|
||||||
H=Range ending value is HIGH.
|
|
||||||
I=Numeric informat.
|
|
||||||
J=Justification for an informat.
|
|
||||||
L=Range starting value is LOW.
|
|
||||||
M=MultiLabel.
|
|
||||||
N=Format or informat has no ranges, including no OTHER= range.
|
|
||||||
O=Range is OTHER.
|
|
||||||
R=ROUND option is in effect.
|
|
||||||
S=Specifies that NOTSORTED is in effect.
|
|
||||||
U=Specifies that the UPCASE option for an informat be used.'
|
|
||||||
,DECSEP char(1) label='Decimal separator'
|
,DECSEP char(1) label='Decimal separator'
|
||||||
,DIG3SEP char(1) label='Three-digit separator'
|
,DIG3SEP char(1) label='Three-digit separator'
|
||||||
,DATATYPE char(8) label='Date/time/datetime?'
|
,DATATYPE char(8) label='Date/time/datetime?'
|
||||||
@@ -14550,9 +14559,9 @@ run;
|
|||||||
%end;
|
%end;
|
||||||
%end;
|
%end;
|
||||||
%else %if &engine=ODBC %then %do;
|
%else %if &engine=ODBC %then %do;
|
||||||
&mD.%put NOTE: Retrieving ODBC connection details;
|
%&mD.put NOTE: Retrieving ODBC connection details;
|
||||||
data _null_;
|
data _null_;
|
||||||
length connx_uri conprop_uri value datasource up_uri schema $256.;
|
length connx_uri conprop_uri value datasource up_uri schema domprop_uri authdomain $256.;
|
||||||
call missing (of _all_);
|
call missing (of _all_);
|
||||||
/* get source connection ID */
|
/* get source connection ID */
|
||||||
rc=metadata_getnasn("&liburi",'LibraryConnection',1,connx_uri);
|
rc=metadata_getnasn("&liburi",'LibraryConnection',1,connx_uri);
|
||||||
@@ -14567,6 +14576,13 @@ run;
|
|||||||
rc2=-1;
|
rc2=-1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
/* get auth domain */
|
||||||
|
autrc=metadata_getnasn(connx_uri,"Domain",1,domprop_uri);
|
||||||
|
arc=metadata_getattr(domprop_uri,"Name",authdomain);
|
||||||
|
if not missing(authdomain) then authdomain=cats('AUTHDOMAIN=',authdomain);
|
||||||
|
call symputx('authdomain',authdomain,'l');
|
||||||
|
|
||||||
/* get SCHEMA */
|
/* get SCHEMA */
|
||||||
rc6=metadata_getnasn("&liburi",'UsingPackages',1,up_uri);
|
rc6=metadata_getnasn("&liburi",'UsingPackages',1,up_uri);
|
||||||
rc7=metadata_getattr(up_uri,'SchemaName',schema);
|
rc7=metadata_getattr(up_uri,'SchemaName',schema);
|
||||||
@@ -14583,7 +14599,7 @@ run;
|
|||||||
(INSERT_SQL=YES DATASRC=&sql_dsn. CONNECTION=global);
|
(INSERT_SQL=YES DATASRC=&sql_dsn. CONNECTION=global);
|
||||||
%end;
|
%end;
|
||||||
%else %do;
|
%else %do;
|
||||||
libname &libref ODBC DATASRC=&sql_dsn SCHEMA=&sql_schema;
|
libname &libref ODBC DATASRC=&sql_dsn SCHEMA=&sql_schema &authdomain;
|
||||||
%end;
|
%end;
|
||||||
%end;
|
%end;
|
||||||
%else %if &engine=POSTGRES %then %do;
|
%else %if &engine=POSTGRES %then %do;
|
||||||
@@ -15828,6 +15844,11 @@ filename &frefout temp;
|
|||||||
a conflict)
|
a conflict)
|
||||||
@param [in] repo= ServerContext is tied to a repo, if you are not using the
|
@param [in] repo= ServerContext is tied to a repo, if you are not using the
|
||||||
foundation repo then select a different one here
|
foundation repo then select a different one here
|
||||||
|
@param [in] LogicalServerType= (Sps) Server Type to use. Valid options:
|
||||||
|
@li Any - Uses the default server.
|
||||||
|
@li Sps - Stored Process Server, best choice for web app development. Runs
|
||||||
|
under a system account identity (eg sassrv).
|
||||||
|
@li Wks - Workspace Server. Runs under the end user identity.
|
||||||
|
|
||||||
@returns outds dataset containing the following columns:
|
@returns outds dataset containing the following columns:
|
||||||
- stpuri
|
- stpuri
|
||||||
@@ -15867,6 +15888,7 @@ filename &frefout temp;
|
|||||||
,minify=NO
|
,minify=NO
|
||||||
,frefin=mm_in
|
,frefin=mm_in
|
||||||
,frefout=mm_out
|
,frefout=mm_out
|
||||||
|
,LogicalServerType=Sps
|
||||||
)/*/STORE SOURCE*/;
|
)/*/STORE SOURCE*/;
|
||||||
|
|
||||||
%local mD;
|
%local mD;
|
||||||
@@ -15883,6 +15905,17 @@ filename &frefout temp;
|
|||||||
|
|
||||||
%mp_dropmembers(%scan(&outds,2,.))
|
%mp_dropmembers(%scan(&outds,2,.))
|
||||||
|
|
||||||
|
/* check LogicalServerType validity */
|
||||||
|
%mp_abort(
|
||||||
|
iftrue=(
|
||||||
|
&LogicalServerType ne Sps
|
||||||
|
and &LogicalServerType ne Wks
|
||||||
|
and &LogicalServerType ne Any
|
||||||
|
)
|
||||||
|
,mac=&sysmacroname
|
||||||
|
,msg=%str(Invalid value for LogicalServerType (&LogicalServerType))
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check tree exists
|
* check tree exists
|
||||||
*/
|
*/
|
||||||
@@ -16115,8 +16148,9 @@ run;
|
|||||||
' <TextStore IsHidden="0" Name="Stored Process" UsageVersion="0" '/
|
' <TextStore IsHidden="0" Name="Stored Process" UsageVersion="0" '/
|
||||||
' TextRole="StoredProcessConfiguration" TextType="XML" '/
|
' TextRole="StoredProcessConfiguration" TextType="XML" '/
|
||||||
' StoredText="<?xml version="1.0" encoding="UTF-8&qu'@@
|
' StoredText="<?xml version="1.0" encoding="UTF-8&qu'@@
|
||||||
'ot;?><StoredProcess><ServerContext LogicalServerType="S'@@
|
'ot;?><StoredProcess><ServerContext LogicalServerType="'@@
|
||||||
'ps" OtherAllowed="false"/><ResultCapabilities Packa'@@
|
"&LogicalServerType"@@
|
||||||
|
'" OtherAllowed="false"/><ResultCapabilities Packa'@@
|
||||||
'ge="' @@ "&package" @@ '" Streaming="' @@ "&streaming" @@
|
'ge="' @@ "&package" @@ '" Streaming="' @@ "&streaming" @@
|
||||||
'"/><OutputParameters/></StoredProcess>" />' /
|
'"/><OutputParameters/></StoredProcess>" />' /
|
||||||
" </Notes> "/
|
" </Notes> "/
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
%put mf_isblank(&var);
|
%put %mf_isblank(&var);
|
||||||
|
|
||||||
inspiration:
|
inspiration:
|
||||||
https://support.sas.com/resources/papers/proceedings09/022-2009.pdf
|
https://support.sas.com/resources/papers/proceedings09/022-2009.pdf
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
@li mp_aligndecimal.sas
|
@li mp_aligndecimal.sas
|
||||||
@li mp_cntlout.sas
|
@li mp_cntlout.sas
|
||||||
@li mp_lockanytable.sas
|
@li mp_lockanytable.sas
|
||||||
|
@li mp_md5.sas
|
||||||
@li mp_storediffs.sas
|
@li mp_storediffs.sas
|
||||||
|
|
||||||
<h4> Related Macros </h4>
|
<h4> Related Macros </h4>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
%end;
|
%end;
|
||||||
%else %if &rule=ISNUM %then %do;
|
%else %if &rule=ISNUM %then %do;
|
||||||
/*
|
/*
|
||||||
credit SØREN LASSEN
|
credit SOREN LASSEN
|
||||||
https://sasmacro.blogspot.com/2009/06/welcome-isnum-macro.html
|
https://sasmacro.blogspot.com/2009/06/welcome-isnum-macro.html
|
||||||
*/
|
*/
|
||||||
&tempcol=input(&incol,?? best32.);
|
&tempcol=input(&incol,?? best32.);
|
||||||
|
|||||||
@@ -6,6 +6,22 @@
|
|||||||
(given various practical restrictions) are described here to enable
|
(given various practical restrictions) are described here to enable
|
||||||
consistency when dealing with format data.
|
consistency when dealing with format data.
|
||||||
|
|
||||||
|
The HLO variable may have a number of values, documented here due to the
|
||||||
|
256 char label description length limit:
|
||||||
|
|
||||||
|
F=Standard format/informat.
|
||||||
|
H=Range ending value is HIGH.
|
||||||
|
I=Numeric informat.
|
||||||
|
J=Justification for an informat.
|
||||||
|
L=Range starting value is LOW.
|
||||||
|
M=MultiLabel.
|
||||||
|
N=Format or informat has no ranges, including no OTHER= range.
|
||||||
|
O=Range is OTHER.
|
||||||
|
R=ROUND option is in effect.
|
||||||
|
S=Specifies that NOTSORTED is in effect.
|
||||||
|
U=Specifies that the UPCASE option for an informat be used.
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
@@ -13,9 +29,11 @@
|
|||||||
|
|
||||||
proc sql;
|
proc sql;
|
||||||
create table &libds(
|
create table &libds(
|
||||||
TYPE char(1) label='Type of format - either N (num fmt), C (char fmt), I (num infmt) or J (char infmt)'
|
TYPE char(1) label=
|
||||||
|
'Format Type: either N (num fmt), C (char fmt), I (num infmt) or J (char infmt)'
|
||||||
,FMTNAME char(32) label='Format name'
|
,FMTNAME char(32) label='Format name'
|
||||||
,FMTROW num label='CALCULATED Position of record by FMTNAME (reqd for multilabel formats)'
|
,FMTROW num label=
|
||||||
|
'CALCULATED Position of record by FMTNAME (reqd for multilabel formats)'
|
||||||
,START char(32767) label='Starting value for format'
|
,START char(32767) label='Starting value for format'
|
||||||
/*
|
/*
|
||||||
Keep lengths of START and END the same to avoid this err:
|
Keep lengths of START and END the same to avoid this err:
|
||||||
@@ -35,18 +53,8 @@
|
|||||||
,NOEDIT num length=3 label='Is picture string noedit?'
|
,NOEDIT num length=3 label='Is picture string noedit?'
|
||||||
,SEXCL char(1) label='Start exclusion'
|
,SEXCL char(1) label='Start exclusion'
|
||||||
,EEXCL char(1) label='End exclusion'
|
,EEXCL char(1) label='End exclusion'
|
||||||
,HLO char(13) label='Additional information.
|
,HLO char(13) label=
|
||||||
F=Standard format/informat.
|
'More info: https://core.sasjs.io/mddl__sas__cntlout_8sas_source.html'
|
||||||
H=Range ending value is HIGH.
|
|
||||||
I=Numeric informat.
|
|
||||||
J=Justification for an informat.
|
|
||||||
L=Range starting value is LOW.
|
|
||||||
M=MultiLabel.
|
|
||||||
N=Format or informat has no ranges, including no OTHER= range.
|
|
||||||
O=Range is OTHER.
|
|
||||||
R=ROUND option is in effect.
|
|
||||||
S=Specifies that NOTSORTED is in effect.
|
|
||||||
U=Specifies that the UPCASE option for an informat be used.'
|
|
||||||
,DECSEP char(1) label='Decimal separator'
|
,DECSEP char(1) label='Decimal separator'
|
||||||
,DIG3SEP char(1) label='Three-digit separator'
|
,DIG3SEP char(1) label='Three-digit separator'
|
||||||
,DATATYPE char(8) label='Date/time/datetime?'
|
,DATATYPE char(8) label='Date/time/datetime?'
|
||||||
|
|||||||
@@ -210,9 +210,9 @@ run;
|
|||||||
%end;
|
%end;
|
||||||
%end;
|
%end;
|
||||||
%else %if &engine=ODBC %then %do;
|
%else %if &engine=ODBC %then %do;
|
||||||
&mD.%put NOTE: Retrieving ODBC connection details;
|
%&mD.put NOTE: Retrieving ODBC connection details;
|
||||||
data _null_;
|
data _null_;
|
||||||
length connx_uri conprop_uri value datasource up_uri schema $256.;
|
length connx_uri conprop_uri value datasource up_uri schema domprop_uri authdomain $256.;
|
||||||
call missing (of _all_);
|
call missing (of _all_);
|
||||||
/* get source connection ID */
|
/* get source connection ID */
|
||||||
rc=metadata_getnasn("&liburi",'LibraryConnection',1,connx_uri);
|
rc=metadata_getnasn("&liburi",'LibraryConnection',1,connx_uri);
|
||||||
@@ -227,6 +227,13 @@ run;
|
|||||||
rc2=-1;
|
rc2=-1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
/* get auth domain */
|
||||||
|
autrc=metadata_getnasn(connx_uri,"Domain",1,domprop_uri);
|
||||||
|
arc=metadata_getattr(domprop_uri,"Name",authdomain);
|
||||||
|
if not missing(authdomain) then authdomain=cats('AUTHDOMAIN=',authdomain);
|
||||||
|
call symputx('authdomain',authdomain,'l');
|
||||||
|
|
||||||
/* get SCHEMA */
|
/* get SCHEMA */
|
||||||
rc6=metadata_getnasn("&liburi",'UsingPackages',1,up_uri);
|
rc6=metadata_getnasn("&liburi",'UsingPackages',1,up_uri);
|
||||||
rc7=metadata_getattr(up_uri,'SchemaName',schema);
|
rc7=metadata_getattr(up_uri,'SchemaName',schema);
|
||||||
@@ -243,7 +250,7 @@ run;
|
|||||||
(INSERT_SQL=YES DATASRC=&sql_dsn. CONNECTION=global);
|
(INSERT_SQL=YES DATASRC=&sql_dsn. CONNECTION=global);
|
||||||
%end;
|
%end;
|
||||||
%else %do;
|
%else %do;
|
||||||
libname &libref ODBC DATASRC=&sql_dsn SCHEMA=&sql_schema;
|
libname &libref ODBC DATASRC=&sql_dsn SCHEMA=&sql_schema &authdomain;
|
||||||
%end;
|
%end;
|
||||||
%end;
|
%end;
|
||||||
%else %if &engine=POSTGRES %then %do;
|
%else %if &engine=POSTGRES %then %do;
|
||||||
|
|||||||
@@ -67,6 +67,11 @@
|
|||||||
a conflict)
|
a conflict)
|
||||||
@param [in] repo= ServerContext is tied to a repo, if you are not using the
|
@param [in] repo= ServerContext is tied to a repo, if you are not using the
|
||||||
foundation repo then select a different one here
|
foundation repo then select a different one here
|
||||||
|
@param [in] LogicalServerType= (Sps) Server Type to use. Valid options:
|
||||||
|
@li Any - Uses the default server.
|
||||||
|
@li Sps - Stored Process Server, best choice for web app development. Runs
|
||||||
|
under a system account identity (eg sassrv).
|
||||||
|
@li Wks - Workspace Server. Runs under the end user identity.
|
||||||
|
|
||||||
@returns outds dataset containing the following columns:
|
@returns outds dataset containing the following columns:
|
||||||
- stpuri
|
- stpuri
|
||||||
@@ -106,6 +111,7 @@
|
|||||||
,minify=NO
|
,minify=NO
|
||||||
,frefin=mm_in
|
,frefin=mm_in
|
||||||
,frefout=mm_out
|
,frefout=mm_out
|
||||||
|
,LogicalServerType=Sps
|
||||||
)/*/STORE SOURCE*/;
|
)/*/STORE SOURCE*/;
|
||||||
|
|
||||||
%local mD;
|
%local mD;
|
||||||
@@ -122,6 +128,17 @@
|
|||||||
|
|
||||||
%mp_dropmembers(%scan(&outds,2,.))
|
%mp_dropmembers(%scan(&outds,2,.))
|
||||||
|
|
||||||
|
/* check LogicalServerType validity */
|
||||||
|
%mp_abort(
|
||||||
|
iftrue=(
|
||||||
|
&LogicalServerType ne Sps
|
||||||
|
and &LogicalServerType ne Wks
|
||||||
|
and &LogicalServerType ne Any
|
||||||
|
)
|
||||||
|
,mac=&sysmacroname
|
||||||
|
,msg=%str(Invalid value for LogicalServerType (&LogicalServerType))
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check tree exists
|
* check tree exists
|
||||||
*/
|
*/
|
||||||
@@ -354,8 +371,9 @@ run;
|
|||||||
' <TextStore IsHidden="0" Name="Stored Process" UsageVersion="0" '/
|
' <TextStore IsHidden="0" Name="Stored Process" UsageVersion="0" '/
|
||||||
' TextRole="StoredProcessConfiguration" TextType="XML" '/
|
' TextRole="StoredProcessConfiguration" TextType="XML" '/
|
||||||
' StoredText="<?xml version="1.0" encoding="UTF-8&qu'@@
|
' StoredText="<?xml version="1.0" encoding="UTF-8&qu'@@
|
||||||
'ot;?><StoredProcess><ServerContext LogicalServerType="S'@@
|
'ot;?><StoredProcess><ServerContext LogicalServerType="'@@
|
||||||
'ps" OtherAllowed="false"/><ResultCapabilities Packa'@@
|
"&LogicalServerType"@@
|
||||||
|
'" OtherAllowed="false"/><ResultCapabilities Packa'@@
|
||||||
'ge="' @@ "&package" @@ '" Streaming="' @@ "&streaming" @@
|
'ge="' @@ "&package" @@ '" Streaming="' @@ "&streaming" @@
|
||||||
'"/><OutputParameters/></StoredProcess>" />' /
|
'"/><OutputParameters/></StoredProcess>" />' /
|
||||||
" </Notes> "/
|
" </Notes> "/
|
||||||
|
|||||||
Reference in New Issue
Block a user