%R3CONNC

Connects to an SAP system.

Type: batch macro
Data source: R/3
See: %R3CONNB macro, %R3CONNE macro

Syntax

%R3CONNC
(<CCONN=value,> <HOST=value,> <PORT=value,> <USR=value,>
<PWD=value,> <CLI=value,> <LNG=value,> <HST=value,>
<DST=value,> <SNA=value,> <R3=value,> <SYS=value,>
<GWS=value,> <GWH=value,> <FUNC=value,> <CPICUSR=value,>
<CPICPWD=value,> <CPICCLI=value,> <CPICLNG=value,> <CPICDST=value,>
<CPICFRM=value,> <DEBUG=value,> <REMSESS=value>)

Optional Arguments

CCONN

specifies the connection identifier to be used when connecting to the SAP system.

HOST

specifies the name of the TCP/IP host to be used when connecting to the SAS RFC Server. This parameter is used in z/OS operating environments only.

PORT

specifies the TCP/IP port to be used when connecting to the SAS RFC Server. This parameter is used in z/OS operating environments only.

USR

specifies the user ID to be used when connecting to the SAP system.

PWD

specifies the encoded password to be used when connecting to the SAP system.

CLI

specifies the three-digit client ID to be used with the SAP system.

LNG

specifies the logon language to be used with the SAP system.

HST

specifies the SAP server host name to be used when connecting to the SAP system.

DST

specifies the destination name to be used when using the SIDEINFO file to specify connection parameters.

SNA

specifies whether SAS connects to an R/2 system. Valid values are

  • Y—SAS connects to an R/2 system.
  • blank—SAS is not connecting to an R/2 system.

R3

specifies whether SAS is connecting to an R/3 system. Valid values are

  • Y—SAS is connecting to an R/3 system.
  • blank—SAS is not connecting to an R/3 system.

SYS

specifies the SA P System number. This parameter can be specified here or in the SIDEINFO file.

GWS

specifies the TCP service of the SAP gateway. This parameter can be specified here or in the SIDEINFO file.

GWH

specifies the name of the host on which the SAP gateway is running. This parameter can be specified here or in the SIDEINFO file.

FUNC

specifies the function module to be used.

CPICUSR

specifies the user identifier for CPIC.

CPICPWD

specifies the encoded password for CPIC.

CPICCLI

specifies the client for CPIC.

CPICLNG

specifies the logon language for CPIC.

CPICDST

specifies the destination for CPIC communication (as defined in the TXCOM table in the SAP system).

CPICFRM

specifies the form for CPIC.

DEBUG

specifies whether you want to use the trace option. Valid values are

  • Y—Use the trace option.
  • blank—Do not use the trace option.

REMSESS

specifies the SAS/CONNECT remote session ID to be used when connecting to the R/3 system.

Details

The %R3CONNC macro lets you connect to an SAP system. This macro can be used to log on to the SAP system during batch operation.
Note: The SIDEINFO file provides the connection parameters required for SAS to communicate with the SAP system. The SIDEINFO file is not needed if you specify all connection parameters in the %RCONNC macro.

Examples

Example 1: Connect to a Specific R/3 System

The following example shows how to use the %R3CONNC macro to connect to an R/3 system when you specify a specific application server:
%r3connc(CCONN=IDES, USR=USER1, PWD=D27A927AD9E768,
          CLI=800, LNG=EN, HST=HostName1, SYS=02,
          CPICUSR=CPICUSER, CPICPWD=6FD3E4BAC4);
In this example, USER1 is connecting to an R/3 system on an application server named HostName1 with a system number of 02.

Example 2: Connect to an R/3 System Using an SAS RFC Server

The following example shows how to use the %R3CONNC macro to connect to an R/3 system and an SAS RFC Server that runs on a specified application server:
%r3connc(CCONN=IDES, USR=USER1, PWD=D27A927AD9E768, CLI=800, LNG=EN,
          HOST=HostName2, PORT=6998,
          HST=HostName1, SYS=02, 
          CPICUSR=CPICUSER, CPICPWD=6FD3E4BAC4);
In this example, SAS connects to an R/3 application server (HostName1) with system number 02 and a SAS RFC Server running on a separate host (HOSTNAME2) on port 6998.

Example 3: Connect to an R/3 System Identified by a Logical Destination

This example shows how to use the %R3CONNC macro and a SIDEINFO file to connect to an R/3 system that is identified by a logical destination:
%r3connc(CCONN=IDES, USR=USER1, PWD=D27A927AD9E768,
          CLI=800, LNG=EN, DST=SYSTEM1,
         CPICUSR=CPICUSER, CPICPWD=6FD3E4BAC4);
In this example, USER1 is connecting to an R/3 system. The R/3 system is identified by a logical destination (SYSTEM1), and the connection information is defined in the SIDEINFO file.