One way of creating a new variable in Macros is by %
Let....What is the other way..?

Answers were Sorted based on User's Feedback



One way of creating a new variable in Macros is by % Let....What is the other way..?..

Answer / prem krishnan

1) %macro <macroname> ( );
%mend (<macroname>;

a DATA step that contains a SYMPUT routine within a macro
definition
a DATA step that contains a SYMPUTX routine within a macro
definition

a SELECT statement that contains an INTO clause in PROC SQL
within a macro
definition
a %LOCAL statement.
%global statement

Is This Answer Correct ?    8 Yes 0 No

One way of creating a new variable in Macros is by % Let....What is the other way..?..

Answer / satyanand

•A %LET statement (used outside a macro definition)
•A DATA step that contains a SYMPUT routine
•A DATA step that contains a SYMPUTX routine (beginning in
SAS 9)
•A SELECT statement that contains an INTO clause in PROC SQL
•A %GLOBAL statement.

Is This Answer Correct ?    3 Yes 0 No

One way of creating a new variable in Macros is by % Let....What is the other way..?..

Answer / aruna

Use Callsymput(<variable>, <Value>) for version lessthan
SAS9

Use Callsymputx(<variable>, <Value>) for SAS9

Is This Answer Correct ?    2 Yes 0 No

One way of creating a new variable in Macros is by % Let....What is the other way..?..

Answer / xxx

%Global;
%Local;
%let;
call symput in datastep;
into clause in proc sql;

Is This Answer Correct ?    2 Yes 0 No

One way of creating a new variable in Macros is by % Let....What is the other way..?..

Answer / lavanya

In addition to the %LET statement, other features of the macro language that create macro variables are
iterative %DO statement
%GLOBAL statement
%INPUT statement
INTO clause of the SELECT statement in SQL
%LOCAL statement
%MACRO statement
SYMPUT routine and SYMPUTN routine in SCL
%WINDOW statement.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

how to know the attributes of first five datasets in a library

2 Answers  


How do i read multiple spaces in datasets?

4 Answers   Quintiles,


describe about physical data integration? : Sas-di

0 Answers  


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

0 Answers  


Mention what are the data types does SAS contain?

0 Answers  






How to test the debugging in sas?

0 Answers  


what is slowly changing dimension? : Sas-di

0 Answers  


What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

0 Answers  


how do you want missing values handled? : Sas programming

0 Answers  


how many types of MERGE?

17 Answers   CitiGroup,


Describe 5 ways to do a “table lookup” in SAS?

0 Answers  


How could i automate the code in the scenario:Every month one new data set will be created for that perticular month transaction list.Now i would like to update the data in the source table by appending every month data automatically. jan---set jan; feb---set jan feb; mar---set jan mar;

2 Answers   HSBC,


Categories