BookmarkSubscribeRSS Feed

Hi,

 

The idea is to allow to use hyphen(-) notation in the DATA statement. So the following code would work:

data b1-b10 ;
 set sashelp.class ;              
run ; 

and create 10 data sets b1 to b10.

The idea is to make it symmetric to SET statement behavior such as:

data a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 ;
  do value1 = 1 to 10;
    output;
  end; 
run ;       

data All_a1_to_a10 ;
 set a1-a10;              
run ; 

All the best

Bart

 

13 Comments
PhilC
Rhodochrosite | Level 12

@yabwon is there a link to your discussion with Hashman? oh wait

 

I see it on SAS-L@LISTSERV.UGA.EDU.  "StackOverflow: How to use a looped list to generate proc sql tables"  sorry I don't have the link.

yabwon
Onyx | Level 15

@PhilC if you ever used the SAS-L discussion list here is the link to the latest post in the thread I mentioned:

https://listserv.uga.edu/cgi-bin/wa?A2=ind1909c&L=SAS-L&F=P&X=F7ECC6764789CC4774&Y=yabwon%40gmail.co...

 

but I'm not sure if it will work without logging whence:

here is sas-l logging page: https://listserv.uga.edu/cgi-bin/wa?A0=SAS-L

here is the period when discussion took place: "September 2019, Week 3"

the thread subject: Re: StackOverflow: How to use a looped list to generate proc sql tables

 

All the best

Bart

PhilC
Rhodochrosite | Level 12

In reference to the original question, once one creates 10, 51, or a greater number of datasets, how does one use them? This was fun to consider, check me as "agreeing to disagree".  Good luck.