Hi ,
I need suggestion for the error I am getting while creating table.
Since I have libray refernce having more than 8 char. So I created a libref
like this
libname CAS_LIB cas caslib="&mp_sourceName";
but whenever I am trying to create table using CAS_LIB as library . It is throwing error.
I have also inserted code for ref
proc casutil;
load data =planning.ed_&inputTable CASOUT="ed_&inputTable"
OUTCASLIB="&mp_sourceName" replace;
libname &vf_lib cas caslib="&mp_sourceName";
proc fedsql SESSREF=&_SESSREF_;
create table &vf_lib..tmp_&inputTable. as
select a.* ,b.time_id as start_dt_sk
from
&vf_lib..&inputTable. a, &vf_lib..ed_&inputTable b
where
a.%bquote(&time_dim.) between b.start_date and b.end_date;
quit;
proc cas;
sessionProp.setsessopt / caslib="&mp_sourceName";
table.alterTable / columns={{rename="%TRIM(&prd_var)",
name="actual"},
{rename="%sysfunc(catx(_,&prd_var.,fcst))", name="predict"}}
name="tmp_&inputTable.";
quit;
/* This mp_source name have values like CASUSER(CMSTEST), ShoppingInsight , ModelValuation , etc */
ernce.
normal: MPRINT(X): proc casutil; note: NOTE: The UUID '3887c308-3320-8d4d-81f1-b24a9322bcac' is connected using session CASAUTO. normal: SYMBOLGEN: Macro variable PLAN_LIB resolves to planning normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 normal: SYMBOLGEN: && resolves to &. normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: MPRINT(X): load data =planning.ed_OUTFOR_102 CASOUT="ed_OUTFOR_102" OUTCASLIB="CASUSER(cmstest)" replace; note: NOTE: PLANNING.ED_OUTFOR_102 was successfully added to the "CASUSER(cmstest)" caslib as "ED_OUTFOR_102". normal: SYMBOLGEN: Macro variable VF_LIB resolves to CAS_LIB normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: MPRINT(NPF_INPUT_CDL_FACT): libname CAS_LIB cas caslib="CASUSER(cmstest)"; note: NOTE: Libref CAS_LIB was successfully assigned as follows: note: Engine: CAS note: Physical Name: 3887c308-3320-8d4d-81f1-b24a9322bcac note: NOTE: PROCEDURE CASUTIL used (Total process time): note: real time 0.28 seconds note: cpu time 0.05 seconds note: note: normal: SYMBOLGEN: Macro variable _SESSREF_ resolves to CASAUTO normal: MPRINT(X): proc fedsql SESSREF=CASAUTO; normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 title: 17 The SAS System Wednesday, February 22, 2023 05:25:00 PM title: normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 normal: SYMBOLGEN: Macro variable TIME_DIM resolves to start_date normal: MPRINT(X): create table CASUSER(cmstest).tmp_OUTFOR_102 as select a.* ,b.time_id as start_dt_sk from normal: CASUSER(cmstest).OUTFOR_102 a, CASUSER(cpstest).ed_OUTFOR_102 b where a.start_date between b.start_date and b.end_date; error: ERROR: Syntax error at or near ".T"
... View more