Hello
I want to create a data set .
What is the best way to do it please?
I don't get the values all values and all rows.
There should be 42 rows and 5 columns
Data tbl;
input field $ @1 PCT @7 Amnt @10 Factor @17 Reduce @20;
cards;
max . . 1 -4490
max 30 20000 1 -2461
max 40 20000 1 -2981
max 50 20000 1 -3433
max 30 50000 1 -3621
max 40 50000 1 -3843
max 50 50000 1 -4039
max . . 1.1 -4157
max 30 20000 1.1 -2306
max 40 20000 1.1 -2788
max 50 20000 1.1 -3202
max 30 50000 1.1 -3361
max 40 50000 1.1 -3568
max 50 50000 1.1 -3749
max . . 1.2 -3858
max 30 20000 1.2 -2161
max 40 20000 1.2 -2607
max 50 20000 1.2 -2988
max 30 50000 1.2 -3125
max 40 50000 1.2 -3319
max 50 50000 1.2 -3486
S_Max . . 1 -5114
S_Max 30 20000 1 -2697
S_Max 40 20000 1 -3281
S_Max 50 20000 1 -3802
S_Max 30 50000 1 -4094
S_Max 40 50000 1 -4342
S_Max 50 50000 1 -4564
S_Max . . 1.1 -4804
S_Max 30 20000 1.1 -2573
S_Max 40 20000 1.1 -3122
S_Max 50 20000 1.1 -3606
S_Max 30 50000 1.1 -3859
S_Max 40 50000 1.1 -4093
S_Max 50 50000 1.1 -4301
S_Max . . 1.2 -4514
S_Max 30 20000 1.2 -2449
S_Max 40 20000 1.2 -2964
S_Max 50 20000 1.2 -3415
S_Max 30 50000 1.2 -3637
S_Max 40 50000 1.2 -3857
S_Max 50 50000 1.2 -4052
;
run;
Your datalines block needs to either have
Your datalines block needs to either have
Great and thank you!!
Data tbl;
INFILE DATALINES DLM=',';
input field $ PCT Amnt Factor Reduce ;
cards;
max,.,.,1,-4490
max,30,20000,1,-2461
max,40,20000,1,-2981
max,50,20000,1,-3433
max,30,50000,1,-3621
max,40,50000,1,-3843
max,50,50000,1,-4039
max,.,.,1.1,-4157
max,30,20000,1.1,-2306
max,40,20000,1.1,-2788
max,50,20000,1.1,-3202
max,30,50000,1.1,-3361
max,40,50000,1.1,-3568
max,50,50000,1.1,-3749
max,.,.,1.2,-3858
max,30,20000,1.2,-2161
max,40,20000,1.2,-2607
max,50,20000,1.2,-2988
max,30,50000,1.2,-3125
max,40,50000,1.2,-3319
max,50,50000,1.2,-3486
S_Max,.,.,1,-5114
S_Max,30,20000,1,-2697
S_Max,40,20000,1,-3281
S_Max,50,20000,1,-3802
S_Max,30,50000,1,-4094
S_Max,40,50000,1,-4342
S_Max,50,50000,1,-4564
S_Max,.,.,1.1,-4804
S_Max,30,20000,1.1,-2573
S_Max,40,20000,1.1,-3122
S_Max,50,20000,1.1,-3606
S_Max,30,50000,1.1,-3859
S_Max,40,50000,1.1,-4093
S_Max,50,50000,1.1,-4301
S_Max,.,.,1.2,-4514
S_Max,30,20000,1.2,-2449
S_Max,40,20000,1.2,-2964
S_Max,50,20000,1.2,-3415
S_Max,30,50000,1.2,-3637
S_Max,40,50000,1.2,-3857
S_Max,50,50000,1.2,-4052
;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: