Running the SAS code below generates this error:
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,
a numeric constant, a datetime constant, a missing value, INPUT, PUT.
30 run;
SAS Code:
/*use the COMPBL function to read Location and convert each occurrence of two or more consecutive blanks into a single blank*/
data weather_japan_clean;
set pg2.weather_japan;
NewLocation=compbl(Location);
NewStation= ;
run;
This can be found as a response to Lesson 3 > Using Character Functions > Activity > 1.
Kindly review and assist provide correct response
Please post the exact log. That will often include more information about exactly where the error is. It usually includes a line and column number in fact that lets you start to figure out where the error may be.
@Jukon2 wrote:
Running the SAS code below generates this error:
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,
a numeric constant, a datetime constant, a missing value, INPUT, PUT.
30 run;
SAS Code:
/*use the COMPBL function to read Location and convert each occurrence of two or more consecutive blanks into a single blank*/
data weather_japan_clean;
set pg2.weather_japan;
NewLocation=compbl(Location);
NewStation= ;
run;
This can be found as a response to Lesson 3 > Using Character Functions > Activity > 1.
Kindly review and assist provide correct response
NewStation= ;
This is invalid code. You have to supply an expression on the right side of the equal sign. Even if you want it to be a missing value.
I agree with you but this is how it was provided on the elearning platform as a response to one of the activity questions.
I've reached out to their customer service and hope to get a response?
Please copy/paste the question and code here, so we can have a look.
If this is an actual answer from your instructor, you need to get a new instructor. This one's broken 😉
Please find question and answer below.
Open p203a06.sas from the activities folder and perform the following tasks:
data weather_japan_clean;
set pg2.weather_japan;
NewLocation=compbl(Location);
NewStation= ;
run;
..
It will be nice to put ' ' in that space but I can't tell what the instructor was trying to depict or explain further. Thanks anyway.
Data manipulation Techniques
Lesson 3 > Using Character Functions > Activity > 1.
Kindly review and assist provide correct response
SAS Code:
/*use the COMPBL function to read Location and convert each occurrence of two or more consecutive blanks into a single blank*/
data weather_japan_clean;
set pg2.weather_japan;
NewLocation=compbl(Location);
NewStation= ;
run;
This can be found as a response to Lesson 3 > Using Character Functions > Activity > 1.
Kindly review and assist provide correct response
Most probably!. Thanks for responding.
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 25. 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.