i have 2 data sets
data test;
input var $;
a1
a
a3
a4;run;
data test1;
input var $
b1
b2
b3
b4
;run;
i need to output as
Output:
a1
b1
a2
b2
a3
b3
a4
b4
2. Need Second transaction of guest using retain statement by ranking the dat
guestid transid amount transdate
For your first question: If below is a valid solution will depend on how representative your sample data is. It requires that you have the same number of observations in both source data sets (test, test1).
For your second question: I believe there is a lot of information missing for us understand the problem and provide an answer. For formulating a proper question I suggest you describe the actual problem and desired result instead of already asking a question with the solution included "Need Second transaction of guest using retain statement by ranking the dat". Here better tell us what you have (provide representative sample data), describe the problem and then show us how the desired result should look like.
If you have already some - may be not working - code developed then post this as well. Your code helps us to understand on what level of SAS coding skills you are so we can provide a solution which will be helpful to you.
data test;
input var $;
datalines;
a1
a2
a3
a4
;
run;
data test1;
input var $;
datalines;
b1
b2
b3
b4
;
run;
data want;
set test;
output;
set test1;
output;
run;
i have transaction details of guest users
guestid transid amount
101 11021 566
102 15021 999
101 13260 499
101 15420 645
102 16450 533
102 17894 489
103 14564 154
103 14523 539
SO here i need the guest second transaction details transaction id vary's but not guestid . so using retain statement can we do this or any other methods to finish this task. Please query it
thanks in advance Nagi
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.