cancel
Showing results for 
Search instead for 
Did you mean: 

NWRFCSDK - Issue while registering program

Amarnath
Participant
0 Kudos

Hello Experts,

We have followed note "1097997 - Installing SAP NW RFC SDK on System i" and installed it. Now while registering a server program we are facing a issue,

From module . . . . . . . . :   QLEDEH  

                                     From procedure  . . . . . . :   Q LE leDe

                                     Statement . . . . . . . . . :   179     

                                     Message . . . . :   Application error.  MCH3601 unmonitored by LIBSAPNRFC at

                                       statement 0000000011, instruction X'000

                                     Cause . . . . . :   The application ended abnormally because an exception

                                       occurred and was not handled.  The name of the program to which the

                                       unhandled exception is sent is LIBSAPNRFC NRFC RfcCreateFunctionDesc. The

                                       program was stopped at the high-level language statement number(s)

                                       0000000011 at the time the message was sent.

We are not sure why we are facing this issue and what action we need to do?

To be Precise,

Steps followed

CRTSAVF FILE(NWRFCU) TEXT('NWRFC-ISSUE')

Transferred 2 .SAV files EBCDIC ILE and UNICODE ILE into NWRFC.savf by using the command from FTP(windows box)

put {save_file_name}.sav {library}/{save_file_name}.savf

CRTLIB LIB(R3710NWRFC)

RSTOBJ OBJ(*ALL) SAVLIB(QTEMP) DEV(*SAVF) SAVF(NWRFCU)

    MBROPT(*ALL) ALWOBJDIF(*ALL) RSTLIB(R3710NWRFC)

MKDIR '/R3710NWRFC'

ADDLNK OBJ('/qsys.lib/R3710NWRFC.lib/LIBICUDECN.srvpgm')

    NEWLNK('/R3710NWRFC/libicudecnumber.dll')

ADDLNK OBJ('/qsys.lib/R3710NWRFC.lib/LIBSAPNRFC.srvpgm')

    NEWLNK('/R3710NWRFC/libsapnwrfc.dll')

Later uncar nwsdk.sar file downloaded.

Also

ADDENVVAR 'QADRT_ENV_LOCALE' '1'

ADDENVVAR 'LANG' '/QSYS.LIB/DE_CH.LOCALE'

Is there anything wrong in above procedure?

To register a program we are using a command

SBMJOB CMD(CALL PGM(rfcexec) PARM('-a' 'bisprdeag.trfc' '-g' 'hostname' '-x' 'sapgwXX')) ALWMLTTHD(*YES)

Please help me to sort out this.

Best Regards,

Amarnath

Accepted Solutions (1)

Accepted Solutions (1)

volker_gldenpfennig
Active Participant
0 Kudos

Hi Amarnath,

I don't think, that you really need the environment variables ...

Do you try to install EBCDIC or Unicode?

What is the purpose of doing this ? Is it "only" to run RFCEXEC ? If yes, there might be a few other options as well.

In case, you really want to use unicode, CPYENVVAR parameter is missing:

SBMJOB CMD(CALL PGM(rfcexec) PARM('-a' 'bisprdeag.trfc' '-g' 'hostname' '-x' 'sapgwXX')) ALWMLTTHD(*YES)

Here, the current environment variables are not be transferred to the new child process.

You should add:

CPYENVVAR(*YES)

Regards,

Volker Gueldenpfennig, consolut international ag

Amarnath
Participant
0 Kudos

Hello Volker,

I tried to install EBCDIC and UNICODE. I have saved both the .SVF files (NWRFC_E_3920004570.SVF, NWRFC_U_3920004570.SVF ) to a newly created >SAVF file in OS/400 and excuted above stated commands.

Later uncar NWRFCSDK.

Now as per your suggestion I have passed CPYENVVAR(*YES) along with tha SBMJOB.

CD '/R3710NWRFC'

CHGCURLIB R3710NWRFC

SBMJOB CMD(CALL PGM(rfcexec) PARM('-a' 'bisprdeag.trfc' '-g' 'hostname' '-x' 'sapgwXX')) ALWMLTTHD(*YES) CPYENVVAR(*YES)

Still we are facing the same error.

---- Yes we are trying to use rfcexec only to register ""bisprdeag.trfc"" this particular program. Is there any other solution to do so?

Best Regards,

Amarnath.

volker_gldenpfennig
Active Participant
0 Kudos

Hi Amarnath,

the usage of rfcexec is different in my eyes ...

Your version:

CMD(CALL PGM(rfcexec) PARM('-a' 'bisprdeag.trfc' '-g' 'hostname' '-x' 'sapgwXX'))

The stuff, that I know:

CMD(CALL PGM(rfcexec) PARM('-abisprdeag.trfc' '-ghostname' '-xsapgwXX'))

Are you sure, that your syntax is correct as well ?

Regards,

Volker Gueldenpfennig, consolut international ag

Amarnath
Participant
0 Kudos

Hello Volker,

I am following the command mentioned in note: 353597

SBMJOB CMD(CALL PGM(<PROGRAM>) PARM('-a' '<PID>' '-g' '<HOST>' '-x' '<SERVICE>')) ALWMLTTHD(*YES)

