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 |
Mention few capabilities of sas framework.
If a variable contains only numbers, can it be a character data type?
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.
How would you remove a format that has been permanently associated with a variable? ________________
what is sas business intelligence? : Sas-bi
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?
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
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.
what are the advantages of using SAS in clinical data mangement? why should not we use other software products in managing clinical data?
What is the work of tranwrd function?
How to create list output for cross-tabulations in proc freq?
Do you think professionally?