10-28-2011 04:56 AM
I initially posted my question in the SAS Stored Processes forums, however this forum might be a better place for it.
Please find below a "copy" of my question.
I am faced with the situation where a customer has created a Stored Process from a job inside DI Studio (version 4.21).
The final step in this job is that data is "exported" to a .csv file using a data _null_ step and the file _webout statement.
A similar solution has been implemented at this customer from within Enterprise Guide.
When a Stored Process is created from within Enterprise Guide this solution works since it is possible to suppres the implementation of the %stpbegin and %stpend macros.
When the Stored Process is created inside DI Studio I could not find how this can be suppressed resulting in the fact that these macros are automatically added.
So my question:
Is it possible (just as in Enterprise Guide) to suppress the addition of the %stpbegin and %stpend macro when a Stored Process is generated from a job inside DI Studio?
NOTE: For now we "workaround" the issue by manually editing the generated SAS code with a text editor and remove both macros from the code.
11-04-2011 01:44 AM
What if you just overlay the macros?
Not sure if this works. It depends if job pre-code is added before or after %stpbegin is called and if the macro catalog in work is used before the one where %stpbegin lives.
In case both conditions are met then you could simple define 2 empty shell macros as job pre-code:
Bit dirty and there might be a better solution - but may be this works.
11-21-2011 05:42 PM
Thanks for your input and sorry for not reacting sooner.
A similar suggestion was made in my first post in the Stored Process section.
Your suggestion will not work since %stpbegin is put way at the beginning of the code as you can see in my reply here
11-22-2011 02:30 PM
If you deploy to a workspace server instead of a stored process server those macros will be commented out. When using the stored process wizard, just select a workspace server instead.
Another option if you just want the job code without anything around it, is to select deploy for scheduling, which will generate the job code and put the code into a directory of your choice.
Finally, if you want to just generate the code, in DI Studio 4.3 that shipped with 9.3, there is a command line feature that lets you deploy a job from a command line. It will also just generate the job code and place it in a directory for you.
Hope this helps.
11-23-2011 04:47 PM
What I should have known but what did not spring to mind when posting my first reply is the fact that we need streaming output.
As such changing over to a workspace server is (unfortunately) not an option.
The current workaround we have/use is to edit the code generated with the stored process and simply manually comment out the two macros.
However an option that would prevent us from manually editing the code would of course be preferred