The limit for a character in SAS is 200 columns. Thus, if a record is 400 columns long, two variables of 200 columns each will have to be defined.
One needs to be careful about how the character is defined in the input statement. One needs to use CHAR$xxx. format where xxx indicates record length. This format does not trim leading blanks. The more commonly used $xx. format trims leading blanks. However, one can use the $xx. format for writing the variables out.
Example:
filename extract pipe 'zcat /usr/sage/data/cps/1968.Z';
data y1968;
infile extract lrecl=216;
input type 1-1 @2 long1 $char200. @202 long2 $char15.;
if type eq 4 then last=1;
if type eq 3 then last=2;
data out;
set y1968;
file out68 lrecl=217;
put type 1-1 @2 long1 $200. @202 long2 $15. last 217-217;
run;
Recent resources, events, news
Farley. "Kerner Report plus 40 Years." PSC Research Report.
Galea et al. "Longitudinal Predictors of Post-traumatic Stress"
Monday, Oct 13
Jamie Jones
"Fertility & Risk Aversion on Utah Frontier"
W A R N I N G
If you are reading this, it may be that you are using rather old web browsing software that does not support modern international Web technology standards. For a better experience of the Web and this site in particular, please upgrade your web browser software today. The following are good choices: Firefox 2; Opera 9; Safari 3.