Sorry, you'll have to show us a (portion of) your data. I don't understand what you want.
Also show us the desired output.
Don't show us one and not the other.
@cm3 wrote:
Correction typo mistake below
E031000. 4 2 5 E03. 303
303
312
E03100S. 1 1 4 E03. 309
300
304
Get your text, in a plain text editor like the SAS editor or Notepad. The paste into a code box using the forum's {I} to preserve the format. Otherwise the forum strips a lot of blanks, tabs and such. I am guessing that you intended something like:
E031000. 4 2 5 E03. 303
303
312
E03100S. 1 1 4 E03. 309
300
304
which would indeed be a bad structure for an actual data set. If you are wanting a REPORT that is read by people and not data fed into other procedures then say so.
The reason this would be bad as a data set is that the value of the variable userformid is no longer available for grouping for any purpose on most records. So summarizations and such are likely to be off.
It feels wrong to create such a data structure but here you go.
data want;
set have;
by Userformid;
if not first.Userformid then
do;
call missing(Userformid, RS, min_rs, max_rs, grade);
end;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.