The data manipulated are character strings assigned to macro variables directly within the script. No external data source or SAS dataset is used.
1 Code Block
MACRO STATEMENT Data
Explanation : This block uses the %LET statement to define the macro variables 'First', 'Second', and 'both'. The 'both' variable combines the values of 'First' and 'Second'. The %PUT statement is then used to write literal text and the values of the macro variables ('First', 'Second', 'both') to the SAS log, allowing their content and expansion to be verified.
Copied!
/* This is a comment */
* And this is another comment ;
%LET First=SAS; %LET Second = Program;
%LET both
= &first &SECOND;
%PUT The results are: &First, &Second, --- &Both.ming;
1
/* This is a comment */
2
* And this is another comment ;
3
%LET First=SAS; %LET Second = Program;
4
%LET both
5
= &first &SECOND;
6
%PUT The results are: &First, &Second, --- &Both.ming;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Related Documentation
Aucune documentation spécifique pour cette catégorie.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.