I already found the solution. There's something wrong with my code, and then the error shown up change to "Caslib does not exist in this session". After Caslib made, the code works just fine. Thanks.
In case anyone want to see the fixed code, here it is:
options cashost="xxxx" casport=5570;
/*caslib _all_ assign;*/
/* option validvarname=any; */
libname satpp cas caslib="satpp";
FILENAME request HTTP
'api link'
user='user' password='password' debug;
DATA NULL;
INFILE request;
INPUT;
PUT INFILE;
RUN;
libname sadarPP JSON fileref=request;
data work.satpp_sadarPP;
set sadarPP.root;
run;
proc sql;
create table work.satpp_sadarL as
select ID_responses,
Sent_date,
Name,
Age,
Gender
from work.satpp_sadarPP;
quit;
/*change data format*/
data work.satpp_sadarL;
set work.satpp_sadarL;
time=input(Sent_date,ANYDTDTM.);
format time datetime19.;
run;
/* sorting data by date */
proc sort data=work.satpp_sadarL;
by time;
run;
%macro checktable(dsn);
%if %sysfunc(exist(&dsn)) %then %do;
proc delete data=&dsn; run;
%end;
%mend;
%checktable(satpp.final)
data satpp.final (promote=yes);
set work.satpp_sadarL;
run;
... View more