@sasjs/core 4.35.4 → 4.36.0
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/README.md +9 -9
- package/meta/mm_getstpinfo.sas +67 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,21 +36,21 @@ Documentation: https://core.sasjs.io
|
|
|
36
36
|
- OS independent
|
|
37
37
|
- Works on all SAS Platforms
|
|
38
38
|
- No X command
|
|
39
|
-
- Prefixes:
|
|
39
|
+
- Prefixes: `mf_`, `mp_`
|
|
40
40
|
|
|
41
41
|
### DDL folder (All Platforms)
|
|
42
42
|
|
|
43
43
|
- OS independent
|
|
44
44
|
- Works on all SAS Platforms
|
|
45
45
|
- No X command
|
|
46
|
-
- Prefixes:
|
|
46
|
+
- Prefixes: `mddl_(lib)_` -> where lib can be "SAS" (in relation to a SAS component) or "DC" (in relation to a Data Controller component)
|
|
47
47
|
|
|
48
48
|
This library will not be used for storing data entries (such as formats or datalines). Where this becomes necessary in the future, a new repo will be created, in order to keep the NPM bundle size down (for the benefit of those looking to embed purely macros in their applications).
|
|
49
49
|
|
|
50
50
|
### FCMP folder (All Platforms)
|
|
51
51
|
|
|
52
52
|
- Function and macro names are identical, except for special cases
|
|
53
|
-
- Prefixes:
|
|
53
|
+
- Prefixes: `mcf_`
|
|
54
54
|
|
|
55
55
|
The fcmp macros are used to generate fcmp functions, and can be used with or without the `proc fcmp` wrapper.
|
|
56
56
|
|
|
@@ -72,7 +72,7 @@ endsubmit;
|
|
|
72
72
|
run;
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
- Prefixes:
|
|
75
|
+
- Prefixes: `ml_`
|
|
76
76
|
|
|
77
77
|
### META folder (SAS9 only)
|
|
78
78
|
|
|
@@ -81,14 +81,14 @@ Macros used in SAS EBI, which connect to the metadata server.
|
|
|
81
81
|
- OS independent
|
|
82
82
|
- Metadata aware
|
|
83
83
|
- No X command
|
|
84
|
-
- Prefixes:
|
|
84
|
+
- Prefixes: `mm_`
|
|
85
85
|
|
|
86
86
|
### METAX folder (SAS9 only)
|
|
87
87
|
|
|
88
88
|
- OS specific
|
|
89
89
|
- Metadata aware
|
|
90
90
|
- X command enabled
|
|
91
|
-
- Prefixes:
|
|
91
|
+
- Prefixes: `mmx_`
|
|
92
92
|
|
|
93
93
|
### SERVER folder (@sasjs/server only)
|
|
94
94
|
These macros are used for building applications using [@sasjs/server](https://server.sasjs.io) - an open source REST API for Desktop SAS.
|
|
@@ -96,7 +96,7 @@ These macros are used for building applications using [@sasjs/server](https://se
|
|
|
96
96
|
- OS independent
|
|
97
97
|
- @sasjs/server aware
|
|
98
98
|
- No X command
|
|
99
|
-
- Prefixes:
|
|
99
|
+
- Prefixes: `ms_`
|
|
100
100
|
|
|
101
101
|
### VIYA folder (Viya only)
|
|
102
102
|
|
|
@@ -104,7 +104,7 @@ Macros used for interfacing with SAS Viya.
|
|
|
104
104
|
|
|
105
105
|
- OS independent
|
|
106
106
|
- No X command
|
|
107
|
-
- Prefixes:
|
|
107
|
+
- Prefixes: `mv_`, `mvf_`
|
|
108
108
|
|
|
109
109
|
### XPLATFORM folder (Viya, Meta, and Server)
|
|
110
110
|
|
|
@@ -112,7 +112,7 @@ Sometimes it is helpful to use a macro that can be used interchangeably regardle
|
|
|
112
112
|
|
|
113
113
|
- OS independent
|
|
114
114
|
- No X command
|
|
115
|
-
- Prefixes:
|
|
115
|
+
- Prefixes: `mx_`
|
|
116
116
|
|
|
117
117
|
## Installation
|
|
118
118
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@file
|
|
3
|
+
@brief Get the properties of a Stored Process
|
|
4
|
+
@details Extracts various properties and creates an output table in the
|
|
5
|
+
structure below:
|
|
6
|
+
|
|
7
|
+
|STP_URI:$200.|SERVERCONTEXT:$200.|STOREDPROCESSCONFIGURATION:$1000.|SOURCECODE_FIRST32K:$32767.|PATH:$76.|
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
|`A5DN9TDQ.BH0000C8 `|`SASApp `|`<?xml version="1.0" encoding="UTF-8"?><StoredProcess><ServerContext LogicalServerType="Sps" OtherAllowed="false"/><ResultCapabilities Package="false" Streaming="true"/><OutputParameters/></StoredProcess> `|`%put first 32767 bytes of code; `|`/path/to/my/stp`|
|
|
10
|
+
|
|
11
|
+
@param [in] pgm The metadata path of the Stored Process
|
|
12
|
+
@param [out] outds= (work.mm_getstpinfo) The output table to create
|
|
13
|
+
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
|
|
14
|
+
|
|
15
|
+
<h4> Related Files </h4>
|
|
16
|
+
@li mm_getstpcode.sas
|
|
17
|
+
@li mm_getstps.sas
|
|
18
|
+
@li mm_createstp.sas
|
|
19
|
+
@li mm_deletestp.sas
|
|
20
|
+
|
|
21
|
+
**/
|
|
22
|
+
|
|
23
|
+
%macro mm_getstpinfo(pgm
|
|
24
|
+
,outds=work.mm_getstpinfo
|
|
25
|
+
,mDebug=0
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
%local mD;
|
|
29
|
+
%if &mDebug=1 %then %let mD=;
|
|
30
|
+
%else %let mD=%str(*);
|
|
31
|
+
%&mD.put Executing &sysmacroname..sas;
|
|
32
|
+
%&mD.put _local_;
|
|
33
|
+
|
|
34
|
+
data &outds;
|
|
35
|
+
length type stp_uri tsuri servercontext value $200
|
|
36
|
+
StoredProcessConfiguration $1000 sourcecode_first32k $32767;
|
|
37
|
+
keep path stp_uri sourcecode_first32k StoredProcessConfiguration
|
|
38
|
+
servercontext;
|
|
39
|
+
call missing (of _all_);
|
|
40
|
+
path="&pgm(StoredProcess)";
|
|
41
|
+
/* first, find the STP ID */
|
|
42
|
+
if metadata_pathobj("",path,"StoredProcess",type,stp_uri)>0 then do;
|
|
43
|
+
/* get attributes */
|
|
44
|
+
cnt=1;
|
|
45
|
+
do while (metadata_getnasn(stp_uri,"Notes",cnt,tsuri)>0);
|
|
46
|
+
rc1=metadata_getattr(tsuri,"Name",value);
|
|
47
|
+
&mD.put tsuri= value=;
|
|
48
|
+
if value="SourceCode" then do;
|
|
49
|
+
rc2=metadata_getattr(tsuri,"StoredText",sourcecode_first32k);
|
|
50
|
+
end;
|
|
51
|
+
else if value="Stored Process" then do;
|
|
52
|
+
rc3=metadata_getattr(tsuri,"StoredText",StoredProcessConfiguration);
|
|
53
|
+
end;
|
|
54
|
+
cnt+1;
|
|
55
|
+
end;
|
|
56
|
+
/* get context (should only be one) */
|
|
57
|
+
rc4=metadata_getnasn(stp_uri,"ComputeLocations",1,tsuri);
|
|
58
|
+
rc5=metadata_getattr(tsuri,"Name",servercontext);
|
|
59
|
+
end;
|
|
60
|
+
else do;
|
|
61
|
+
put "%str(ERR)OR: could not find " pgm;
|
|
62
|
+
put (_all_)(=);
|
|
63
|
+
end;
|
|
64
|
+
&md.put (_all_)(=);
|
|
65
|
+
run;
|
|
66
|
+
|
|
67
|
+
%mend mm_getstpinfo ;
|
package/package.json
CHANGED