BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Santt0sh
Lapis Lazuli | Level 10

Hi,

 

I am trying to create files for each user, which will have details of the task. I am unable to achieve this.

 

Please find the attached code and suggest me what can i do, in order to achieve the results. currently the code which i am using is giving me the result below.

 

Current output.

--------------------------------

2 tasks assigned to user1

taskid= AA1000123

2 tasks assigned to user1

taskid=aa10052346

 

I would need some input to achieve the desired results.

 

Desired Output.

--------------------------------

2 tasks assigned to user1

taskid= AA1000123

taskid=aa10052346

 

 

PFA the sas code i am using.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Santt0sh
Lapis Lazuli | Level 10
Thank you for all your help, I have figured it out to send emails for each user.

View solution in original post

3 REPLIES 3
Urban_Science
Quartz | Level 8

I think all that you need to do is add an IF statement to only output "2 tasks assigned to user1" only when printing the first taskid.

 

%IF &i = 1 %THEN %DO;
     %PUT RECORDS ====>> &&RC&i.;
     %PUT "************************&&RC&i. CASES ASSIGNED TO &&USRid&i.*****************";
%END;
%PUT "************************&&tsID1&i.*****************";

Let me know if that helps!

 

Santt0sh
Lapis Lazuli | Level 10

Hi,

 

Thank you for your quick response.

Unfortunately the solution you have provided doesn't work as expected.

 

The If condition will not be true, hence the results are not changed.

 

 

Regards...

 

Santt0sh
Lapis Lazuli | Level 10
Thank you for all your help, I have figured it out to send emails for each user.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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