/**********************************************************************/


proc access dbms=oracle;     
   create sasuser.emp.access;
      user=scott;            
      orapw=tiger;           
      table=employees; 
      path='@d:vax123';
run;                   


/**********************************************************************/


proc access dbms=oracle accdesc=sasuser.emp;
   create sasuser.empv.view;                
      select all;                           
run;                                        


/**********************************************************************/


proc access dbms=oracle;
   create sasuser.emp.access;   
      user=scott;               
      orapw=tiger;              
      table=employees;          
   create sasuser.alldepts.view;
      select empno ename;       
   create sasuser.dept30.view;  
      select all;               
      subset where deptno=30;   
run;


/**********************************************************************/


proc print data=sasuser.dept30;
   title 'Department 30';      
run;                           


/**********************************************************************/


proc access viewdesc=sasuser.dept30 out=group30;
run;                                            


/**********************************************************************/


select *                      
  from connection to mycon    
    (select ename, job, deptno
    from employees);          


/**********************************************************************/


proc sql;                     
   connect to oracle as scott1
   (user=scott orapw=tiger);  


/**********************************************************************/


connect to oracle as ops;


/**********************************************************************/


create view sasuser.empinfo as      
  select ename, job, persons.deptno,
  name from                         
                                    
  connection to scott1              
    (select ename, job, deptno      
    from employees) persons,        
                                    
  connection to ops                 
    (select deptno, name            
    from dept_names) names          
                                    
 where persons.deptno=names.deptno; 


/**********************************************************************/


proc print data=sasuser.empinfo;
  title 'Employees and Department Names';
run;                                     
 

/**********************************************************************/


proc sql;                                   
   connect to oracle                        
   (user=scott orapw=tiger);                
   execute (drop table employees) by oracle;
quit;                                       


/**********************************************************************/


proc sql;                         
   connect to oracle              
   (user=scott orapw=tiger);      
   execute                        
   (create index i_emp$empno      
   on employees(empno)) by oracle;
quit;                             
 

/**********************************************************************/


proc sql;                                  
   select * from sasuser.empinfo, building 
      where empinfo.deptno=building.deptno;


/**********************************************************************/


proc sql;                                    
   select * from connection to oracle        
      (select ename, place_of_birth          
       from employees, biodata               
          where employees.empno=biodata.empno
            and employees.termdate is null); 


/**********************************************************************/


proc dbload dbms=oracle data=sasuser.empnews;
   user=scott;                               
   orapw=tiger;                              
   path="@d:vax123";                         
   table=employeeinfo;                       
   load;                                     
run;                                         


/**********************************************************************/


path='@d:vax123"
                /* VMS_USERNAME VMS_PASSWORD */
                                               "';


/**********************************************************************/


path='@d:vax123::"TASK=ORDNMAIN"';


/**********************************************************************/


path="@T:";


/**********************************************************************/


path="@T:vax456";


/**********************************************************************/


path='@T:vax456:SDMAIN';


/**********************************************************************/


path='@t:vax456,buffsize=100';


/**********************************************************************/


path=',buffsize=100';


/**********************************************************************/


connect to oracle                      
        (user=scott password=tiger     
        path='@t:vax456' buffsize=100);


/**********************************************************************/


proc access dbms=oracle;          
    create sasuser.buff1.access;  
       user=scott;                
       orapw=tiger;               
       table=row5000;             
       path='@2:,buffsize=1';     
    create sasuser.buff1.view;    
       select all;                
    create sasuser.buff500.access;
       path='@2:,buffsize=500';   
    create sasuser.buff500.view;  
       select all;                
run;                              


/**********************************************************************/