Published on :
Development INTERNAL_CREATION

Hello World Example

This code is also available in: Français Deutsch Español
Awaiting validation
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!
1DATA Hello_World;
2 msg = "Hello, World!";
3RUN;
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!
1PROC PRINT DATA = Hello_World noobs;
2RUN;
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.