Hi all,
I have a situation where I need to create a dataset with some long free text. Is there a way to force SAS to read the below correctly beyond the 80th column? Works well if PARAMETER was limited to 80th column, beyond that it gets messed up. Also, MISSOVER option didn't solve the issue. Output of below code shown below.
Thanks!
Add
infile datalines truncover;
to override the default FLOWOVER option.
Add
infile datalines truncover;
to override the default FLOWOVER option.
I got no problem with your code.
But you could also try this alternative code .
options parmcards=x;
filename x temp;
parmcards;
1 A text here text here
2 B text here text here text here text here text here text here
3 C text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here text here xx
4 D text here
;
data test;
infile x lrecl=32767 truncover;
input ord 1-2 _NAME_ $ 4-5 PARAMETER $ 7-200;
run;
That is because there are very few situations where you ever would want to use the ancient MISSOVER option.
Instead you should always use the modern (probably more than 30 years old) TRUNCOVER option when you don't want the default FLOWOVER option.
The reason you would use MISSOVER in this situation is when you want SAS to IGNORE anything in columns 7 to 185 that does not completely fill all 179 bytes with something. And since in-line data is padded to use the next multiple of 80 bytes that means that to avoid losing data when using MISSOVER with your code each line would have to have at least 161 bytes.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.