DATA HAVE;
INPUT VISIT $10. VISITNUM;
CARDS;
VISIT 1 1
VISIT 1 1
VISIT 1 1
VISIT 1 1
UNSCH 999
UNSCH 999
RUN;
Required Output:
VISIT VISITNUM VISIT_ VISITNUM_
VISIT 1 1 VISIT 1 1
VISIT 1 1 VISIT 1 1
VISIT 1 1 VISIT 1 1
VISIT 1 1 VISIT 1 1
UNSCH 999 UNSCH VISIT 1 999.001 999.001
UNSCH 999 UNSCH VISIT 1 999.002 999.002
What are the rules you want to implement?
@rajeshalwayswel wrote:
In new variables Visit_, Visitnum_.
That's not a rule. It's an example. You post
VISIT VISITNUM VISIT_ VISITNUM_
VISIT 1 1 VISIT 1 1
VISIT 1 1 VISIT 1 1
VISIT 1 1 VISIT 1 1
VISIT 1 1 VISIT 1 1
UNSCH 999 UNSCH VISIT 1 999.001 999.001
UNSCH 999 UNSCH VISIT 1 999.002 999.002
It doesn't answer these questions:
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.