I am running the following code to subset an existing table as part of a data engineering pipeline. I want to reduce outputs to the log from proc cas. proc cas ;
table.Partition/ casout={caslib="mycaslib" name="previous_errors" replace=True}
table={caslib="mycaslib" name= "&viewName._DQ" where="DQField= error"};
quit; This will then print to the log the following: {caslib=mycaslib,tableName=PREVIOUS_ERRORS,rowsTransferred=0,shuffleWaitTime=0.000010252,minShuffleWaitTime=0,maxShuffleWaitTime=2.1457672E-6,averageShuffleWaitTime=1.4645713E-6} This is very frustrating as this code is part of a macro running close to 100 times, so this message is really unnecessarily clogging up the log. Does anyone know how to turn it off? I already have messageLevel set to "warning", which I have checked using "listsessopts" I am using SAS Viya 3.5.
... View more
I am configuring Oracle on new 9.4 M8 and below are the entries I made in sasenv_local after having Oracle configured on Linux. everything looks good as per SAS documentation but still getting the error. Can you please suggest where things are going wrong?
Note : I have restarted Connect and Share services after updating sasenv_lcoal.
libname mydblib oracle user=uname password=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ! path=<mypath from tnsnames.ora>; ERROR: Unable to load oracle client (libclntsh.so) ERROR: Error in the LIBNAME statement.
sasenv_local entries:
ODBCHOME=/sas/sashome/AccessClients/9.4/SQLServer export ODBCHOME
ORACLE_HOME=/sas/oracle/product/12.2.0/dbhome_1 export ORACLE_BASE=/sas/oracle export PATH=$ORACLE_HOME/lib:$PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
echo $PATH /sas/sashome/SASFoundation/9.4:/sas/oracle/product/12.2.0/dbhome_1/lib:/sas/sashome/SASFoundation/9.4:/sas/oracle/product/12.2.0/dbhome_1/bin:/home/sas/.local/bin:/home/sas/bin:/usr/share/centrifydc/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sas/config/Lev1/Applications/SASGridManagerClientUtility/9.4/
echo $LD_LIBRARY_PATH /sas/sashome/AccessClients/9.4/SQLServer/lib:/sas/oracle/product/12.2.0/dbhome_1/lib
... View more
Head over to our Hackathon Community page and read about the Hackathon Kick-Off on May 30th, and how you can register for being a part of the problem solvers of the world who get access to the latest SAS product releases on SAS Viya (among which SAS Intelligent Decisioning as well):
Hackathon Community Kick-Off Announcement
... View more
I write one macro which works fine to split data into 2-subgroups.
Logic is 1) sort by target var 2) based on weight/wt, split into 2 subgroups.
BUT how to split into N-Subgroups with N as a parameter, say N=3 or 7?!
%macro bisect(ds, byvar, cutvar, note);
proc sort data=&ds.; by &byvar.; run;quit;
data &ds.;
set &ds.;
retain wt_sum;
wt_sum=coalesce(wt_sum,0)+&cutvar.;
run;quit;
data &ds.(drop=wt_sum);
set &ds.;
if wt_sum<=50 then ¬e.=1;
else ¬e.=0;
run;quit;
%mend;
... View more
Hi guys,
suppose to have the following:
data DB;
input Code_1 :$20. Code_2 :$20. Code_3 :$20. Explanation_1 :$20. Explanation_2 :$20. Explanation_3 :$20.;
cards;
89.7 0 89.65 General_Visit 0 Monitor
0 89.61 0 0 Check 0
89.7 89.65 0 General_Visit Pressure 0
0 0 0 0 ECG 0
0 0 91.49.2 0 0 0
.....
;
Is there a way to get the frequency of each Code* with associated Explanation* for the entire data set? The frequency should be reported also if there is only the Code or only the Explanation. Overall the dataset has Codes from *_1 to *_82 and Explanation from *_1 to *_82.
Desired output:
data DB1;
input Code :$20. Explanation :$20. Freq :$20.;
cards;
Code Explanation Freq
89.7 General_Visit 2
89.65 Monitor 1
89.65 Pressure 1
89.61 Check 1
. ECG 1
91.49.2 . 1
run;
Thank you in advance
... View more