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-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

Register now!

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
  • 788 views
  • 0 likes
  • 4 in conversation