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

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
Quartz | Level 8

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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 2 replies
  • 933 views
  • 1 like
  • 2 in conversation