You are on page 1of 9

c 



   
 
  

 

    
  

 

 c !  


 "
 !#$
  !%"%   &%%'

%(        Ô Ô  
) *   +
 ,
 -,
 

,-    ( 
 ,"-,
 ( -,
 
      ,    


u   u   u  



  

  

   

c 
 
 

 
        )   

   #$./%($ ( 

 %(    


!0)   ,- --,
 ( -,


%121.131
c1 1 (   -" 3 

1c     
  ( 3#!(   
 -,
 , 
  ( %(43     
 %(    
   
 
  3    

 Ô
   %(43   "

%   (  5-
 %  ",*  
   ( 

, #$#3(    
  )

   

 

Ô ÔÔ

 
 


 !!
!" #$  
$ %!!
$&"$$! !
%  &$!!
'"$$!!!
$!% 
'"$#$! 
$$!%% %
#" ! !

()*( (

The output from this run looks as follows:

)+
, -*(((

 !!
!" #$  
$ %!!
$$&"$$! !
 %  &$!!
%'"$$!!!
!$!% 
''"$#$! 
&$$!%% %
# #" ! !

( -,
2 3#!(   

 ,"

&6'    


  -,
 7    1  -,
  
   1  

-
& '  -,
  ,-  
 

-1  r


 8

 
 


 !!
!" #$  
$ %!!
$&"$$! !
%  &$!!
'"$$!!!
$!% 
'"$#$! 
$$!%% %
#" ! !

()*( (

The output from this run looks as follows:

)+
, -*(((

. !!
!. #$  
.$ %!!
$$&.$$! !
 % . &$!!
%'.$$!!!
!.$!% 
''.$#$! 
&$.$!%% %
# #. ! !
@  
 
 Ô Ô

  


  

 
"  ,-  9 
1  
   -,
   
  ,
,
*

/Ô
 01#&1!
2
)2/33"
4Ô/ .0/!56Ô76

 
Ô 8/Ô  

9

  -,
3/  6c+ :   3/  -,
 
 
c+ :  
 ,
*  

"
 -,

 
1       
  ( " 

,
"
    
  
 (  " ," 
 
 (  " -,
((  ,

  ,,
* (   (;$3
*

 8

)+ " -* 6 

)2/33"
4Ô/ .0/!56Ô76

 6 <+=  ()


  
6    -,
 
3#!(   1    ‘

/Ô
 01#
2
)2/33"
4Ô/ .0/!56Ô76

 
Ô 8/Ô  

)+ " -* 6 

)2/33"
4Ô/ .0/!56Ô7

9 ,- 1   >3 >   ()-,



* ,
*, >3 >>)*>
  -,
 (  >)*> 
   -,
 3#!(   1  ((

% 
   "
,-  
    -,
121)1? %( 

*
*8

,69
 :
2
.$
.
.$
.
&.$
#.#

 

)


,-  
  
" @@",
  
     8

,69
 :;;
2
.$..$
.&.$#.#

 

 

   


 

 -,
21)1?  7   @@
",
1  
      
 
 -,
 

&  ,"  "


-  
  
 -
>3)>-,' 7  @@",
1


 

 -,
 
    


@ @ 
 
Ô
 
 
-   
 

"   


 ",- 1    A  
 (

%(  
    Ô 3#!(   (    3#!(
        
""  "    
 
%(   %(43  

(  - 394   )" 


" 394
     
 8


<2=
>?(/? Ô?
&&'?
).=
 2ÔÔ 7 Ô3
)
 

" 943/   ( 943/     "




   +  ( 943/     
%(  9 


<20Ô=
>?(/? Ô?
&&'?
).=

<2Ô
 2ÔÔ 7 Ô3
)
 

  


%8B B( B% c<<CB%$3      + ($2 ( 
394    %(  
"    + (   + 

*    
 
 
 ,",
*&/ 


-D   

 1 
'"
   
394   8

<20Ô=
>?(/? Ô?
&&'?
).=

<2Ô208=@=
 2ÔÔ 7 Ô3
)
 

Many files contain header information which you do not want to make part of the SAS
data set‘ To skip a records at the top of the file use the FIRSTOBS= option‘ To read only
a specified number of records use the OBS= option‘ For example,

<20Ô=
>?(/? Ô?
&&'?
).=

<2Ô208=@=<Ô38Ô38##
 2ÔÔ 7 Ô3
)
 

c::+&c 'EcFC<,-  


%8B B( B% c<<CB%$3 
,   c 
 

* 
 -,


@ 
 
 


  
   ,- 1  
  

-""*
     
 

",     ( %9


"  ; -1    




  

+*    


  - &*8( 
  , ::,   :=G ::='

"  ,8B( )   -     ,  ( 
   

<20<=*>? 0 ?0.3<=

Ô3<3$8<Ô 83
 

  *     ,


  01  E1,F
 ,F "0 
,F  ,F

@ 
 


"


   Ô  


 
"
 7 
  
,


    " 



" 1 - 1" *  
  "  5

 
 , "   ,,"  
          

 ,
      
-
,

"     (      
  *1
 >- 
 

 7    %( 

,69
 :
2
.$
.
.$
.
&.$
#.#

 

 

    4$. 

#,69
# :
#$2

) > /A)(B.,69/%Ô3Ô32.
) > /
0 #.%Ô.


 



        2)?1   7$H 2)? 
(   &7$H'      " 
 &  1  1 1  ' 

      



,"7$H
    & " "' (-  
 ,"   1
" 
,"   
 "
,"1  -1" -   
,"  
 ",
"  ( 
    43/   9
 


230023=
>?(/?
?&&%=

   "%8B B% Bc<<   "


, "
,*   
&
,"'
 
    943/   $
,
1"     
,"&F   "',"   
   
,
      9 
1

230023=*>?(/?
?" =

023.,69
 :
2
.$
.
.$
.
&.$
#.#

 


        "8B B% B/> ( 
  "

   " 

, "A  7 "   


1  ,
"
,    
 "
   (  
,,  "   
   9 
   1

2305/=*>?(/?
?" =

Ô 85/.: 
 


"    "  "1""    
    1  1   ,
  " 
-"
-  "

@  
   Ô 

/ 
 ,-"     
   

  
 ,-   
 -
"" (   " 
,
 & ",1,   * '

@   
   

(  
 "   9
     A   *"   
-   
    7 
 
,   
 1 - 

  *1     "   -  ( 


 -   A-,
,- 
 
       ,-   +  *   -,

   7 -  

1*   
 

"

" 
-,
&    1    
 1
,,
*'  
- +
"
 -,

 $  
 1      #$#3( *
7    A* 1    "    
  sure all variable names and observations have been converted correctly‘

Ô87 
  
  ,- - c  

    
-  
 : 
= :         
<= 

 
- 
" /*    - 
 :&F 
<'

@   

$     


  ,   
 ,
1, 
  
"      *G , 

""  (
  1  

Ô 
 

#$ 

1   



(-  
      
""1"
"    

   5  


,      
 
Ô3082
Ô.2.
 /8=*>?*Ô ?  ?
?Ô<& .2=
 8
5Ô7/8(&
08
8
 C 8
*Ô.2.5
222
 

Ô3 
Ô.2 
 

Ô238Ô 
22D00 85
22D00 8 
  
C 

Ô 8Ô3 
 

(   
  8BB  "B% B"<

-      $)3 (    *  9< ( 
 F1F15F   #$ 

 
*-,


         1 * 
-,
51- 
 
&      '

,  ( #$%((
     
 ,"
 -

     


  !

%% "

"   , 


  )  
" 
  
 1, 
 
  
      
  9-  
 1    A&9
+  ' 

 "1 
 ,        , (
  -  #$ 
1 

 8 very helpful,


easy to use and quick‘ I am concentrating here on how to read data from Excel into SAS
via DDE‘ In contrast to import with the

<20Ô=2E*>?*Ô ? 


 ?
?F)6(& .,G(& H(*>(&*#=
3
<2Ô0Ô
 230Ô/ 0Ô 3333
 
Ô 83  

(    


   

 %% 


   
 I
J 
(  %% 
 
  
 ",  
 9  
"1 
 *   %% 
  
1 
   

"      "   
,& 
+' (  
 
 +%%(
   ( 
,     
%% 
 K "  
  
   & 
+ *  ' 3 
   
 ,     1      
  
 ( /$0  394   - 
   
  -
  


 3#!(   
-,
1   -
 7  /$0 1 3#!(
       1-
    ,