Mass Activities Support Example for zOS

Universal Connector Mass Activity Support Example

This example uses the Create Account Statements application to demonstrate the process of setting up a mass activity for automation with Universal Connector for Use with SAP® ERP.
 

Step 1

Via SAP GUI, create a template parameter set for a mass run:

  1. In the SAP Front end GUI, enter transaction FPCC0002 to bring up a dialog for the Create Account Statements application.
  2. In the Run Identification section, enter values for Date ID and Identification. These values will be used to uniquely identify the parameter set that you create in this step.
    For example:
    • Date ID: 13.07.7010
    • Identification: SBX1
  3. Set up the rest of the application run parameters to meet your needs. These additional settings are not important to the concepts of this example.
  4. Select Program Run->Save (or <Ctrl+S>) to save the parameter set.

Step 2

Create a variant for ABAP program RFKK_MA_SCHEDULER that will use the parameter set created in Step 1. This can be accomplished by running the sample job (USPVRMS) illustrated in the following figure. (The procedure for executing this JCL (USPJRMS) is illustrated in Step 3.)

USPVRMS - JCL
//USPVRMS  JOB CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID                     
//*****************************************************************
//* Description
//* -----------
//* This sample creates a new variant named "SBX1" for ABAB program 
//* RFKK_MA_SCHEDULER.
//*
//* The new variant will be set up to target Mass Activity Type 
//* 0002 (Create Account Statements) using a parameter set with run 
//* identification:
//* Date ID:        2010.07.15
//* Identification: SBX1
//* 
//         JCLLIB ORDER=\#SHLQ.UNV.SUNVSAMP                           
//*                                                                  
//STEP1    EXEC USPPRC                                               
//VARDEF   DD  *
 /* Variant Header statement. */
 VARIANT\_NAME   = "SBX1"
    REPORT      = "RFKK\_MA\_SCHEDULER"; 

 /* Variant text statement. */
 VARIANT_TEXT   = "SBX1"
    LANGUAGE    = "EN";

 /* Mass activity type */
 SELNAME        = "P_AKTYP"
    KIND        = "P"
    LOW         = "0002";

 /* Date ID */
 SELNAME        = "P_COPYD"
    KIND        = "P"
    LOW         = "20100715";

 /* Identification */
 SELNAME        = "P_COPYI"
    KIND        = "P"
    LOW         = "SBX1";

 /* Date of Dunning Proposal Run */
 SELNAME        = "P_MAHND"
    KIND        = "P"
    LOW         = "00000000";

 /* ID of Dunning Proposal Run */
 SELNAME        = "P\_MAHNI"
    KIND        = "P"
    LOW         = "";

 /* Status for Error Messages */
 SELNAME        = "P\_STATUS"
    KIND        = "P"
    LOW         = "W";

 /* WF\_OKEY */
 SELNAME        = "WF_OKEY"
    KIND        = "P"
    LOW         = "";

 /* WF\_WITEM */
;
 SELNAME        = "WF_WITEM"
    KIND        = "P"
    LOW         = "";

 /* WF\_WLIST */
 SELNAME        = "WF_WLIST"
    KIND        = "P"
    LOW         = "";
//SYSIN    DD  *
   -dest   CF5 
   -client 800 
   -userid sapuid 
   -pwd    sappwd      
   -sub    VARDEF 
/*

 
See SYSIN Options for USPVRMS JCL, below, for a description of the configuration options used in this JCL.

Step 3

Via Universal Connector, run ABAP program RFKK_MA_SCHEDULER; submit a Universal Connector job to initiate, monitor, and return output from the mass activity. The sample job illustrated in the following figure will accomplish this using the variant created in Step 2. USPPRC - JCL Procedure, shown below this JCL, is the procedure used to execute the JCL.

USPJRMS - JCL
//USPVRMS  JOB CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID                     
//*****************************************************************
//* Description
//* -----------
//* This sample will:
//* 1. Initiate a mass activity (via ABAP RFKK_MA_SCHEDULER).
//* 2. Monitor the mass activity (including interval jobs) to 
//*    completion.
//* 3. Return output from the initiator job and all interval jobs.
//*
//* The parameter set used for the mass activity is specified in 
//* the variant passed to RFKK_MA_SCHEDULER.  In this case, we are 
//* using variant SBX1.
//* 
//         JCLLIB ORDER=#SHLQ.UNV.SUNVSAMP                           
//*                                                                  
//STEP1    EXEC USPPRC                                               
//JOBDEF   DD  * 
 /* Job Header statement. */
 JOBNAME = "RFKK_MA_SCHEDULER_SBX1";

 /* ABAP Step statement. */
 ABAP_STEP            = "STEP 1"
    ABAP_PROGRAM_NAME = "RFKK_MA_SCHEDULER"
    VARIANT_NAME      = "SBX1";
//SYSIN    DD  * 
   -dest   CF5 
   -client 800 
   -userid sapuid 
   -pwd    sappwd      
   -sub    VARDEF 
   -start
   -mawait
/*  


 
See SYSIN Options for USPJRMS JCL, below, for a description of the configuration options used in this JCL.
 

USPPRC - JCL Procedure
//USPPRC   PROC UPARM=,              -- USAP options    
//             SAPRFC=USPRFC00,      -- SAP RFC member  
//             USAPPRE=#SHLQ.UNV,                        
//             USAPPRD=#PHLQ.UNV                         
//*                                                      
//PS1      EXEC PGM=USAP,PARM='ENVAR(TZ=EST5EDT)/&UPARM' 
//STEPLIB  DD  DISP=SHR,DSN=&USAPPRE..SUNVLOAD           
//*                                                      
//UNVNLS   DD  DISP=SHR,DSN=&USAPPRE..SUNVNLS            
//UNVRFC   DD  DISP=SHR,DSN=&USAPPRD..UNVCONF(&SAPRFC)   
//UNVTRACE DD  SYSOUT=*                                  
//*                                                      
//SYSPRINT DD  SYSOUT=*                                  
//SYSOUT   DD  SYSOUT=*                                  
//CEEDUMP  DD  SYSOUT=*

SYSIN Options for USPVRMS JCL

The SYSIN options used in the USPVRMS JCL example are:

Option

Description

-dest

Name of a destination defined in the saprfc.ini file.

-client

SAP client number.

-userid

SAP user ID with which to logon to the SAP system.

-pwd

Password for the SAP user ID.

-sub

Definition of the job to the SAP system.

SYSIN Options for USPJRMS JCL

The SYSIN options used in the USPJRMS JCL example are:

Option

Description

-dest

Name of a destination defined in the saprfc.ini file.

-client

SAP client number.

-userid

SAP user ID with which to logon to the SAP system.

-pwd

Password for the SAP user ID.

-sub

Definition of the job to the SAP system.

-start

Starts the newly defined job.

-mawait

Causes USAP to wait for the SAP mass activity jobs to complete processing.

Components

Universal Connector for z/OS