BookmarkSubscribeRSS Feed
jplarios
Quartz | Level 8

Hello,

I have a proc sort prior to loading the target and when doing a proc contents on target it shows sorted as 'No'. I then go to the loaded and do sort order by the variable and I still get sort order 'no' on target based on contents of table.

I can't seem to make my target sorted. I thought I did but I noticed this when looking at contents.

thanks

jp

DIS 3.1  SAS 9.13

3 REPLIES 3
Halaku
Obsidian | Level 7

Do you have indexes on the columns you wish to sort? May be there is a dependency here. Update the metadata before retry.

nar_sas
SAS Employee

The sort indicator is reset each time a table update occurs.  So in this case, even though you have sorted a source SAS data set prior to loading to the target, the target table does not inherit the sort indicator from the source table.  If the target table is actually in correct sort order as a result of loading a sorted source table, you can set the sort indicator to sorted=YES on the target using the SAS SORTEDBY data set option OR the datasets procedure MODIFY.

Hope this helps.

jplarios
Quartz | Level 8

Thanks Nar and Halaku. I ended up doing the sortedby option. after having my data sorted.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1209 views
  • 2 likes
  • 3 in conversation