Path and file names of the configuration profile are specified in the environment variable GWCONFIG so that program Mlunxsnd can access the profile.
You only have to set the environment variable GWCONFIG under the following conditions:
You have not stored the configuration profile under the name Mailgw.ini in the directory /usr/sap/C11/SYS/profile or in the directory in which the program Mlunxsnd is located.
Call up the system control, select the file System and the tab page Environment and under System variables enter the names of the variable and the corresponding value.
Write a shell script in which you set the environment variable GWCONFIG and start program Mlunxsnd, and assign the shell script execute rights. The variable must be set in the Mlunxsnd environment.
Example of the script if Mlunxsnd is activated via start:
Example of the script if Mlunxsnd registration is activated:
Note that the option $* must be set behind the path and file specification of Mlunxsnd so that the program parameter can be transferred.
Write a CL program (CL stands for control language) in which you set the environment variable GWCONFIG and start program Mlunxsnd.
Example if Mlunxsnd is activated via registration:
ADDENVVAR ENVVAR(GWCONFIG) VALUE('<Configuration file>')
SBMJOB CMD(CALL MLUNXSND PARM('-a' <RFC_Program_ID>' '-g' '<Host>' '-x' '<sapgwnn>')) JOB(MLUNXSND) CPYENVVAR(*YES)
<Host> is the host from which the SAP Gateway runs, <RFC_Program_ID> is the program name that you have defined via transaction SM59, and <sapgwnn> is the gateway service of the SAP instance (nn stands for the instance number).