BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ruan
Calcite | Level 5

Hi

 

Just wanted to see, mostly out of curiosity, what the experts think of below and this is also my first post so hoping I get it right 🙂

 

So was recently asked by a colleague to help investigate why his proc fedsql did not want to work. After some time playing around with the code I realised that the variable named "Result" was causing the Proc FedSQL to error. Changing the variable to anything other (except the word "value") on the same code seems to work fine. So just wondering is the words "Result" and "Value" reserved within the CASL language? I'm assuming it must be something along the lines if the Proc Fedsql converts the statements into CASL that it errors.

 

Below the error message and some sudo code that does the same.

 

82 proc fedsql sessref=auto;
NOTE: FEDSQL: Running on CAS due to "sessref".
83 select count(result)
84 from CASUSERHDFS.cars_test;
NOTE: Added action set 'fedsql'.
action returned string actionset = fedsql
NOTE: CAS action completed [OKAY]
FEDSQL: load of action set returned rc=00000000
ERROR: Syntax error at or near "result"
ERROR: The action stopped due to errors.
ERROR: The FedSQL action was not successful.
FEDSQL: The fedsql.execDirect action returned rc=0x000003f4
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
85 quit;

 

cas auto;
options casdatalimit=all msglevel=i;


libname casuser cas caslib="CASUSERHDFS";

data casuser.cars_test;
set sashelp.cars;
result=horsepower/cylinders;
run;


proc fedsql sessref=auto;
select count(make)
from CASUSERHDFS.cars_test;
quit;


proc fedsql sessref=auto;
select count(result)
from CASUSERHDFS.cars_test;
quit;

1 ACCEPTED SOLUTION

Accepted Solutions
qoit
Pyrite | Level 9

The following words are reserved as FedSQL language keywords and cannot be used as variable names or in any other way.

 

FedSQL Reserved Words 'R' Alphabet

R

RANK

READ

READS

REAL

RECHECK

RECURSIVE

REF

REFERENCES

REFERENCING

REGR_AVGX

REGR_AVGY

REGR_COUNT

REGR_INTERCEPT

REGR_R2

REGR_SLOPE

REGR_SXX

REGR_SXY

REGR_SYY

REINDEX

RELATIVE

RENAME

REPLACE

RESET

RESTART

RESTRICT

RESULT

RETURN

RETURNS

REVOKE

RIGHT

ROLLBACK

ROLLUP

ROW

ROWS

ROW_NUMBER

RULE

View solution in original post

2 REPLIES 2
qoit
Pyrite | Level 9

The following words are reserved as FedSQL language keywords and cannot be used as variable names or in any other way.

 

FedSQL Reserved Words 'R' Alphabet

R

RANK

READ

READS

REAL

RECHECK

RECURSIVE

REF

REFERENCES

REFERENCING

REGR_AVGX

REGR_AVGY

REGR_COUNT

REGR_INTERCEPT

REGR_R2

REGR_SLOPE

REGR_SXX

REGR_SXY

REGR_SYY

REINDEX

RELATIVE

RENAME

REPLACE

RESET

RESTART

RESTRICT

RESULT

RETURN

RETURNS

REVOKE

RIGHT

ROLLBACK

ROLLUP

ROW

ROWS

ROW_NUMBER

RULE

Ruan
Calcite | Level 5
Ah cheers for that.. actually found the list of keywords that I somehow missed from the documentation yesterday 🙂

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=fedsqlref&docsetTarget=p0...

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 772 views
  • 1 like
  • 2 in conversation