And just to give a try I have tried executing the command you have mentioned but the output is same.

Every time it is throwing the same error irrespective of the command.

Message . . . . :   Application error.  MCH3601 unmonitored by LIBSAPNRFC at 

                                       statement 0000000011, instruction X'000

Best Regards,

Amarnath

Sriram2009
Active Contributor
0 Kudos

Hi Amarnath

1. Are you executing this command in SIDADM or different user id ?

2.  Refer the SAP Note step 2

1056696 - Compiling and Linking RFC Programs with the SAP NW RFC SDK

BR

SS

Amarnath
Participant
0 Kudos

Hello Sairam,

I am executing the command with SIDADM.

Now I have reinstalled nwrfcsdk both (NWRFC_E_3920004570.SVF, NWRFC_U_3920004570.SVF)

Anyhow the SBMJOB is not working but I have tried executing rfcexec from

call qp2term,

export LIBPATH=/usr/sap/mediarfc/nwrfcsdk/lib

cd /usr/sap/mediarfc/nwrfcsdk/bin

nohup rfcexec -a bisprdeag.trfc  -g hostname -x sapgwXX &

Now the program is registered and RFC is working fine. I know this is a temporary fix. Can you help me to fix this permanently?

Also I referred the note you have mentioned earlier but I am not sure if I need to execute the command directly for both EBCDIC and UNICODE.

Please help on this.

Best Regards,

Amarnath

volker_gldenpfennig
Active Participant
0 Kudos

Hi Amarnath,

doing it this way, is doing something totally different, as you were executing an ILE C Program and not you are calling an AIX executable ...

Anyway ...

You can start shell commands from OS/400 as follows:

Example:

CALL QP2SHELL PARM('/QOpenSys/usr/bin/csh' '-c' 'cd /tmp;pwd;ls')

(This starts the command c shell and then executes these 3 commands. For sure, you could use SBMJOB around it)

=>

The first idea would be:

CALL QP2SHELL PARM('/QOpenSys/usr/bin/csh' '-c' 'export LIBPATH=/usr/sap/mediarfc/nwrfcsdk/lib;cd /usr/sap/mediarfc/nwrfcsdk/bin;nohup rfcexec -a bisprdeag.trfc  -g hostname -x sapgwXX')

(you could even create a shell script and just start that one)

This version should "stay up or blocked" as the "&" is missing - but I would recommend that one, as you try to use SBMJOB later on.

Regards,

Volker Gueldenpfennig, consolut international ag

Amarnath
Participant
0 Kudos

Hello Volker,

Thanks a lot for the way you have suggested, but I am little confused do you want me to execute SUBJOB command from QP2SHELL?

Best Regards,

Amarnath

volker_gldenpfennig
Active Participant
0 Kudos

Hi Amarnath,

as I know, SBMJOB via QP2TERM does not work ...

No, obviously, YOU want to run it via SBMJOB via CL ...

Therefore, my idea would be:

SBMJOB CMD(CALL QP2SHELL PARM('/QOpenSys/usr/bin/csh' '-c' 'export LIBPATH=/usr/sap/mediarfc/nwrfcsdk/lib;cd /usr/sap/mediarfc/nwrfcsdk/bin;nohup rfcexec -a bisprdeag.trfc  -g hostname -x sapgwXX')) JOB(RFCCLIENT) JOBQ(QS36EVOKE)

 

Regards,

Volker Gueldenpfennig, consolut international ag

Amarnath
Participant
0 Kudos

Hello Volker / Sairam,

Thank you for the support. The issue we have discussed is resolved.

We had another issue when we tried registering rfcexec and the other program it has registered with loop back address 127.0.0.1.

We did this as per our client requirement but by call we came to know the exact requirement. This particular program ID has to registered by gateway from external source not locally.


Recently someone has changed sec_info and reg_info parameters in our environment and that was blocking "rfcexec" program to register from external Non-SAP system.


We have modified files to allow every thing and deleted/killed the process that was registered locally which has 127.0.0.1.


Later when the other system tried communicating with our SAP system it was automatically allowed displaying the host name and IP of non SAP system in SMGW/Logged on clients.


Hope this might be useful to someone else.


Best Regards,

Amarnath

Answers (1)

Answers (1)

joachim_kern
Explorer
0 Kudos

Hi Amarnath,

Your original code is OK. We found a bug in the NW RFC SDK resulting in your error (Fix available with SAP Note 2299080).

In your current solution you are not using the ILE NW RFC SDKs at all. Neither the EBCDIC nor the UNICODE version, but the PASE UNICODE version.

If that is OK for you, your're fine. Because this version does not contain the bug we just fixed.

But if you want to use the ILE version in the future with

SBMJOB CMD(CALL PGM(rfcexec) PARM('-a' 'bisprdeag.trfc' '-g' 'hostname' '-x' 'sapgwXX')) ALWMLTTHD(*YES) CPYENVVAR(*YES)

you have to wait for the fix described in SAP Note 2299080.

Best regards,

Joachim