BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Longimanus
Obsidian | Level 7

Hi to y'all. I have surfed the web and got the PROC CONTENTS tip with a VERBOSE option.  For some reason (I do not understand) I cannot use this: 

32 proc contents data=sashelp.class (verbose=yes);
-------
ERROR 22-7: Invalid option name VERBOSE.

If I just run PROC CONTENTS on another table and print the result I get this e.g.: 

                                 The CONTENTS Procedure                                      
                                                                                                  
                            Alphabetic List of Indexes and Attributes                             
                                                                                                  
                                                  # of                                            
                                   Unique       Unique                                            
            #    Index             Option       Values    Variables                               
                                                                                                  
            1    CIP_COUNTRY_CD                      4                                            
            2    PRIM_KEY          YES       129552652    ACCOUNT_RK VALID_FROM_DTTM         


 

How do I get this information in a table?  If I use the OUT= option to a table, I can see the variables used in the indexes, if they are a simple or part of a composite key. But niether the sequence of the vars in the composite nor the name of the index. 

 

This should be pretty basic and yet I cannot find it surfin' the web. I hope someone can help! 

 

Cheers from Copenhagen!

Menno 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ErikLund_Jensen
Rhodochrosite | Level 12

Hi @Longimanus 

 

You can retrieve the wanted information from the sashelp.vindex table.

 

Note that library names and member names are uppercase in the dictionary tables, so you need to use "where  libname = upcase(yourlib) and memname = upcase(yourds);.

 

cheers from Odense.

 

View solution in original post

2 REPLIES 2
ErikLund_Jensen
Rhodochrosite | Level 12

Hi @Longimanus 

 

You can retrieve the wanted information from the sashelp.vindex table.

 

Note that library names and member names are uppercase in the dictionary tables, so you need to use "where  libname = upcase(yourlib) and memname = upcase(yourds);.

 

cheers from Odense.

 

Longimanus
Obsidian | Level 7

Tak Erik! Det vil jeg se på med det samme! 😊  (And for the non Danish speakers:  Thank you Erik! I will look at that (and use it) right away! 😊

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 2 replies
  • 386 views
  • 1 like
  • 2 in conversation