In a table I have column headings of the dates of activity based on a SAS table that is always being updated. Is there a way to program a list table to display column headings no matter what they are called or how many there are?
When I create new list tables it always asks for the column headings, essentially hard-coding the names and number of the columns. I need a more polymorphic solution. Any ideas? Thanks in advance.
With "traditional" SAS (SAS9, Viya spre) you can simply use something like:
proc print data=<your table> noobs;
run;
If you want a report in Viya then you need up-to-date metadata objects for the table in CAS and for the Report.
You can dynamically update table metadata so it stays in synch with the physical table but I don't believe you can do something similar for report metadata (a report object). How could SAS "know" where a new column would need to be placed in a report and how to use it.
Changing table structures always cause challenges and additional coding work. Ideally re-arrange your data from wide to long and load this stable table structure into CAS for reporting.
Instead of a table structure like below...
...re-arrange your data prior to loading into CAS to...
With "traditional" SAS (SAS9, Viya spre) you can simply use something like:
proc print data=<your table> noobs;
run;
If you want a report in Viya then you need up-to-date metadata objects for the table in CAS and for the Report.
You can dynamically update table metadata so it stays in synch with the physical table but I don't believe you can do something similar for report metadata (a report object). How could SAS "know" where a new column would need to be placed in a report and how to use it.
Changing table structures always cause challenges and additional coding work. Ideally re-arrange your data from wide to long and load this stable table structure into CAS for reporting.
Instead of a table structure like below...
...re-arrange your data prior to loading into CAS to...
SAS is headed back to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team.
Interested in speaking? Content from our attendees is one of the reasons that makes SAS Innovate such a special event!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.