SAS EG and Stored Processes: 3 Tips for Using Options
Page 1 of 1
SAS EG and Stored Processes: 3 Tips for Using Options
There are some helpful options you can set in SAS Enterprise Guide to make your day-to-day coding tasks a little quicker. Some of these tasks can impact stored processes you create from tasks instead of coding.
SAS Enterprise Guide Options
From the Tools > Options menu you can preset options such as footer text and default SAS code that you want run before or after a task executes. Sometimes this can be more helpful than other times.
Tip #1 – Adding a Default Footer
You can add a default footer or header to all of your SAS generated reports. If you are using the SAS Tasks, SAS automatically adds whatever you have preset in the Options. If you use SAS functions or macro variables your reports and graphs will appear more customized.
To set a default footer for your SAS Enterprise Guide reports and graphs, do this:
1. From the Tools>Options menu, select the Tasks General pane.
2. In the Default footnote text for task output field, type your text. For instance, I am using the default time and date to indicate the last time the report was updated.
Note! The date() function returns when the SAS Enterprise Guide session was started not the system time. Only causes a problem if you never log out of your SAS EG session.
Tip #2- Adding Code to Run before Each Task
You can add custom code to run before or after a task or a query. For instance, maybe you always want the output to be justified to the left. You would add the options nocenter; text. If SAS Enterprise Guide has an annoying behavior, sometimes you can control the options through this setting.
From the Tool > Options menu, select Custom Code pane.
1. Click the Edit button to type your custom code into the Edit window.
2. Click the Save button when complete.
Tip #3 – Changing a Task to Stored Process
Now for the gotcha, if you are creating a stored process from a task flow instead of coding it, these options are added to the code. So you may have to temporarily disable the options if you do not want the stored process to have the behavior. In the following figure, you can see the log output with my custom code and footnote.
This does not hurt anything if it matches your intent for the stored processes. If it’s not what you want then you can either disable the option before creating the stored process or manually edit the stored process code.
Ref:bi-notes.com
SAS Enterprise Guide Options
From the Tools > Options menu you can preset options such as footer text and default SAS code that you want run before or after a task executes. Sometimes this can be more helpful than other times.
Tip #1 – Adding a Default Footer
You can add a default footer or header to all of your SAS generated reports. If you are using the SAS Tasks, SAS automatically adds whatever you have preset in the Options. If you use SAS functions or macro variables your reports and graphs will appear more customized.
To set a default footer for your SAS Enterprise Guide reports and graphs, do this:
1. From the Tools>Options menu, select the Tasks General pane.
2. In the Default footnote text for task output field, type your text. For instance, I am using the default time and date to indicate the last time the report was updated.
Note! The date() function returns when the SAS Enterprise Guide session was started not the system time. Only causes a problem if you never log out of your SAS EG session.
Tip #2- Adding Code to Run before Each Task
You can add custom code to run before or after a task or a query. For instance, maybe you always want the output to be justified to the left. You would add the options nocenter; text. If SAS Enterprise Guide has an annoying behavior, sometimes you can control the options through this setting.
From the Tool > Options menu, select Custom Code pane.
1. Click the Edit button to type your custom code into the Edit window.
2. Click the Save button when complete.
Tip #3 – Changing a Task to Stored Process
Now for the gotcha, if you are creating a stored process from a task flow instead of coding it, these options are added to the code. So you may have to temporarily disable the options if you do not want the stored process to have the behavior. In the following figure, you can see the log output with my custom code and footnote.
This does not hurt anything if it matches your intent for the stored processes. If it’s not what you want then you can either disable the option before creating the stored process or manually edit the stored process code.
Ref:bi-notes.com
pallav- Posts : 98
Join date : 2012-03-14
Location : Ahmedabad
Similar topics
» Stored Processes: 3 Ways to Edit a Stored Process
» Top 10 tips and tricks about PROC SQL
» Proc sort procedure now with additional options
» Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set?
» Practical Approach to the Stored Compiled Macro Facility
» Top 10 tips and tricks about PROC SQL
» Proc sort procedure now with additional options
» Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set?
» Practical Approach to the Stored Compiled Macro Facility
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Mon Jun 10, 2013 2:57 pm by Admin
» SAS Enterprise Guide: Explore Data before you start Analysing
Mon Jun 10, 2013 2:53 pm by Admin
» Predictive Analytics
Fri May 31, 2013 3:30 pm by Admin
» Creating Frequency Report and Creating User Defined styles in SAS Add-In for Microsoft Office
Tue Oct 23, 2012 2:11 pm by pallav
» Prompted Reports in BI Dashboard
Thu Oct 11, 2012 4:54 pm by kushal
» Free SAS Webinar : Getting Started with SAS Hash Object
Wed Oct 10, 2012 6:08 pm by pallav
» Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set?
Tue Oct 02, 2012 12:47 am by rajin_kumar@yahoo.com
» What is written to SAS Log?
Tue Oct 02, 2012 12:39 am by rajin_kumar@yahoo.com
» SAS Portal and BI Dashboard: Customizing the Tabs
Tue Oct 02, 2012 12:33 am by kushal