In that case, here is an alternative.
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrcon/n0oru3akf51pi5n1wco2onzr39oz.htm
merge A_2022: A_2023: ;
The colon includes all existing data set names that begin with A_2022 and A_2023, so be sure that that you want all of them before using this.
... View more