AVOID USING CAPITILISATION!
The reason being is because it is like shouting at the reader.
Now, in your problem, you have defined the length after the input statement. If a variable is not defined, then it will be defined with default values at the first instance it is used. So the datastep gets to the input and finds the cmspecify variable is not defined, so assigns it as $8 which is the default for character strings. Here I move the length before the input, so the first time the compiler sees the variable is when the length is defined:
data ch;
length subjid $5 form $20 cmstat $3 cmspecify $57;
infile " ";
input subjid $ form $ cmstat $ cmspecify $;
run;
title "Frequency table of Contraceptive Hisory";
proc freq data=ch;
tables cmstat cmspecify / nocum;
run;
You can get a code window up by clicking the {i} on the toolbar above post area.