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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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