Valid in: | |
Default: | NO |
Requirement: | To specify this option, you must first specify CONNECTION=GLOBAL—except for Microsoft SQL Server, which defaults to UNIQUE. |
Data source: | Aster nCluster,
DB2 under UNIX and PC Hosts, DB2 under |
See: | CONNECTION= LIBNAME option, Temporary Table Support for SAS/ACCESS |
options sastrace=(,,d,d) nostsuffix sastraceloc=saslog; LIBNAME permdata DB2 DB=MA40 SCHEMA=SASTDATA connection=global dbcommit=0 USER=sasuser PASSWORD=xxx; LIBNAME tempdata DB2 DB=MA40 SCHEMA=SASTDATA connection=global dbcommit=0 dbmstemp=yes USER=sasuser PASSWORD=xxx; proc sql; create table tempdata.ptyacc as ( select pty.pty_id from permdata.pty_rb pty, permdata.PTY_ARNG_PROD_RB acc where acc.ACC_PD_CTGY_CD = 'LOC' and acc.pty_id = pty.pty_id group by pty.pty_id having count(*) > 5 ); create table tempdata.ptyacloc as ( select ptyacc.pty_id, acc.ACC_APPSYS_ID, acc.ACC_CO_NO, acc.ACCNO, acc.ACC_SUB_NO, acc.ACC_PD_CTGY_CD from tempdata.ptyacc ptyacc, perm data.PTY_ARNG_PROD_RB acc where ptyacc.pty_id = acc.pty_id and acc.ACC_PD_CTGY_CD = 'LOC' ); create table tempdata.righttab as ( select ptyacloc.pty_id from permdata.loc_acc loc, tempdata.ptyacloc ptyacloc where ptyacloc.ACC_APPSYS_ID = loc.ACC_APPSYS_ID and ptyacloc.ACC_CO_NO = loc.ACC_CO_NO and ptyacloc.ACCNO = loc.ACCNO and ptyacloc.ACC_SUB_NO = loc.ACC_SUB_NO and ptyacloc.ACC_PD_CTGY_CD = loc.ACC_PD_CTGY_CD and loc.ACC_CURR_LINE_AM - loc.ACC_LDGR_BL > 20000 ); select * from tempdata.ptyacc except select * from tempdata.righttab; drop table tempdata.ptyacc; drop table tempdata.ptyacloc; drop table tempdata.righttab; quit;