BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SYN
Obsidian | Level 7 SYN
Obsidian | Level 7

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.

Sreenivasa
1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

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.

View solution in original post

2 REPLIES 2
Patrick
Opal | Level 21

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.

SYN
Obsidian | Level 7 SYN
Obsidian | Level 7

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.

Sreenivasa

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to connect to databases in SAS Viya

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.

Discussion stats
  • 2 replies
  • 833 views
  • 0 likes
  • 2 in conversation