Hi , Below is the code. Please elt me know why I get blanks for the coulumns E to H and 'I' under the coumn I instead of 'Yes'
data SAMPLE;
input A $ B $ C $ D
E F G H I $ ;
label A="A"
B="B"
C="C"
D="D";
E="E";
F="F";
G="G";
H="H";
I="I";
datalines;
CIT 05792 1/1/2016 225000 60000 1017815 4924600 233978 YES
CIT 05792 1/1/2016 225000 60000 1017815 4946901 472 YES
CARL 05295 1/1/2017 175000 50000 10187296 302304 136097 YES
CARL 05295 1/1/2017 175000 50000 10187296 900400 88954 YES
A B C D E F G H I
CIT 05792 1/1/2016 225000 . . . . I
CIT 05792 1/1/2016 225000 . . . . I
CARL 05295 1/1/2017 175000 . . . . I
CARL 05295 1/1/2017 175000 . . . . I
;
syntax issue in your label statement
correction:
data SAMPLE;
input A $ B $ C $ D E F G H I $ ;
label A="A"
B="B"
C="C"
D="D"
E="E"
F="F"
G="G"
H="H"
I="I";
datalines;
CIT 05792 1/1/2016 225000 60000 1017815 4924600 233978 YES
CIT 05792 1/1/2016 225000 60000 1017815 4946901 472 YES
CARL 05295 1/1/2017 175000 50000 10187296 302304 136097 YES
CARL 05295 1/1/2017 175000 50000 10187296 900400 88954 YES
;
Because you have semicolons in your LABEL statement, transforming it into a series of assignments.
"transforming it into a series of assignments"
That's what makes Prodigygeniusstats aka PGstats exquisite, My oh My, that's attention to detail. Class!
@PGStats wrote:
Because you have semicolons in your LABEL statement, transforming it into a series of assignments.
Thank you all!
Your program/date works fine for me.
Something must have gotten lost in translating your code into your posting.
Perhaps you can post lines from your SAS log? Make sure to use the insert Code pop-up window to preserve formatting.
data SAMPLE;
input A $ B $ C $ D E F G H I $ ;
datalines;
CIT 05792 1/1/2016 225000 60000 1017815 4924600 233978 YES
CIT 05792 1/1/2016 225000 60000 1017815 4946901 472 YES
CARL 05295 1/1/2017 175000 50000 10187296 302304 136097 YES
CARL 05295 1/1/2017 175000 50000 10187296 900400 88954 YES
;
proc print;
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!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.