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

What are the statements that are executed only?

0 Answers  


what is the difference between SET and MERGE?

19 Answers   CitiGroup,


Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?

0 Answers  


How could you generate test data with no input data?

6 Answers   Quintiles,


What are SAS/ACCESS and SAS/CONNECT?

0 Answers  






I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry

0 Answers  


What is program data vector (pdv) and what are its functions?

0 Answers  


What do you feel about hardcoding?

4 Answers   Oracle,


what do the sas log messages "numeric values have been converted to character" mean? : Sas programming

0 Answers  


what is sas and what are the functions? : Sas-administrator

0 Answers  


What is the basic syntax style in SAS?

0 Answers  


How would you include common or reuse code to be processed along with your statements?

5 Answers   PSCI,


Categories