Hi:
Generally speaking about stored processes, when you are turning "regular" SAS code into a stored process, your override statements (such as for STYLE or other template) must go BEFORE the %STPBEGIN instruction in the stored process code. So, for example, not only do you have to make sure that the style template and/or the graph template lives on the server environment in a location that is accessible to the stored process server or the workspace server; but, then you also need to issue an ODS PATH statement that points to the correct PATH for templates (on the server, not on your local machine) and then you may need to do something like this:
[pre]
%global _odsdest _odsstyle _odsstylesheet;
%let _odsdest=sasreport12;
%let _odsstyle = berga;
%let _odsstylesheet=;
*ProcessBody;
%stpbegin;
libname srvtemp 'server environ path location for template item store location';
ods path srvtemp.templat(read)
sashelp.tmplmst(read);
...GTL step that uses graph template from above item store...
%stpend;
[/pre]
One warning -- if you are writing stored processes for the SAS Add-in for Microsoft Office or for EG, your style template should be honored assuming it is in the right location and accessible to the stored process. However, if you are writing stored processes for Web Report Studio, there is a possibility that WRS will not respect your style specification. WRS has it's own way of defining styles and may not use the style you set.
This NESUG paper and handout talk about defining and using custom tagset templates in a stored process. The same information would also apply to style templates and graph templates (especially what's in the handout).
Paper:
http://support.sas.com/rnd/papers/regional07/paradigm_edu07.zip
Handout:
http://support.sas.com/rnd/papers/regional08/SP_Template.pdf
(Note that the information in the paper and handout refer to SAS 9.1.3 -- if you have SAS 9.2 and the Enterprise Intelligence Platform, you may want to work with Tech Support on your template question.)
cynthia