'SAS multiple datasets logical order

I'm sorry to ask this question but my English is poor and I don't know what to type on google to get results.

I want to do :

data test;
set mytable1 to mytable999;
run;

how can I tell SAS to set all the tables from 1 to 999 without writing them (cause it's long to do so). something like mytable1-999

thank you very much, I know it's a basic function but I don't remember what is the name in English

sas


Solution 1:[1]

Just use the wild-card function of ´:´ in SAS. In

data myTable1;
    do i = 1 to 3;
        j = 2*i;
        output;
    end;
run;
data myTable2;
    do i = 1 to 3;
        j = -i;
        output;
    end;
run;
data myAll;
    set myTable:;
run;

myTable: is equivalent with the list of all tables of which the name starts with myTable.

The result is

i   j
==  ==
1   2
2   4
3   6
1   -1
2   -2
3   -3

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1