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.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Teradata 4 Using the <strong>SAS</strong>_PUT( ) Function in the Teradata EDW 827CALLED ON NULL INPUTEXTERNAL NAME’SL!"jazxfbrs"’’!CI!ufmt!C:\file-path\’’!CI!jazz!C:\file-path\’’!CS!<strong>for</strong>mn!C:\file-path\’;After it is installed, you can call the <strong>SAS</strong>_PUT( ) function in Teradata by using SQL.For more in<strong>for</strong>mation, see “Using the <strong>SAS</strong>_PUT( ) Function in the Teradata EDW” onpage 827.Using the <strong>SAS</strong>_PUT( ) Function in the Teradata EDWImplicit Use of the <strong>SAS</strong>_PUT( ) FunctionAfter you install the <strong>for</strong>mats that <strong>SAS</strong> supplies in libraries inside the Teradata EDWand publish any custom <strong>for</strong>mat definitions that you created in <strong>SAS</strong>, you can access 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 Teradata 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;libname dblib teradata user="sas" password="sas" server="sl96208"database=sas connection=shared;/*-- 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.libname dblib teradata user="sas" password="sas" server="sl96208"database=sas connection=shared;NOTE: Libref DBLIB was successfully assigned, as follows:Engine: TERADATAPhysical Name: sl96208/*-- Set SQL debug global options --*//*----------------------------------*/options sastrace=’,,,d’ sastraceloc=saslog;

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

Saved successfully!

Ooh no, something went wrong!