Using The SAS VS Code Extension to Check Prime Distribution
Recent Library Articles
Recently in the SAS Community Library: @RyanKing showcases features in the SAS Visual Studio Code extension, including data exploration using SAS, SQL and Python in one SAS notebook file.
TEAM 1
TEAM 2
N+R
Resolved
TOTAL
N+R
Resolved
TOTAL
CYCLE
PRODUCT
Count
POS
POS%
Count
POS
POS%
Count
POS
Count
POS
POS%
Count
POS
POS%
Count
POS
xx
a
1
0.11
3.18%
7
0.50
14.91%
46
3.37
0
0
0.00%
2
0.10
16.32%
11
0.62
TOTAL
1
0.11
3.18%
7
0.50
14.91%
46
3.37
0
0
0.00%
2
0.10
16.32%
11
0.62
yy
a
0
0
0.00%
0
0
0.00%
3
0.48
0
0
0.00%
0
0
0.00%
2
0.38
TOTAL
0
0
0.00%
0
0
0.00%
3
0.48
0
0
0.00%
0
0
0.00%
2
0.38
zz
a
74
7.56
6.74%
289
32.58
29.06%
1059
112.10
21
2.86
9.21%
62
9.45
30.44%
244
31.05
TOTAL
74
7.56
6.74%
289
32.58
29.06%
1059
112.10
21
2.86
9.21%
62
9.45
30.44%
244
31.05
aa
a
1
0.03
0.71%
3
0.17
4.26%
46
4.02
1
0.03
0.81%
2
0.11
3.00%
38
3.51
TOTAL
1
0.03
0.71%
3
0.17
4.26%
46
4.02
1
0.03
0.81%
2
0.11
3.00%
38
3.51
TOTAL
a
76
7.69
6.41%
299
33.26
27.72%
1154
119.97
22
2.89
8.13%
66
9.66
27.17%
295
35.55
TOTAL
76
7.69
6.41%
299
33.26
27.72%
1154
119.97
22
2.89
8.13%
66
9.66
27.17%
295
35.55
This is an output I got using Proc Report. In the modification, I want to remove the column count wherever 'N+R'n Column occurs.
Also in this output, what is the blank space above column CYCLE and PRODUCT and is on the left of TEAM 1, as this column is generated in PROC REPORT, and I want to split those two blank cells into 4 as happening below in column CYCLE and PRODUCT so that I can format it into excel with other reports as I want to decrease the cell size of cycle, but cell size reduction should only be applied to this report and not on other reports which are also being printed on the same sheet. I have printed my PROC REPORT below.
Can I get a solution for both of my problems? Thank you!
Please let me know if it is difficult to understand.
PROC REPORT DATA=BKT2_HL_&mnth._&nextmnth.5(WHERE=('STATUS 2'N NE 'Not Resolved')) OUT=WO_NR;
COLUMNS CYCLE1 PRODUCT_CLASS FINAL_ALLOCATION, ("status 2"n,(COUNT TOTAL_POS POS_PER));
DEFINE CYCLE1/nozero 'CYCLE' ORDER=FORMATTED STYLE={width=90PT FONTSIZE=2 BORDERWIDTH=1 BORDERCOLOR=BLACK JUST=CENTER BACKGROUND=WHITE FOREGROUND=BLACK } group STYLE(HEADER)={FONT_WEIGHT=BOLD FONTSIZE=2 BACKGROUND=#000080 FOREGROUND=WHITE};
DEFINE PRODUCT_CLASS/nozero 'PRODUCT' ORDER=FORMATTED STYLE={width=110PT FONTSIZE=2 BORDERWIDTH=1 BORDERCOLOR=BLACK JUST=CENTER BACKGROUND=WHITE FOREGROUND=BLACK } group STYLE(HEADER)={FONT_WEIGHT=BOLD FONTSIZE=2 BACKGROUND=#000080 FOREGROUND=WHITE};
DEFINE FINAL_ALLOCATION/nozero STYLE={FONTSIZE=2 BORDERWIDTH=1 BORDERCOLOR=BLACK} across '' STYLE(HEADER)={FONT_WEIGHT=BOLD FONTSIZE=2 BORDERWIDTH=1 BORDERCOLOR=BLACK BACKGROUND=#000080 FOREGROUND=WHITE};
DEFINE "status 2"n/nozero STYLE={FONTSIZE=2 BORDERWIDTH=1 BORDERCOLOR=BLACK} across '' STYLE(HEADER)={FONT_WEIGHT=BOLD FONTSIZE=2 BORDERWIDTH=1 BORDERCOLOR=BLACK BACKGROUND=#FF6600 FOREGROUND=WHITE};
DEFINE TOTAL_POS/nozero STYLE={ FONTSIZE=2 JUST=CENTER VJUST=MIDDLE BORDERWIDTH=1 BORDERCOLOR=BLACK BACKGROUND=WHITE FOREGROUND=BLACK} 'POS' ANALYSIS SUM FORMAT=6.2 STYLE(HEADER)={FONT_WEIGHT=BOLD FONTSIZE=2 BORDERWIDTH=1 BORDERCOLOR=BLACK BACKGROUND=#000080 FOREGROUND=WHITE};
DEFINE COUNT/nozero STYLE={FONTSIZE=2 JUST=CENTER VJUST=MIDDLE BORDERWIDTH=1 BORDERCOLOR=BLACK BACKGROUND=WHITE FOREGROUND=BLACK} 'Count' ANALYSIS SUM FORMAT=6. STYLE(HEADER)={FONT_WEIGHT=BOLD FONTSIZE=2 BORDERWIDTH=1 BORDERCOLOR=BLACK BACKGROUND=#000080 FOREGROUND=WHITE};
DEFINE POS_SUM/NOPRINT;
DEFINE POS_PER/nozero 'POS%' ANALYSIS SUM FORMAT=PERCENT8.2 STYLE={ FONTSIZE=2 JUST=CENTER VJUST=MIDDLE BORDERWIDTH=1 BORDERCOLOR=BLACK BACKGROUND=WHITE FOREGROUND=BLACK} STYLE(HEADER)={FONT_WEIGHT=BOLD FONTSIZE=2 BORDERWIDTH=1 BORDERCOLOR=BLACK BACKGROUND=#000080 FOREGROUND=WHITE};
compute PRODUCT_CLASS;
if PRXMATCH('%TOTAL%',PRODUCT_CLASS) then
call define (_row_,"style","style={BORDERBOTTOMWIDTH=1 FONT_WEIGHT=BOLD background=#FF6600 FOREGROUND=WHITE}");
endcomp;
run;
... View more
Hello, I am trying to calculate the difference between the data observed in 2023 and 2024 by month. I have a total of 84 observations and need to calculate the difference between all 12 months. Below is a sample of how the data is formatted. data Have;
input id 23Jan 23Feb 23Mar 24Jan 24Feb 24Mar;
datalines;
1 0.54 0.54 0.52 0.62 0.61 0.60
2 0.48 0.45 0.48 0.71 0.68 0.67
3 0.59 0.61 0.59 0.57 0.54 0.58
4 0.61 0.62 0.59 0.62 0.61 0.54
; I want a dataset that contains the difference for each month for all 84 observations. Data Want;
ID JanDiff FebDiff MarDiff
1
2
3
4 I know I can write out all 12 calculations but is their a more efficient coding strategy to calculate the differences? Thanks in advance
... View more
Hi I was wondering if there are sas help pages or any documentation around SAS Viya 4 support for Oracle Linux OS & containerization. I want to know if Linux Oracle supported and what versions? I had a look through the following , but found nothing on Linux Oracle OS Support : https://go.documentation.sas.com/doc/en/itopscdc/v_052/itopssr/titlepage.htm https://go.documentation.sas.com/doc/en/itopscdc/v_052/itopscon/n12fgslcw9swbsn10rva4bp0mr2w.htm
... View more
Hi SAS Communities,
We'll be soon migrating to SAS VIYA 4 any tips regarding logging?
Where can we see the logs for the services now is it still on the default location /opt/sas/viya/config/var/logs?
... View more