To cut off at the last blank before the 300th character, do
data test;
variable = 'An essay is generally a piece of writing that gives the authors own argument but the definition is vague overlapping with those of an article a pamphlet and a short story Essays have traditionally been subclassified as formal and informal Formal essays are characterized by serious purpose dignity logical organization length whereas the informal essay is characterized by the personal element selfrevelation individual tastes and experiences confidential manner humor graceful style rambling structure unconventionality or novelty of theme etc Essays can consist of a number of elements including literary criticism political manifestos learned arguments observations of daily life recollections and reflections of the author Almost all modern essays are written in prose but works in verse have been dubbed essays Alexander Popes An Essay on Criticism and An Essay on Man While brevity usually defines an essay voluminous works like John Lockes An Essay Concerning Human Understanding and Thomas Malthuss An Essay on the Principle of Population are counter examples In some countries the United States and Canada essays have become a formal.';
length variable1 variable2 $300;
i = 300;
do until (substr(variable,i,1) = ' ');
i = i - 1;
end;
variable1 = substr(variable,1,i-1);
variable2 = substr(variable,i+1);
drop i;
run;
... View more