Raising an SAP Event for zOS Example

Raising an SAP Event for z/OS Example

The following example demonstrates raising events in a remote SAP system using the Universal Data Mover (UDM) execsap command.

In this example, we assume the following scenario:

The job scheduler on SAP system CF5 has been set up with three jobs that are triggered by SAP event UDM_TRANSFER_COMPLETE. Additionally, each job is looking for a different event parameter (cars.dat, trucks.dat, and boats.dat) corresponding with the Input file it is intended to process.

UDM is being run on a z/OS system to transfer three data files (cars.dat, trucks.dat, and boats.dat) from remote system sol9 to remote system SAP001. The data files are to be used by the SAP system for Batch Input Processing. Therefore, after each file transfer, the execsap command is issued to raise an appropriate event in the SAP system. These events are picked up by the SAP job scheduler which, in turn, kicks off the jobs that were scheduled for those events.

Raising an SAP Event for z/OS JCL

//UDMEXSAP  JOB CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
//****************************************************************\*
//* Description
//* -----------
//* This sample opens a three-party transfer session between hosts
//* sol9 and SAP001. Three files are transferred from sol9 to
//* SAP001. After each file is transferred, execsap is called to
//* raise an SAP event in the specified SAP system.
//*
//* Presumably, there are jobs in the SAP scheduling system that
//* are waiting to be triggered by the events fired from this job.
//*
//         JCLLIB ORDER=#SHLQ.UNV.SUNVSAMP
//*
//STEP1    EXEC UDMPRC
//UNVSCR   DD  *
#
# Transfer vehicle data to SAP server for batch input processing.
#
open src=sol9 dest=SAP001 xfile=xuser1

attrib dest createop=replace
cd src=/opt/app/data
cd dest=/input

#*****************************************************************\*
#* Copy the car data to SAP system for batch input processing.
#*****************************************************************\*
copy src=cars.dat dest=cars.dat

# Raise SAP event to trigger processing job.
execsap CF5 client=800 xfile=xsapuser1 type=event -
        eventid=UDM_TRANSFER_COMPLETE parm="cars.dat"

#*****************************************************************\*
#* Copy the truck data to SAP system for batch input processing.
#*****************************************************************\*
copy src=trucks.dat dest=trucks.dat

# Raise SAP event to trigger processing job.
execsap CF5 client=800 xfile=xsapuser1 type=event -
        eventid=UDM_TRANSFER_COMPLETE parm="trucks.dat"

#*****************************************************************\*
#* Copy the boat data to SAP system for batch input processing.
#*****************************************************************\*
copy src=boats.dat dest=boats.dat

# Raise SAP event to trigger processing job.
execsap CF5 client=800 xfile=xsapuser1 type=event -
        eventid=UDM_TRANSFER_COMPLETE parm="boats.dat"

close 
/*

Components

Universal Data Mover Manager for z/OS

Universal Data Mover Server for UNIX

Universal Connector for z/OS