04-04-2017 01:36 PM - edited 04-04-2017 01:37 PM
While running this program , i am getting an error can any body help me out.
I am working on SAS9.1 version.
Input Name $ 1-50 ;
Hello ladies and gentlemen
Hi, I am good
char1 = compbl(Name);
ERROR 180-322: Statement is not valid or it is used out of proper order.
Can anybody help me out.
04-04-2017 01:46 PM
It isn't the COMPBL function ... it's where you are trying to use it.
Any data manipulation statements should go between the INPUT statement and the CARDS statement. You just put it in the wrong place.
04-04-2017 02:18 PM
SAS executes one DATA or PROC step at a time. To do this, it needs to determine when one step ends and the next one begins. Most of the time, a RUN; statement tells SAS that the current step is complete. However, a CARDS; statement also has that purpose within a DATA step. It tells SAS that it already has all the statements that are part of the DATA step, and that the data to read in will follow.
Need further help from the community? Please ask a new question.