mm_createwebservice.sas File Reference

Create a Web Ready Stored Process. More...

Go to the source code of this file.

Detailed Description

This macro creates a Type 2 Stored Process with the mm_webout macro (and dependencies) included as pre-code.

Usage:

%* compile macros ;
filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc;

%* parmcards lets us write to a text file from open code ;
filename ft15f001 temp;
parmcards4;
    %webout(FETCH)
    %* do some sas, any inputs are now already WORK tables;
    data example1 example2;
      set sashelp.class;
    run;
    %* send data back;
    %webout(OPEN)
    %webout(ARR,example1) * Array format, fast, suitable for large tables ;
    %webout(OBJ,example2) * Object format, easier to work with ;
    %webout(CLOSE)
;;;;
%mm_createwebservice(path=/Public/app/common,name=appInit,code=ft15f001)

For more examples of using these web services with the SASjs Adapter, see: https://github.com/sasjs/adapter#readme

Parameters
[in]path=() The full path (in SAS Metadata) where the service will be created
[in]name=Stored Process name. Avoid spaces - testing has shown that the check to avoid creating multiple STPs in the same folder with the same name does not work when the name contains spaces.
[in]desc=The description of the service (optional)
[in]precode=() Space separated list of filerefs, pointing to the code that needs to be attached to the beginning of the service (optional)
[in]code=(ft15f001) Space seperated fileref(s) of the actual code to be added
[in]server=(SASApp) The server which will run the STP. Server name or uri is fine.
[in]mDebug=(0) set to 1 to show debug messages in the log
[in]replace=(YES) select NO to avoid replacing an existing service in that location
[in]adapter=(sasjs) the macro uses the sasjs adapter by default. To use another adapter, add a (different) fileref here.

SAS Macros

Version
9.2
Author
Allan Bowe

Definition in file mm_createwebservice.sas.