Entering content frame

Object documentation Prerequisites for Running External Programs Locate the document in its SAP Library structure

The prerequisites for starting external commands and external programs from background jobs depend on:

If there is an SAP server on the target host for an external program, then the SAP gateway on that server is called and starts SAPXPG, the external program controller. If there is no server on the target host, then the gateway at the SAP server running the background job uses a remote shell facility to start SAPXPG on the target host.

UNIX and Other Systems with a Remote Shell

Systems with a remote shell can run an external command or program without an active SAP application server. With no application server present, the gateway uses the remote shell and RFC to start the SAPXPG program. SAPXPG, in turn, runs the external command or program.

The prerequisites for running an external command or program depend on whether the target host has an SAP application server or not.

If an application server from the same SAP System is running on the target host, then the following requirements must be met:

If no application server is present, then the following apply:

For more information, read the documentation, such as the UNIX man pages, about the remote shell ( remsh ).

You can test this by entering the command ‘remsh <Name of remote host> date’ on the host on which the job is running. On a UNIX platform, the output should then be the system date on the remote host.

There is one special case: Assume that you have set up the environment on a UNIX system correctly for starting external programs by way of an SAP application server. However, the SAP system is started using an operating system specific mechanism.

You must, therefore, ensure that the user’s path names are set up correctly for the current system environment. For example, if the Bourne shell is being used, the paths are entered into the .profile file. The use of the C-Shell (csh) is assumed.

Example 

For example, the UNIX command ‘cron’ allows you to execute a command at a defined time, including the commands to start or stop an SAP system. This uses the Bourne shell (program ‘sh’) for executing a command. The user-specific settings which define the environment in which the command is to be executed—that is, the path names mentioned above—are then stored in the .profile file in the user’s home directory.

Microsoft Windows NT

To start an external command or program on a Windows NT system, the following requirements must be met:

In systems without remsh , like Windows NT, the SAP gateway must use an SAP application server to start the SAPXPG program. (SAPXPG, in turn, runs the external command or program.)

OS/400

To start an external command or program on an IBM OS/400 system, the following requirements must be met:

Leaving content frame