2

I'm debugging a Stored Process Web Application that writes a PDF to _webout.

I'd like to avoid the following ERROR when running in a workspace session:

ERROR: Function is only valid for filerefs using the CACHE access method.

I've tried filename _webout temp and filename _webout dummy, to no avail.

Any tips from the field?

Allan Bowe
  • 12,306
  • 19
  • 75
  • 124
  • Is it correct to assume you are putting the debug information as content in the produced pdf? – Richard Jan 05 '18 at 17:25
  • Not adding any specific debug info - just wanted to run the STP in a batch session in order to retain library mappings / intermediate datasets etc. The ERROR wasn't preventing this, but it was distracting! – Allan Bowe Jan 06 '18 at 09:18

2 Answers2

2

Have you tried

filename _webout cache;

That seems to work in my version, but I have no idea where the output goes.

DomPazz
  • 12,415
  • 17
  • 23
0

An alternative is to check the engine type of the _webout fileref and avoid using the header functions if the xengine is STREAM.

This macro serves: https://core.sasjs.io/mf__getxengine_8sas.html

Usage:

    %if %mf_getxengine(_WEBOUT)=STREAM %then %do;
      /* set header function */
    %end;
Allan Bowe
  • 12,306
  • 19
  • 75
  • 124