BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
karan96
Fluorite | Level 6
data test;
input name $ @@;
datalines;
AA . .
BB . . . . .
CC . 
DD . . .
EE . . . . . . . .
FF
;
run;

 after running the code the output is like

    name 

1   AA

2    

3    

4  BB

7

8

9 CC

etc

 

 

 

Q how to repeat values in the missing place of variables.

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

Welcome to the SAS Communities 🙂

 

data want(rename=(_name=name));
   set test;
   if name ne '' then _name=name;
   retain _name;
   drop name;
run;

View solution in original post

1 REPLY 1
PeterClemmensen
Tourmaline | Level 20

Welcome to the SAS Communities 🙂

 

data want(rename=(_name=name));
   set test;
   if name ne '' then _name=name;
   retain _name;
   drop name;
run;
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2051 views
  • 0 likes
  • 2 in conversation