Hallo community, I am writing to you because I have this problem.
I want to make the Cartesian product of two datasets where each contains 6 lines (the final db must have 36 lines) through a datastep (and not proc sql). Could you give me a hand?
The two datasets are as follows
data scoperto_1;
input Scoperto $;
datalines;
0.1
0.2
0.3
0.5
1.0
2.0
;
run;
data limite_1;
input limite $;
datalines;
40
50
60
70
80
90
;
run;
I want to get a single dataset with all combinations of "limite" and "scoperto" (36 rows) through a datastep (and NOT proc sql).
Thanks in advance
max
Your favorite internet search engine finds answers quickly. Here's one:
https://sasnrd.com/sas-cartesian-product-proc-sql-data-step/
Your favorite internet search engine finds answers quickly. Here's one:
https://sasnrd.com/sas-cartesian-product-proc-sql-data-step/
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.