BookmarkSubscribeRSS Feed
vskon
Calcite | Level 5
The following is my Input 
 
 
INPUT
 
 
 
 
 
 
 
id
email
date
1
 
1/1/2020
1
a@gmail.com
1/2/2020
1
 
1/3/2020
1
 
1/4/2020
1
 
1/5/2020
1
b@gmail.com
1/6/2020
1
 
1/7/2020
2
c@gmail.com
1/1/2020
2
 
1/2/2020
2
 
1/3/2020
2
 
1/4/2020
2
 
1/5/2020
2
d@gmail.com
1/6/2020
2
 
1/7/2020
2
 
1/8/2020
2
 
1/9/2020
and I am trying to achieve the below output using SAS. 
 
 
OUTPUT
 
 
 
 
 
 
 
id
email
date
1
a@gmail.com
1/1/2020
1
a@gmail.com
1/2/2020
1
a@gmail.com
1/3/2020
1
a@gmail.com
1/4/2020
1
a@gmail.com
1/5/2020
1
b@gmail.com
1/6/2020
1
b@gmail.com
1/7/2020
2
c@gmail.com
1/1/2020
2
c@gmail.com
1/2/2020
2
c@gmail.com
1/3/2020
2
c@gmail.com
1/4/2020
2
c@gmail.com
1/5/2020
2
d@gmail.com
1/6/2020
2
d@gmail.com
1/7/2020
2
d@gmail.com
1/8/2020
2
d@gmail.com
1/9/2020
 
Please suggest.
 
Thank you in advance
2 REPLIES 2
brzcol
SAS Employee

Hi,

Thank you for posting a picture of some sample data. I have a few questions for you:

  • Is the data coming from an Excel spreadsheet, csv file, etc?
  • In your data, will the email for row 1 always be missing?
  • What is the relationship between the ID and the emails? I noticed the emails for A and B both correspond to ID 1. 
  • Is the purpose to create a new table or a report?
  • What code have you tried thus far?
PaigeMiller
Diamond | Level 26

@vskon Please help everyone out by changing the Subject on your original post to something that describes the problem. "SAS Code" is not a meaningful description. Something like "Filling in Blank Lines" would be a much better subject, it is a meaningful description of your problem, and it allows the SAS Community to operate more efficiently, people with a similar problem can see this meaningful subject line and read the responses.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 408 views
  • 0 likes
  • 3 in conversation