R3_GET_SYSTEMLOG

Reads the system log of an SAP system during a specified time period.

Transaction: SM21
Interface: Standard

Syntax

R3_GET_SYSTEMLOG

Syntax

Description/Format

FILE= 

Name of a file to which the read SAP system log should be stored.
Format: Name or script literal

SERVER= 

Name of an SAP application server.
Format: Name or script literal

The name of an SAP application server must be specified in the form Host_SID_SYSNR:
Host
= Computer name
SID
= System ID from SAP
SYSNR
= Number of the SAP Instance 

FROM_DATE= 

Start date of the selection from the system log.
Format: YYYYMMDD

Default value: "20010101" 

FROM_TIME= 

Start time of the selection from the system log.
Format: HHMMSS

Default value: "000000" 

TO_DATE= 

End date of the selection from the system log.
Format: YYYYMMDD

Default value: current date 

TO_TIME= 

End time of the selection from the system log.
Format: HHMMSS

Default value: "235959" 

ENCODING=

This script element is used to read the system log of an SAP system as text and saving it to a file. If the name of an application server is specified, the script element supplies this server's system log. Without the name of an application server being entered, the central SAP system log is read.

You can also prepare and edit the system log using the script elements for the data sequences. R3_GET_SYSTEMLOG is used in the event job "EVENT.R3SYSLOG" in client 0000.

Tips:

Note: Note that by default, created files are saved on the computer on which the agent has been installed  (for example, R3_GET_JOB_SPOOL; FILE=).

Example

The following example reads the central SAP system log of the previous week. The start date for the system log selection is calculated using the script function SUB_DAYS. The current date is the basis of this calculation.

:RSET &TODAY#          = SYS_DATE ('YYYYMMDD')
:
RSET&LAST_WEEK#      = SUB_DAYS ('YYYYMMDD:&TODAY#', 7)
R3_GET_SYSTEMLOG FILE = 'c:\t46_systemlog.txt', SERVER=, FROM_DATE='&LAST_WEEK#'

See also:

seealso

About SAP JCL