| Using the RFC Macros and Macro Variables |
| Type: | batch macro |
| See also: | %R3CONNE |
| Syntax | |
| Details | |
| Example 1 | |
| Example 2 | |
| Example 3 |
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) |
| Details |
The %R3CONNC macro allows you to connect to an SAP System. This macro can be used to log on to the SAP System during batch operation.
The parameters for %R3CONNC are as follows:
| 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
|
| R3 |
specifies whether SAS is connecting to an R/3 system. Valid values are
|
| 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
|
| REMSESS |
specifies the SAS/CONNECT remote session ID to be used when connecting to the R/3 system. |
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. ![[cautionend]](../../../../common/61991/HTML/default/images/cautend.gif)
| Example 1 |
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 |
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 the system number of 02 using an SAS RFC Server running on a separate host (HOSTNAME2) on port 6998.
| Example 3 |
The following example shows how to use the %R3CONNC macro and a SIDEINFO file to connect to an R/3 system 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.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.