277
CHAPTER
16
The CV2VIEW Procedure
Overview of the CV2VIEW Procedure
277
Procedure Syntax
278
PROC CV2VIEW Statement
278
FROM_VIEW= Statement
278
FROM_LIBREF= Statement
279
REPLACE Statement 279
SAVEAS= Statement
280
SUBMIT Statement
280
TO_VIEW= Statement
281
TO_LIBREF= Statement
281
CV2VIEW Procedure Examples
282
Example 1: Converting an Individual View Descriptor
282
Example 2: Converting a Library of View Descriptors for a Single DBMS 283
Example 3: Converting a Library of View Descriptors for All Supported DBMSs 284
Overview of the CV2VIEW Procedure
The CV2VIEW procedure converts SAS/ACCESS view descriptors into PROC SQL
views. We recommend that you consider converting your view descriptors for the
following reasons:
View descriptors are no longer the recommended method for accessing relational
database data. Converting to PROC SQL views enables you to use the LIBNAME
statement, which is the preferred method. The LIBNAME statement provides
greater control over DBMS operations such as locking, spooling, and data type
conversions. The LIBNAME statement can also handle long field names, whereas
view descriptors cannot.
PROC SQL views are platform-dependent. SAS/ACCESS view descriptors are not.
It is important to note that the CV2VIEW procedure in SAS Version 9 will work for
converting both 64-bit SAS/ACCESS view descriptors (created in either 64-bit SAS
Version 8 or 64-bit SAS Version 9) and 32-bit SAS/ACCESS descriptors (created in 32-bit
SAS Version 8). At present, it will NOT work for 32-bit SAS/ACCESS view descriptors
created in SAS Version 6.12. In order to convert these view descriptors, they would first
need to be converted into SAS Version 8.2 view descriptors. Future releases of SAS will
be enhanced to include the capability of handling SAS Version 6.12 view descriptors.
If the view descriptor that you want to convert is READ, WRITE, or ALTER
protected, then those values are applied to the output PROC SQL view. For security
reasons, these values do not appear if you save the generated SQL to a file. The
PASSWORD portion of the LIBNAME statement is also not visible. This prevents the
generated SQL statements from being manually submitted without modification.