Create a simple stored process with the Process node in SAS® Customer Intelligence Studio


Introduction to Creating a Simple Stored Process Using the Process Node with the "Process" Type

You can select two stored process types in the Process Properties node:

Using a SAS stored process with the process node is highly recommended. Opting for a stored process over manually written code in SAS Marketing Automation offers several compelling advantages.

Firstly, stored processes are centrally managed, ensuring that they can be reused across multiple campaigns, thereby reducing redundancy and maintaining consistency. This centralized approach enables campaign designers to customize the behavior of stored processes using defined prompts, which facilitates flexible and dynamic campaign execution.

Moreover, stored processes are typically developed and tested in a robust programming interface like SAS® Enterprise Guide®, which aids in thorough validation before deployment. This process ensures that any revisions and testing of a stored process apply universally to all campaigns using it, unlike manually written code, which requires individual revisions and testing for each campaign. These benefits collectively make stored processes a best practice for achieving efficient and scalable campaign management in SAS Marketing Automation.

This SAS KB article will help you get started with a simple demonstration using the Process node to select and run a stored process in SAS Customer Intelligence Studio.

This article contains the following sections:

Table of Contents

Note: Click the images in this article to view them in full screen. 

Create a Simple Stored Process to Use with SAS Customer Intelligence Studio

Before using any custom code in SAS Customer Intelligence Studio, test the node in SAS Enterprise Guide. 

Here is an example:

proc setinit; run;

Test_code_in Eguide.jpg

Create a New Stored Process in SAS Management Console

  1. Open SAS Management Console.
  2. Navigate to the Folders tab and locate your Stored Processes folder.

    Here is an example: SAS FoldersCIFinancial Services ► right-click Stored Processes ► select New Stored Process.
    Create_stp_in_SMC.jpg

    1. On the General tab, name the stored process: proc_setinit.
    2. Under Keywords, MAUser is required and is case sensitive.
      STP_Execution_tab.jpg
    3. On the Execution tab, provide the name of the application server. (For example, SASApp.)
    4. Provide the source code Repository and Source File.
    5. You can edit the Source Code by selecting Edit Source Code on the Execution tab. You can add the macros that SAS Customer Intelligence Studio needs in the Source Code. In the following example, see the bolded macros in the proc_setinit.sas code.

      /* Simple Test to create a stored Process for use in SAS Customer Intelligence Studio */

      %stpbegin;

         %maspinit(xmlstream=neighbor macrovar)

      proc setinit;

      run;

       %mastatus (&_stpwork.status.txt);

      %Stpend;

    6. The Results capabilities require you to check Package.

  3. You do not need to define any parameters on the Parameters tab.
    STP_Parameters_Tab.jpg

  4. On the Data tab, under Label, add MacroVar.
    • The Type is XML Data Source.
    • The Fileref/Table Parameter is MacroVar.
  5. Also, on the Data tab, under Label, add Neighbor.
    • The Type is XML Data Source.
    • The Fileref/Table Parameter is Neighbor.
      STP_Data_tab.jpg

  6. On the Authorization Tab, select Customer Intelligence Advanced Campaign Designer and click OK.
    STP_Authorization_Tab.jpg

Create a New Campaign in SAS Customer Intelligence Studio

  1. On the Designer tab, select Selection Campaigns, and create a new campaign. (For example, proc setinit testing on process node.) Add a Select node and a Process node.
    CIStudio_Create_Campaign.jpg

  2. Right-click the Process node.
    1. For the Type, select Process.
    2. For the Name field, navigate to the name of the stored process “Proc_setinit” and click OK.
      CIStudio_Process.jpg
  3. From the menu, select Validate ► click Save ► and execute the campaign.

View the Log From the Process Node in SAS Customer Intelligence Studio

  1. Open the campaign.
  2. Highlight the Process Node ► right-click the Process Node ► and select Properties.
    Process_Node_Properties.jpg

  3. Click the Log tab.
    Process_Node_Log.jpg

Review the SASCustIntelCore6.6.log

The stored process details are also included in the SASCustIntelCore6.6.log, which is located on the middle-tier machine. For example, D:\SASConfig\Lev1\Web\Logs\SASServer6_1\SASCustIntelCore6.6.log. 

Search for the following:

Additional Resources

For more detailed information, see the following recommended resources: