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

Dear Friends,

 

I am facing typical issue. My PROC SQL extraction and join works in EG, but not in DI Studio.

 

Amitkmr1979_0-1623144708876.png

But in EG the join and extract is fine.

 

Anyone faced this before?

1 ACCEPTED SOLUTION

Accepted Solutions
AMSAS
SAS Super FREQ

@Amitkmr1979 
I pulled the following explanation from a track opened yesterday (this wouldn't happen to be you also?), hopefully this will help you understand it:

You will receive this error message when a procedure requires the data to be in a certain sorted order.  The SORTEDBY flag on the table indicates the order of the data.    However, the actual data in the table is not in the correct sorted order.  This can happen when the SORTEDBY option is used to manually specify the sort order of a table.  A flag called VALIDATED is set on the table to indicate if the data has been checked for correct order.  The VALIDATED flag will be set to NO on the dataset when you use the SORTEDBY option to set the sort order of the table.  In this case, SAS does not verify the data is in the correct sort order.  The VALIDATED option will be YES when the table has been sorted by the SORT or SQL procedure.  

 

You can execute the following sample code from the SAS Data Integration Studio Code Editor to find the settings for the table:

 

           libname <libref> ....;       /*libname statement to assign the library containing the table*/

           proc contents <libref>.<tablename>;

           run;

 

The output will be similar to the following:

 data.png

You should sort the data in the required order using the SORT or SQL procedure to avoid the error message.

 

Please send a copy of the SAS program and a copy of the PROC CONTENTS of the table if this information does not resolve the issue.

View solution in original post

3 REPLIES 3
AMSAS
SAS Super FREQ

@Amitkmr1979 
I pulled the following explanation from a track opened yesterday (this wouldn't happen to be you also?), hopefully this will help you understand it:

You will receive this error message when a procedure requires the data to be in a certain sorted order.  The SORTEDBY flag on the table indicates the order of the data.    However, the actual data in the table is not in the correct sorted order.  This can happen when the SORTEDBY option is used to manually specify the sort order of a table.  A flag called VALIDATED is set on the table to indicate if the data has been checked for correct order.  The VALIDATED flag will be set to NO on the dataset when you use the SORTEDBY option to set the sort order of the table.  In this case, SAS does not verify the data is in the correct sort order.  The VALIDATED option will be YES when the table has been sorted by the SORT or SQL procedure.  

 

You can execute the following sample code from the SAS Data Integration Studio Code Editor to find the settings for the table:

 

           libname <libref> ....;       /*libname statement to assign the library containing the table*/

           proc contents <libref>.<tablename>;

           run;

 

The output will be similar to the following:

 data.png

You should sort the data in the required order using the SORT or SQL procedure to avoid the error message.

 

Please send a copy of the SAS program and a copy of the PROC CONTENTS of the table if this information does not resolve the issue.

Amitkmr1979
Fluorite | Level 6

I cant be more than happy. you were right, the earlier mail was from my colleague which was sent. I am just trying to help them but I am continents apart. 

 

It resolved the issue. 

 

Thanks.

Amitkmr1979
Fluorite | Level 6

Hi AMSAS,

 

Can I call you ? I don't know how to insert my private number.

 

But my email ID is aka.amit@gmail.com.

 

If you okay for me to call.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 849 views
  • 0 likes
  • 2 in conversation