ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 


 

Company >> D&B >> D&B Questions
 
 D&B technical test questions  D&B Technical Test Questions (1)  D&B interview questions  D&B Interview Questions (2)
 
Back to Questions Page
Question   what does .. meant in sas macros Rank Answer Posted By  
 Interview Question Submitted By :: Sun
I also faced this Question!!   © ALL Interview .com
Answer
In macros two dots (..) are used to call a library if it is 
declared as a macro.

IF YOUR USING A SINGLE DOT i.e SCOTT.EMP YOU WONT GET ANY 
OUTPUT AND THE ERROR OCCURED IS WORK.SCOTTEMP DOES NOT EXIST

SO WE SHOULD USE TWO DOTS WHEN CALLING A LIB NAME AS A MACRO

%LET A=SCOTT /*LIBRARY NAME*/

PROC PRINT DATA=&A..EMP;
RUN;
 
1 Arun & G.n.rao
 
 
Answer
to the above answer i add little .. is used for libref and 
one . for compiler and another for macro variable.
 
0 Gangadhar
 
 
Question   There is a field containing a date. It needs to be displayed in the format "ddmonyy" if it's before 1975, "dd mon ccyy" if it's after 1985, and as 'Disco Years' if it's between 1975 and 1985. How would you accomplish this in data step code? Using only PROC FORMAT Rank Answer Posted By  
 Interview Question Submitted By :: Sud.sun16
I also faced this Question!!   © ALL Interview .com
Answer
data new ;
input date ddmmyy10. ;
cards;
01/05/1955
01/09/1970
01/12/1975
19/10/1979
25/10/1982
10/10/1988
27/12/1991
;
run;

proc format ;
 
        value dat  low-'01jan1975'd=ddmmyy10.
             '01jan1975'd-'01JAN1985'd="Disco Years"
                      '01JAN1985'd-high=date9.;
   run;
 
proc print;
run;

proc print;
format date dat. ;
run;
 
0 Vijs
 
 
 
Answer
DATA D1;
INPUT SLNO DATE DATE9. ;
DATALINES;
1 12DEC08
2 22NOV08
3 01JAN08
4 12FEB07
5 13MAR07
6 24APR06
7 17MAY06
8 20JUN05
9 29JUL05
10 30APR09
;
RUN;

proc format ;
 value KAVI  low-'31DEC2006'd='***ddmonyy***'
             '01JAN2007'd-'31DEC2007'd='***dd mon ccyy***'
             '01JAN2008'd-high='  **Disco Years **';
   RUN;
 
proc print data=D2 noobs label;
format DATE KAVI.;
RUN;
 
0 Kavitha
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com