As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Solutions in the Round -- Check if a Variable Exists in a Dataset

From sasCommunity
Revision as of 16:15, 2 January 2015 by Otterm1 (Talk | contribs)

Jump to: navigation, search


From the WUSS abstract for this topic

It is often necessary to check if a variable exists in a dataset. We will identify several methods for doing this and will discuss the merits of each. Join us for this group discussion! Solutions in the Round is an exciting new section [at WUSS 2014]. The format is simple: we sit in a circle and discuss the many ways to approach and address a programming problem, and we'll identify situations where one approach might be more useful than another. We will keep notes, and those notes will be posted on where we can continue the discussion and allow other to join in after the conference. We hope to engage users from all different perspectives and experience levels to participate in these discussions.

Discussion at WUSS

    • look at output window
    • create an output dataset
PROC CONTENTS data=x out=y noprint;

  • SASHELP.VCOLUMNS (deprecated -- can someone elaborate?)
  • CALL VNAME (can someone elaborate?)
  • dictionary tables
  • PROC METADATA (have to have metadata) can someone provide an example?
  • SYSFUNC VARNUM can someone provide an example?
  • Extended attributes in 9.4+ can someone provide an example?
  • CALL ATTRB can someone provide an example?

Further Discussion -- Open to All

Please join the conversation! Also, if you were one of the live participants, please feel free to correct any mistakes or omissions from our original discussion.

  • It would be great to add examples for each of the suggestions, above, as well as further discussion of when they might and might not be useful. --Otterm1 (talk) 13:35, 2 January 2015 (CST)--Otterm1 (talk) 13:35, 2 January 2015 (CST)