You create PROC SQL tables from SAS data files, from SAS data views, from relational DBMS tables using the LIBNAME statement, or ...
This example uses a SAS macro to create columns. The SAS macro is not explained here. See the SAS Guide to Macro Processing for ...