Recently in the SAS Community Library: SAS' @NicolasRobert takes a deep dive into what makes CAS elastic, explore four real-world use cases and provides a guide to setting up table rebalancing and what it means for you.
Hello World,
I want to rewrite a simple proc sql into a proc fedsql but I fail already when accessing the SAP HANA Table. Apparently fedsql can't extract the correct schema from the libname. Instead of UPW_EGUIDE, my personal schema P226526 is used. Does anyone have any ideas?
libname UPWEGUID saphana dsn=PDWDM SCHEMA=UPW_EGUIDE CONNECTION=Global AUTOCOMMIT=NO INSERTBUFF=32767 READBUFF=32767 DBCOMMIT=50000 DIRECT_EXE=DELETE CHAR_AS_NCHAR=YES
TABLE_TYPE=COLUMN SUB_CHAR=SPACE authdomain='P-USER' DBSERVER_MAX_BYTES=1 DBCLIENT_MAX_BYTES=1;
/* this works well */
proc sql;
create table erg as
SELECT ID, dim_DESC, TS FROM UPWEGUID.DIM_TIME ;
quit;
/* doesnt work */
proc fedsql _DIAG;
create table erg as
SELECT ID, dim_DESC, TS FROM UPWEGUID.DIM_TIME ;
quit;
29
30 libname UPWEGUID saphana dsn=PDWDM SCHEMA=UPW_EGUIDE CONNECTION=Global AUTOCOMMIT=NO INSERTBUFF=32767 READBUFF=32767
30 ! DBCOMMIT=50000 DIRECT_EXE=DELETE CHAR_AS_NCHAR=YES
31 TABLE_TYPE=COLUMN SUB_CHAR=SPACE authdomain='P-USER' DBSERVER_MAX_BYTES=1 DBCLIENT_MAX_BYTES=1;
NOTE: Credential obtained from SAS metadata server.
NOTE: Libref UPWEGUID was successfully assigned as follows:
Engine: SAPHANA
Physical Name: PDWDM
32
33 /* works fine */
34 proc sql;
35 create table erg as
36 SELECT ID, dim_DESC, TS FROM UPWEGUID.DIM_TIME ;
NOTE: Compressing data set WORK.ERG increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: Table WORK.ERG created, with 3 rows and 3 columns.
37 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
38
39 /* doesnt work */
40
41 proc fedsql _DIAG;
2 The SAS System 16:07 Saturday, December 7, 2024
42 create table erg as
43 SELECT ID, dim_DESC, TS FROM UPWEGUID.DIM_TIME ;
Table "UPWEGUID.DIM_TIME" does not exist or cannot be accessed
ERROR: [42S02]Table "UPWEGUID.DIM_TIME" does not exist or cannot be accessed (0x81bfc10c)
ERROR: [42S02]ERROR: [SAP AG][LIBODBCHDB SO][HDBODBC] Base table or view not found;259 invalid table name: Could not find
table/view DIM_TIME in schema P226526: line 1 col 25 (at pos 24) (0x103)
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
44 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FEDSQL used (Total process time):
real time 0.26 seconds
cpu time 0.02 seconds
... View more
I am fitting a Fine and Gray regression model to competing risks data. I am trying to compute the time-dependent AUC for this model, but the "plots=auc rocoptions(method=ipcw(cl seed=1234))" option does not work. I get the note "Neither concordance nor ROC analysis is performed when the EVENTCODE option in the MODEL statement is specified". However, I need that option to specify fitting a Fine and Gray regression. The data is coded as having Status 0 if censored, 1 if experience the event of interest, 2 if they experience the competing event. Here is my SAS code: proc phreg data=train plots=auc rocoptions(method=ipcw(cl seed=1234));
class X1 X2;
model Time*Status(0)=X1 X2/eventcode=1;
run; Any suggestions for how I can obtain the concordance index from a Fine and Gray regression model? Thanks in advance!
... View more
everyone I am new here and I need some help. I keep encountering this error: proc surveylogistic data=nhis29;
cluster ppsu;
strata pstrat;
weight wtfa;
class SRVY_YR(ref='2021') edu(ref='1') pov(ref='1') sex(ref='1')/param=ref;
model ft=srvy_yr edu pov sex/expb;
run; ERROR: Invalid reference value for SRVY_YR. Yet for the same variable and reference everything seems fine as shown below: proc surveylogistic data=nhis29;
cluster ppsu;
strata pstrat;
weight wtfa;
class SRVY_YR(ref='2021')/param=ref;
model ft(event='1')=srvy_yr/expb;
run; NOTE: PROC SURVEYLOGISTIC is modeling the probability that ft=1. NOTE: Convergence criterion (GCONV=1E-8) satisfied. NOTE: PROCEDURE SURVEYLOGISTIC used (Total process time): real time 0.20 seconds cpu time 0.11 seconds I can't think of what I missed, and any assistance would be appreciated I tried proc surveyfreq and 2021 is a category and works fine
... View more
I have a demographic data set with no missing data that covers a 12 month period. It is built like the below:
data a;
input date :monyy. age sex race count;
format date monyy.;
datalines;
JAN18 24 0 0 1
JAN18 22 1 1 3
FEB18 19 1 2 1
MAR18 20 0 0 4
MAR18 20 1 4 2
;
RUN;
The categorical variables are numerical with values representing different levels (e.g., sex=0 is male, sex=1 is female; race=0 is white, =1 is black, =2 is asian, etc.). Count means how many individuals with that combination of preceding variables are in that month sample. There are no individual identifiers in the sample.
The total number of individuals and distribution of levels of variables changes slightly each month, and I'm wondering how best to find the one month average for each variable and value due to some other monthly analyses.
In other words, I want to average the 12 month period demographics to one month for a "table 1" since I don't have individual information of how they may come and go over the study period (i.e., if there are 12000 people in the entire study, the one-month average n=1000; if there are 9000 white people over the 12 month period then white people would represent 750 of the one month sample, etc.). I would want this to round to the nearest whole person.
Any ideas on how best to code? I appreciate the help.
... View more
Hello, I am using SAS and the "proc npar1way" procedure to compare two groups. Using the code below, I was able to generate results, but in some cases, the Hodges-Lehmann estimate is displayed, while in others it is not. Why does this happen? proc npar1way data=A wilcoxon hl;
class Group;
var Value;
run;
... View more
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9. Sign up by Dec. 31 to get the 2024 rate of just $495. Register now!