Recently in the SAS Community Library: SAS' @StuartRogers provides a close look at the new Microsoft Entra Gallery application and details how it can be used.
DATA ALT;
SET RCA.CLOSING_STATUS_TEST;
ARRAY COLS[*] _CHARACTER_;
ARRAY COLS_[*] _CHARACTER_;
DO I = 1 TO DIM(COLS);
IF MOD(I, 2) = 1 THEN
COLS_[(I+1)/2] = COLS[I];
END;
DROP I;
RUN;
Hi, I have been trying to select the alternate columns. If I am using this code then my third column's data shifts to second column and second's values are disappearing. I want to select alternate columns from my data set and my column names are in following: LOAN_NO, PRODUCT, FINAL_STATUS_05MAY24,DUE_N_TAG_05MAY24, FINAL_STATUS_06MAY24,DUE_N_TAG_06MAY24, FINAL_STATUS_07MAY24,DUE_N_TAG_07MAY24,... and so on. I want to create a table selecting columns:-
LOAN_NO, FINAL_STATUS_05MAY24, FINAL_STATUS_06MAY24, FINAL_STATUS_07MAY24... and so on. If there is any alternate approach for making the selection, please advise me or please help with the given array code.
... View more
The function split_part(col_name,delimiter, index) worked well with select statement in the HUE editor when connected to impala. The same function throws an error when running in SAS EG. Below is the log. I found a workaround and delivered the file. However, I want to know if anyone here knows a way to submit the code via SAS without being losing the ability to use Impala functions that SAS Access doesn’t support. Log: 66 proc sql noprint; 67 connect to impala as XXX (dsn=XXX user=XXXpw = "XXX"); 68 create table temp(compress=yes) as 69 select * 70 from connection to XXX ( 71 select 72 split_part(col, '~', 1) as col1 73 from table1 a , table2 c , table3 b 74 where condition); NOTE: Compression was disabled for data set XXX because compression overhead would increase the size of the data set. ERROR: CLI cursor extended fetch error: [Cloudera][Support] (40550) Invalid character value for cast specification. : [Cloudera][Support] (40550) Invalid character value for cast specification. : [Cloudera][Support] (40550) Invalid character value for cast specification. : [Cloudera][Support] (40550) Invalid character value for cast specification. : [Cloudera][Support] (40550) Invalid character value for cast specification. : [Cloudera][Support] (40550) Invalid character value for cast specification. : [Cloudera][Support] (40550) Invalid charact NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements. 80 disconnect from XXX; NOTE: Statement not executed due to NOEXEC option. 81 quit;
... View more
I have a data set with multiple variables (columns). I'm trying to get the top 10 values of each variable. However, I would like the output to be in a new dataset with a new variable called: variable_names. The row shows the top 10 values from smallest to largest. The data below is just an example. I have more than 4 input variables. Here, I am just looking at the top 3. For a bigger data set, I may look at the top 10. data example; input a b c d; datalines; 100 120 123 140 12 23 43 42 12 12 23 23 5 7 5 2 80 88 98 2 3 4 101 4 ; %let nTop = 3; proc univariate data = new_data NExtrObs=&nTop; ods select ExtremeObs; run; The proc univariate gives a separate output for each. The UNIVARIATE Procedure Variable: a Extreme Observations Lowest Highest Value Obs Value Obs 3 6 12 3 5 4 80 5 12 3 100 1 I would like to create a new data set where output with column names: Variables and the top values. For example, Variables Top1 Top2 Top3 a 12 80 100 b 23 88 120 c 5 6 1
... View more
data vs ; input patient cpevent$ vstest$ vsren vsorresu$; cards ; 100 base pr 78 min 100 scrn hr 72 /min 100 week1 sbp 70 mmhg 100 week7 dbp 110 mm 100 week21 weight 75 kg
100 fwp height 120 kg 100 base pr 78 min 100 scrn hr 79 /mn 100 week1 sbp 70 mmhg 100 week7 dbp 110 mm 100 week21 weight 80 pounds
100 fwp height 75 kg ;
Condition below
If VSTEST having same VSREN and VSORRESU for 4 consecutive visits then highlight those with flag as
"dulipcate record"
Based on above condition and data , create a flag
Please anyone help me .....
... View more
I need to add a horizontal reference line at 90% to represent my target in the p-chart. When I put href=0.9 in my code I got the following warning "WARNING: Numeric href= values are incompatible with a character subgroup variable; HREF= lines are not displayed." The warning indicates that the href value is not compatible because the subgroup variable, quarter, is treated as a character data type. How to include the target line? Here is my code: proc shewhart data=tmp2; pchart yes_answer1*quarter/ markers subgroupn = total_count1 nohlabel Href=0.9; run;
... View more