SAS macro code taking 3 input tables and creating 5 tables dynamically using macro code.
I am using this code in SAS SI 3.4. Could you please tell me how proceed for this.
Any suggession please.
You would need to be more specific for a specific answer. As a general guideline:
What I like to do is to store the macro itself in a SAS Autocall library. I then create a user written transformation where I call the macro, and I define prompts in this user written transformation to pass the values to the macro parameters.
Best practice would be to have the macro code inside the user written transformation. I personally like to have it external because if I have to change something in the macro code I don't need to redeploy all jobs which use the user written transformation. The risk is: The change to the macro will affect all deployed jobs using the user written transformation which call the macro - so you're better careful when changing.
You would need to be more specific for a specific answer. As a general guideline:
What I like to do is to store the macro itself in a SAS Autocall library. I then create a user written transformation where I call the macro, and I define prompts in this user written transformation to pass the values to the macro parameters.
Best practice would be to have the macro code inside the user written transformation. I personally like to have it external because if I have to change something in the macro code I don't need to redeploy all jobs which use the user written transformation. The risk is: The change to the macro will affect all deployed jobs using the user written transformation which call the macro - so you're better careful when changing.
Let's start like this.
This macro crating 5 tables dynamically and store it in one folder. No need to crate physical structure of tables.
This macro code will create more variables every next run.
Here my question is how to point these macro to the target tables storing in folder.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.