BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi!
Can I somehow tell Enterprise Guide that the data set file hat an index file to it?
I'm using a file.sas7bdat that has a corresponding file.sas7bndx but I don't think that Enterprise Guide recognises it.
does anybody know how I can use indexe in Enterprise Guide at all?

thanx for any help
3 REPLIES 3
deleted_user
Not applicable
To verify the SAS&BNDX file is associated with the SAS7BDAT file and is not an orphan, run Proc Contents on the data set and it will tell you whether it is indexed.

If it is, then at the start of your session set the option:

Options MsgLevel = I;

which turns on informative messaging. Where SAS uses an index during processing the data, this will be acknowledged with a note in the log. If MsgLevel is N, or the index is not utilised, there will be no log note.

The key message is that SAS will decide whether the index will add value to the step and handle the use as required.

Kind regards

David
deleted_user
Not applicable
Hi David.
Thanks for your reply.

After you run PROC CONTENTS you can only verify whether there is existing indexes or not to a data file.

It happens though, that sometimes the associated SAS7BNDX file is not being delivered together with the SAS7BDAT. In this case EG won't open the file and says it doesn't recognise it, because it looks for the associated index(es) but doesn't find it. Well, I would like to tell EG to open the file just as it is, without any index.

The other question is, if it is possible to create indexes from within EG.
Of course I can do it with a CREAT INDEX command..
deleted_user
Not applicable
Verifying the index exists is exactly the point. I have seen SAS7BDAT and SAS7BNDX files share the same folder, but be divorced because of some file copy problem. The reason for checking the contents is to ensure they are associated, because if they are not, you cannot use the index on the table. Indeed your comment about delivery immediately suggests to me that you have a potential problem with the table being correctly indexed.

So, once again, verify first of all that the table is indexed and that the SAS System recognises it as such. Where you have a table that should be indexed, and it isn't because the index wasn't delivered (just what sort of process is this????) then you can recreate the index by using the DataSets Procedure and the Repair option in a code node. I haven't tested it, but if an old SAS7BNDX file existed, then using the repair option will cause the replacement of the file with the correct index.

I would also expect that Index Delete in the DataSets Procedure will remove an index association, although I haven't tested to see the outcome when the association is incorrect. In that case I would expect some appropriate messaging in the log. Setting the option MsgLevel to I (Informative) should give you a very clear indication of any steps SAS takes to repair an index association.

Can you create from within EG? I don't know, and possibly not through a GUI. But once again, the DataSets procedure will come to your aid with a command similar to the one you report.

Kind regards

David

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 9154 views
  • 3 likes
  • 1 in conversation