BookmarkSubscribeRSS Feed
weibao
Calcite | Level 5

I'm new to SAS and creating a plan in SAS data studio. First step I want to sort the dataset.

 

Here's my code:

proc sort data={{_dp_inputTable}} (caslib={{_dp_inputCaslib}}) out={{_dp_outputTable}} (caslib={{_dp_outputCaslib}});
by geo;
run;

 

But it's not working somehow. Here's the help from SAS data studio below:

You must use variables in place of table and caslib names. Errors will occur if you use literal values. This is because session table names can change during processing.

The following variables are available: _dp_inputCaslib, _dp_inputTable, _dp_outputCaslib, and _dp_outputTable. For DATA step only, variables must be enclosed in braces, for example, data {{_dp_outputTable}} (caslib={{_dp_outputCaslib}});.

 

Can anyone help me? much appreciate.

3 REPLIES 3
VenuKadari
SAS Employee

proc sort will not work in CAS environment.

 

What is your end goal?

Zengahoe
Calcite | Level 5

Hi I am also facing the same problem

 

/* BEGIN data step with the output table data */
data {{_dp_outputTable}} (caslib={{_dp_outputCaslib}} promote="no");
/* Set the input set */
set {{_dp_inputTable}} (caslib={{_dp_inputCaslib}} );
/* END data step run */
run;

 

I am trying to proc sort by a Key then to do a First.Key.  But I dunno how to refer to the dataset. Thanks.

Madelyn_SAS
SAS Super FREQ

I suggest posting this in the SAS Programming or SAS Procedures community instead. 

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1143 views
  • 0 likes
  • 4 in conversation