Published on :
ETL CREATION_INTERNE

Export data to text file

This code is also available in: Español Français
Awaiting validation
This script uses a DATA _NULL_ step to read numerical data (x and y) from the CARDS statement and write it to a file named 'output.txt' with specific formatting.
Data Analysis

Type : CREATION_INTERNE


Data is provided directly in the code via the CARDS statement.

1 Code Block
DATA STEP Data
Explanation :
Reads variables x and y from internal data lines and writes them formatted to the output.txt file without creating an output SAS table.
Copied!
1DATA _null_;
2INPUT x y;
3file "output.txt";
4put x 12.3 " " y 12.5;
5CARDS;
61 1
72 1.4142135623730951
83 1.7320508075688772
91e11 316227.76601683791
10;
11RUN;
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.