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
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 |
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 |
Answer / aruna
Use Callsymput(<variable>, <Value>) for version lessthan
SAS9
Use Callsymputx(<variable>, <Value>) for SAS9
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / xxx
%Global;
%Local;
%let;
call symput in datastep;
into clause in proc sql;
| Is This Answer Correct ? | 2 Yes | 0 No |
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 |
Suppose there is a SAS dataset with following values - Parent Child A B B C D E F G G H H I and so on….. This goes onto 1000s of observations/rows. Now how do we identify from this dataset Grandparents and Grandchildrens ?
5 Answers American Express, Barclays,
Please, anyone, let me know the style or an example of using 'by='/'by' variable of a PDV(Program Data Vector)
3 Answers Verinon Technology Solutions,
How to specify variables to be processed by the freq procedure?
i have a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we need to pick the observations random order like 100obs,500obs,1020obs,1890obs,2565obs like that i need 100 obs in random order? how can we create this one?
for what purpose would you use the retain statement? : Sas programming
Where do you use proc means over proc freq?
Explain the purpose of substr functions in sas programming.
what is sas database server? : Sas-di
Which is Best Institute for learning SAS BASE & SAS BI in Hyderabad? Can anyone suggest me ?
What is the difference between match merge and one to one merge?
What do the PUT and INPUT functions do?
What are the best sas programming practices for handling very large datasets? : sas-grid-administration