RECEIVE-BUFER, SEND-LENGTH or RECEIVE-LENGTH

Hi guys!

May you help-me solve one trouble with Entirex?

I’ve changed a program in my DCOM object, including this parameter “1 #USUARIO (A08/300)”:

  program 'RB00045D' is
	define data parameter
	  1 #SETOR (N03) /* ENTRADA
	  1 #PROGRAMA (A08)
	  1 #TIPO (N01) /* ENTRADA  1 - CRV 2 - CRLV
	  1 #DIRETORIA (A01) /* SAIDA
	  1 #SETOR-ATENDIMENTO (N03)
	  1 #I (N03)
	  1 #FORMULARIO (N12/300)
	  1 #PLACA (A07/300)
	  1 #DATA-INUTILIZACAO (A08/300)
	  1 #DATA-BLOQUEIO (A08/300)
	  1 #SERIE-INICIAL (N12/300)
	  1 #SERIE-FINAL (N12/300)
	  1 #SETOR-PENDENCIA (N03/300)
	  1 #PROTOCOLO (N09/300)
	  1 #DATA-CONCLUSAO (A08/300)
	  1 #QTDE-DIAS (N03/300)
	  1 #EMPLACADORA (N05/300)
	  1 #RELATORIO (A01/300)
	  1 #DATA-DIGITACAO (A08/300)
	  1 #USUARIO (A08/300)
	  1 #COD-ERRO (N02)
	  1 #MSG-ERRO (A150)
	end-define

With this change, when i call the routine, this error message was retrieved: “1001 0021 Invalid header. Lib=DETRAN, Pgm=RB00045D”

At the ETB trace file, this lines show the problem:

W00/REQUEST  2014-11-13 10:56:56.081 ETBD0282 SPFX Values:
                                              Prefix    = 800009247B84000024000000000000003D85000046850000030000000000000000000000
                                              Unique-ID = 20206167696E32342D2D30303030313732342D2D3030303031333630
                                              Key string: API=9,BID=172.20.1.110,CID=NONE,F=SEND,LS=CP1252,SC=RPC,SN=SRDSW,SV=CALLNAT,UID=DET01011,W=5
                                              0,SL=33879,RL=34391,ETXL=255,ANAME=dllhost.exe,ANODE=agin24,ATYPE=WIN32,RPCLIB=DETRAN,RPCPGM=RB00045D.
                                              Bin string: 0400050039D0DAEF85
                                              SeqID     = 5876
W00/RESPONSE 2014-11-13 10:56:56.081 ETBD0282 SPFX Values:
                                              Prefix    = 8000031818780000180000005CC1D5E200000000A3780000
                                              Unique-ID = 6164616261732D642D2D30303030373633422D2D4638344545323530
                                              Reply Strg: CID=100000000000017K,CST=NONE,CUID=DET01011                        ,EC=00200094,RETL=0003387
                                              9,TXT=API: Msg truncated to fit receive-buffer.
                                              SeqID     = 5872
W00/ACIREQST 2014-11-13 10:56:56.082 ETBD0286 Diagnostic Values:
                                              IP Address.... 172.20.1.110
W00/REQUEST  2014-11-13 10:56:56.082 ETBD0282 SPFX Values:
                                              Prefix    = 800003181800000000000000000000008800000088000000
                                              Unique-ID = 6164616261732D642D2D30303030373633422D2D4638344545323530
                                              Key string: BID=ETB002,CID=100000000000017K,F=RECEIVE,OP=LAST,SC=RPC,SN=SRDSW,SV=CALLNAT,UID=CE0CDEE52AD
                                              9B000,W=NO,RL=33879.
                                              SeqID     = 5877
W00/RESPONSE 2014-11-13 10:56:56.082 ETBD0282 SPFX Values:
                                              Prefix    = 8000031818000000000000005CC1D5E20000000051000000
                                              Unique-ID = 6164616261732D642D2D30303030373633422D2D4638344545323530
                                              Reply Strg: EC=00200218,TXT=API: SEND or RECEIVE-LENGTH exceeds max .
                                              SeqID     = 5877

What parameters i need to config to solve this problem? The problem is at the broker? rpcserver? natural rpc server?

Thanks a lot and best regards.
etbfile.txt (11.6 KB)

Please always include the versions of the products involved as the answers may change depending on the version. I’ll assume you are on a recent, supported version…

There are two errors here:
00200094 - Msg truncated to fit receive-buffer
02180218 - SEND or RECEIVE-LENGTH exceeds max

For the first, the program receiving the message has a receive buffer shorter than the data being sent. If you are calling a Natural RPC Server, the receive buffer is set by the MAXBUFF RPC subparameter.

For the second, the length (RL=33879) exceeds the MAX-MESSAGE-length set in the Broker Attribute file for this service (it is probably a default value that is the old 32k limit). Either shorten up your message or increase the MAX-MESSAGE attribute for this service (or globally). If you are using the “NET” transport (Adabas SVC), you may need to set the EXTENDED?ACB?SUPPORT=YES attribute to support > 32k.

The error 1001 0021 indicates a corrupted RPC call.
Before looking into this you have to get rid of your buffer/message size issues.

Are you running supported versions of EntireX/Natural with the latest fixes applied?