SAS author's tip: Converting SAS/ACCESS view descriptors to SQL views

2

This week's SAS tip is from master user Phil Holland and his popular book Saving Time and Money Using SAS. If you're not yet familiar with Phil and his extensive work in the user community, start out by visiting his author page. If  you're on LinkedIn, look for him on SAS Professional Forum or his own LinkedIn group page.

The following excerpt is from SAS Press author Phil Holland's book "Saving Time and Money Using SAS" Copyright © 2007, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software)

3.5  Converting SAS/ACCESS View Descriptors to SQL Views

It is recommended that you convert your SAS/ACCESS view descriptors to PROC SQL views, because this will enable you to use the LIBNAME statement, which can handle long column names. PROC SQL views are also platform-dependent, whereas SAS/ACCESS view descriptors are not. You can use the CV2VIEW procedure in SAS 9 to generate code that will create PROC SQL views, e.g.:

PROC CV2VIEW DBMS = db2;
FROM_VIEW = inlib.accview (ALTER = apwd);
TO_VIEW = outlib.sqlview;
SAVEAS = 'sql.sas';
REPLACE FILE;
RUN;

PROC CV2VIEW will convert both 64-bit SAS/ACCESS view descriptors created in SAS 9 or SAS 8, and 32-bit SAS/ACCESS descriptors created in SAS 8. However, it may not convert 32-bit SAS/ACCESS view descriptors created in SAS 6.12, in which case they must first be converted to compatible view descriptors in SAS 8.2.

Share

About Author

Shelly Goodin

Social Media Specialist, SAS Publications

Shelly Goodin is SAS Publications' social media marketer and the editor of "SAS Publishing News". She’s worked in the publishing industry for over thirteen years, including seven years at SAS, and enjoys creating opportunities for fans of SAS and JMP software to get to know SAS Publications' many offerings and authors.

2 Comments

    • Shelly Goodin
      Shelly Goodin on

      Hi Manish, thanks for reading and for your comment. What would you like to learn more about? Thanks

Back to Top