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

Mention few capabilities of sas framework.

0 Answers  


If a variable contains only numbers, can it be a character data type?

0 Answers  


I need help in merging two different datasets. I am merging by date and I want to propagate observations from one dataset to the corresponding dates. One dataset has a unique date for each day of the month, while the other dataset has same date for different patient visits. For example I want to spread an observation on the 31DEC2008 from one dataset to several observations with the same date on a second dataset for all the patients who visited on that date. I have tried to merge the two and the result is not what I wanted. Instead I get a dataset whereby all the dates have missing values where observations from the first datset should have spread.

1 Answers  


How would you remove a format that has been permanently associated with a variable? ________________

5 Answers   Quintiles, TCS,


what is sas business intelligence? : Sas-bi

0 Answers  






1.What is the difference between _NULL_ , _ALL_, and _N_? 2.What are the uses of _NULL_ using in Data Steps? Can we _NULL_ in Proc Steps also? 3.How do call the macro variable in Data Steps? 4.How to construct Pivot tables in Excel Using SAS?

3 Answers  


We want to merge file A and B. File A has variable age, file B provide birthdate. How to merge the data according to age in file B

3 Answers  


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data set to a second data set, and the non-matches of the right-most data set to a third data set.

10 Answers   Accenture,


what are the advantages of using SAS in clinical data mangement? why should not we use other software products in managing clinical data?

2 Answers   Wockhardt,


What is the work of tranwrd function?

0 Answers  


How to create list output for cross-tabulations in proc freq?

0 Answers  


Do you think professionally?

1 Answers   Oracle,


Categories