The script starts with a DATA STEP that creates a temporary table named 'Hello_World'. This table contains a single variable, 'msg', which stores the character string 'Hello, World!'. Then, a PROC PRINT is used to display the content of this table in the output, without including the observation number column.
Data Analysis
Type : INTERNAL_CREATION
The 'Hello_World' table is created directly within the SAS script and does not depend on any external data source.
1 Code Block
DATA STEP Data
Explanation : This DATA STEP block creates a SAS dataset named 'Hello_World'. It defines a single variable, 'msg', and assigns it the textual value "Hello, World!". This is a basic example of in-memory data creation.
Copied!
data Hello_World;
msg = "Hello, World!";
run;
1
DATA Hello_World;
2
msg = "Hello, World!";
3
RUN;
2 Code Block
PROC PRINT
Explanation : This block uses the PROC PRINT procedure to display the content of the 'Hello_World' dataset created previously. The 'noobs' option is used to suppress the display of the observation number (OBS) column, making the output cleaner for simple display.
Copied!
proc print data = Hello_World noobs;
run;
1
PROC PRINTDATA = Hello_World noobs;
2
RUN;
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.
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.