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

Hi Rob

I tried to post this in other community (SAS Programming and SAS procedures) not OR/MS but i did not get any answers. So I am reaching out to you to see if you have any suggestions .

 

Hi I am working in CAS environment (SAS Viya). I want to get the job done, i dont mind if i have to use fedsql or just proc sql or any other thing that you would recommend.

 

I am trying to get the SAS way of doing the following SQL code which is super simple. What is the best and easiest way to get this done?

Update CASUSER.MSD

Set RateIncludeOcean = 'YES', RateExcludeReasonOcean = 'XXXX'

 

Here is my FedSQL way but not successful

OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
75 
76 proc fedsql sessref=casauto;
77 update CASUSER.MSD
78 {
79 set
80 RateIncludeOcean='YES',
81 RateExcludeReason='XXXX'
82 }
83 ;
ERROR: Unsupported SQL statement.
ERROR: The action stopped due to errors.
ERROR: The FedSQL action was not successful.
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
84

Here is my proc sql way

proc sql;
update CASUSER.MSD
set RateIncludeOcean='YES',
RateExcludeReason='XXXX'
; 

and here is the error for proc sql way ERROR: Update access is not supported for file CASUSER.MSD.DATA.

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

If you refer to the FEDSQL doc for CAS you will see there is no UPDATE statement listed: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=casfedsql&docsetTarget=p0...

 

DATA step SET and MERGE statements are available. Refer to the same documentation.

 

BTW, please don't post multiple times in different forums. Be patient waiting for answers. If you want a faster response contact SAS Tech Support.

View solution in original post

4 REPLIES 4
Kurt_Bremser
Super User

Then the reason is clear: you can't do an update in CAS. You will probably need to do the data changes in SAS 9.4 and re-upload the dataset.

Santha
Pyrite | Level 9

hmm. yes i guess it is clear.

why would update option not available in CAS. 

SASKiwi
PROC Star

If you refer to the FEDSQL doc for CAS you will see there is no UPDATE statement listed: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=casfedsql&docsetTarget=p0...

 

DATA step SET and MERGE statements are available. Refer to the same documentation.

 

BTW, please don't post multiple times in different forums. Be patient waiting for answers. If you want a faster response contact SAS Tech Support.

Santha
Pyrite | Level 9

Thank you for your feedback. I will not post in multiple forums. 

I was able to get my answers through CASL update table thing. That worked. 

Thanks for the support

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 840 views
  • 1 like
  • 3 in conversation