BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

I run code that create data sets in following order.

Why the data sets appear in different order then order they were created?

Ronein_0-1765185983163.png

 

 

%let h1=2508; /**YYMM structure**/
%let h2=2507;
%let h3=2506;
%let h4=2505;
%let h5=2504;
%let h6=2503;


%macro Help_Macro_a;
%do j=2 %to 6; 
proc sql;
create table _L_CS_&&h&j. as
select b.lakoach_y as lakoach_Y&h1.,a.*
from L_CS_&&h&j.(Rename=(lakoach_y=lakoach_y_&&h&j.))  as a
inner join L_CS_&h1. as b
on a.lakoach=b.lakoach
;
quit;
%end;
%mend Help_Macro_a;
%Help_Macro_a
6 REPLIES 6
Kathryn_SAS
SAS Employee

I am not replicating what you are showing. Can you send the log with the following options turned on:

options mprint mlogic symbolgen;

Ronein
Onyx | Level 15
My question was- if you look at do loop then the order in which data?sets are created is-2507
2506
2505
2504
2503.
But when look at output screen can see 5 data sets thst were created but the order of then different.
Kathryn_SAS
SAS Employee

I understand what you describe and what you show is not the correct order. However, when I run your code with sample data, I get the expected order. I have included my screenshot. Please include your SAS log with the options requested and clarify where you are running the code and which version.

communities.png

andreas_lds
Jade | Level 19

Can replicate your problem with EG 8.5 or 8.6 - maybe a problem with an older version or with some option set in EG itself.

andreas_lds
Jade | Level 19

Two chars are missing in my previous post:

Can't replicate your problem with EG 8.5 or 8.6 - maybe a problem with an older version or with some option set in EG itself.

Tom
Super User Tom
Super User

You need to state what GUI interface you are using that is captured in your picture.

 

One of the responses is guessing it is Enterprise Guide.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

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
  • 6 replies
  • 337 views
  • 0 likes
  • 4 in conversation