Hello Everyone,
I'm working on automating a report generation process that involves data extraction, transformation, and conditional output formatting, but I'm still learning SAS programming. I've been experimenting with SAS Macros, but I'm having some trouble and would appreciate some advice from this experienced group.
This is my situation:
Data Sources: Several datasets kept in various libraries provide the data. Although the structure of each dataset is similar, department-specific variables may be included.
Condition: The report format needs to be slightly modified based on the department, which is a crucial variable in the datasets. For instance, whereas some departments require summary visuals, others require detailed tables.
Output: Each department's report should be saved in a separate folder, and the final output should contain both PDF and Excel files.
Problems I'm Having:
Macros that are dynamic: I'm having trouble adding conditional logic for various output formats to the macro I've started writing that loops through the department names.
Visual Exporting: Even though I know how to use PROC SGPLOT to create graphs, I'm not sure how to combine them with tables in a single PDF.
Folder management: Using department names to automate the creation and saving of reports into designated directories.
Questions for the Public:
- How should macros be organized for a report this dynamic?
- Are there any particular steps or settings in SAS that make exporting tables and graphics together easier?
- Does anyone have any examples of successful conditional formatting in macros?
I would be very grateful for any resources, sample code, or advice. Thanks in advance for your help and support.
Regards
Kelvinccsp