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:
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →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.