# RECEIVE-BUFER, SEND-LENGTH or RECEIVE-LENGTH

**URL:** <https://techcommunity.softwareag.com/t/receive-bufer-send-length-or-receive-length/179324>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [November 13, 2014, 3:40pm UTC](https://techcommunity.softwareag.com/t/receive-bufer-send-length-or-receive-length/179324 "2014-11-13T15:40:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guilherme\_Andre1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guilherme_andre1/32/16187_2.png) [@Guilherme\_Andre1](https://techcommunity.softwareag.com/u/Guilherme_Andre1)\
**Post date:** [November 13, 2014, 3:40pm UTC](https://techcommunity.softwareag.com/t/receive-bufer-send-length-or-receive-length/179324/1 "2014-11-13T15:40:42Z")

</div>

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)”:

```auto
  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:

```auto
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](https://techcommunity.softwareag.com/uploads/short-url/oYYY3xyATbwbFyBNU0ozj1mVW5g.txt) (11.6 KB)

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [November 14, 2014, 3:48am UTC](https://techcommunity.softwareag.com/t/receive-bufer-send-length-or-receive-length/179324/2 "2014-11-14T03:48:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [November 14, 2014, 10:40am UTC](https://techcommunity.softwareag.com/t/receive-bufer-send-length-or-receive-length/179324/3 "2014-11-14T10:40:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:32pm UTC](https://techcommunity.softwareag.com/t/receive-bufer-send-length-or-receive-length/179324/4 "2021-04-02T15:32:23Z")

</div>


