execsap - UDM Command

Syntax

execsap host={host-name|destination} type={event|generic} [eventid=event-id] [parm=event-parm] [client=client] [user=userid] [pwd=password] [codepage=codepage] [file=filename | xfile=filename [key=key]] [mergelog=yes|no] [trace=yes|no]

Description

The execsap command executes SAP events if you have a licensed version of the Universal Connector (version 3.1.1 or later) on the same system with the UDM Manager.

Note

UDM does not support the execsap command for IBM i and Windows.

The first parameter of the execsap command is either:

  • Host parameter with an SAP destination entry
  • Name of a destination in your SAP RFC file

The type parameter specifies the type of action being performed. A specified type of event requires that an SAP event ID be specified with the eventid parameter.

Note

For Agent 5.2.0 and later, the only valid type is event, which triggers an SAP event.

An event parameter can be passed to the SAP event using the parm parameter. The client parameter specifies the SAP client.

UDM must authenticate a user SAP in order to execute an SAP action. The user id and password can be specified with the user and pwd parameters, respectively.

The codepage value is inherited from the UDM Manager's configuration file unless overridden explicitly in the call to the execsap command. codepage specifies to which codepage the output of the remote command is translated.

The user, pwd, and codepage parameters can be stored in an external file instead of being specified explicitly in the execsap command syntax.

  • If a plain text file is used, the file parameter specifies the name of this file.
  • If the file was encrypted with Universal Encrypt, the xfile parameter specifies the name of this file.

If an encryption key other than Universal Encrypt's default was used, that key can be specified with the key parameter.

These options and the format of the file containing these options work exactly like the corresponding option in the open command.

Two streams of data come back from the SAP execution. By default, output from standard out and standard error is written to standard out and standard error by the UDM Manager (SYSPRINT and SYSOUT, respectively, under z/OS). The mergelog parameter can be set to yes if you want both output streams written to the UDM transaction log (standard out under UNIX, Windows, and IBM i; SYSPRINT under z/OS).

By default, if the UDM Manager is invoked with tracing turned on, tracing will be turned on in Universal Connector when UDM invokes it via the execsap command. Likewise, if trace is turned off in the UDM Manager, Universal Connector is invoked with tracing turned off. You can override this behavior for Universal Connector invocation by setting the trace option in the call to the execsap command.

Parameters

Parameter

Description

host=hostname | destination

SAP destination entry or, if host=hostname format is used, the name of a destination in your SAP RFC file.

type=event | generic

Type of action (event is the only type supported under UDM 5.2.0).

eventid=event-id

ID of the SAP event to trigger.

parm=event-parm

Passes an event parameter to the SAP event.

client=client

SAP client for which to perform the action.

user=user-id

User ID (user) and password (pwd) are inherited from the same parameters specified in the open command for that logical name. These values can be overridden by specifying them explicitly in the execsap command.

Note

If a host name is used (instead of a logical name), a user ID and password must be specified explicitly in the execsap command.

pwd=password

User ID (user) and password (pwd) are inherited from the same parameters specified in the open command for that logical name. These values can be overridden by specifying them explicitly in the execsap command.

Note

If a host name is used (instead of a logical name), a user ID and password must be specified explicitly in the execsap command.

codepage=codepage

Codepage to which the remote command output is translated. The codepage is inherited from the UDM Manager's configuration file unless overridden explicitly in the call to the execsap command.

file=filename

Plain text file containing the values for the remote execution server: user, pwd, and codepage

These values override any corresponding values specified for the transfer server in the open command.

xfile=filename

Universal Encrypted text file containing the values for the remote execution server: port, user, pwd, and codepage. These values override any corresponding values specified for the transfer server in the open command.

key=key

Key used to decrypt the file specified by the xfile parameter. If this parameter is not present, the default key for Universal Encrypt is used.

mergelog=yes | no

Specification for whether or not to merge the two streams of data that come back from the remote command to the UDM transaction log (SYSOUT under UNIX, Windows, and IBM i; SYSPRINT under z/OS).

By default, output from standard out and standard error of the remote command are written to standard out and standard error by the UDM Manager (SYSPRINT and SYSOUT, respectively, under z/OS).

Default is no.

trace=yes | no

Overrides the trace behavior of the Universal Command Manager when invoked via the execsap command.

Default is trace value of the UDM Manager.

execsap Command Example

The following is an example of executing an SAP event using the execsap command:

execsap sapdest type=event eventid=MYEVENT parm=MYPARM +
                user=me pwd=mypwd

Additional Information and Examples

For additional execsap command information and examples, see Universal Data Mover - Remote Execution for SAP Systems.