Your URL was the correct place in the documentation and it explained that STPSRV_HEADER is a DATA step function. So you'd need to use it in a DATA step:
*** use function to change header;
Whether you should use %stpbegin or whether you should use _WEBOUT depends on how you intend to invoke the stored process. Tech Support can be of more help with this issue. Remember that the output from this technique will not be supported in Web Report Studio and PowerPoint, because they do not use the HTTP headers with SASReport XML and the output may not be respected in other client applications, either. Generally, this technique is best used for stored processes being executed via the Portal or through the Stored Process Web App.