13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

644 Using the <strong>SAS</strong>_PUT( ) Function in the Netezza Data Warehouse 4 Chapter 22Using the <strong>SAS</strong>_PUT( ) Function in the Netezza Data WarehouseImplicit Use of the <strong>SAS</strong>_PUT( ) FunctionAfter you install the <strong>for</strong>mats that <strong>SAS</strong> supplies in libraries inside the Netezza datawarehouse and publish any custom <strong>for</strong>mat definitions that you created in <strong>SAS</strong>, you canaccess the <strong>SAS</strong>_PUT( ) function with your SQL queries.If the SQLMAPPUTTO= system option is set to <strong>SAS</strong>_PUT and you submit yourprogram from a <strong>SAS</strong> session, the <strong>SAS</strong> SQL processor maps PUT function calls to<strong>SAS</strong>_PUT( ) function references that Netezza understands.This example illustrates how the PUT function is mapped to the <strong>SAS</strong>_PUT( )function using implicit pass-through.options sqlmapputto=sas_put;%put &mapconn;libname dblib netezza &mapconn;/*-- Set SQL debug global options --*//*----------------------------------*/options sastrace=’,,,d’ sastraceloc=saslog;/*-- Execute SQL using Implicit Passthru --*//*-----------------------------------------*/proc sql noerrorstop;title1 ’Test <strong>SAS</strong>_PUT using Implicit Passthru ’;select distinctPUT(PRICE,Dollar8.2) AS PRICE_Cfrom dblib.mailorderdemo;quit;These lines are written to the <strong>SAS</strong> log.options sqlmapputto=sas_put;%put &mapconn;user=dbitext password=dbigrp1 server=spubox database=TESTDBsql_functions="EXTERNAL_APPEND=WORK.dbfuncext" sql_functions_copy=saslog;libname dblib netezza &mapconn;NOTE: Libref DBLIB was successfully assigned, as follows:Engine: NETEZZAPhysical Name: spubox/*-- Set SQL debug global options --*//*----------------------------------*/options sastrace=’,,,d’ sastraceloc=saslog;/*-- Execute SQL using Implicit Passthru --*//*-----------------------------------------*/

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!