Published on :

Sans titre

This code is also available in: Deutsch Español Français
Awaiting validation
1 Code Block
DATA STEP Data
Explanation :
This DATA STEP block attempts to create the `prob12_10` dataset by reading raw data provided in the `datalines` block. The `input` statement aims to define variables `GROUP1` to `GROUP3` as character (length 1) and `SCORE1` to `SCORE3` as numeric (length 3), specifying position and length for reading values. However, the presence of ` @code_sas_json/12.10.json` in the `input` statement constitutes a syntax error, as it is not a valid numeric column pointer or a usable file reference in this form. Consequently, the `prob12_10` dataset will not be created correctly or will be empty.
Copied!
1DATA prob12_10;
2 INPUT @code_sas_json/12.10.json (GROUP1-GROUP3) ($1. +4)
3 (SCORE1-SCORE3) (3. +2);
4 
5DATALINES;
6A100 B 90 C 76
7C 87 A 86 B 88
8C 93 B 92 A 90
9;
10 
2 Code Block
PROC PRINT
Explanation :
This block uses `PROC PRINT` to attempt to display the contents of the `prob12_10` dataset. The output title is set to 'Problem 12.10'. Due to the error in the previous `DATA STEP`, this procedure would attempt to display a dataset that is not correctly formed or is empty.
Copied!
1PROC PRINT;
2 title 'Problem 12.10';
3RUN;
4 
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.