# nat6979-Premature termination of a remote CALLNAT.

**URL:** <https://techcommunity.softwareag.com/t/nat6979-premature-termination-of-a-remote-callnat/59048>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [October 17, 2004, 2:49pm UTC](https://techcommunity.softwareag.com/t/nat6979-premature-termination-of-a-remote-callnat/59048 "2004-10-17T14:49:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kazemi](https://avatars.discourse-cdn.com/v4/letter/k/258eb7/32.png) [@Kazemi](https://techcommunity.softwareag.com/u/Kazemi)\
**Post date:** [October 17, 2004, 2:49pm UTC](https://techcommunity.softwareag.com/t/nat6979-premature-termination-of-a-remote-callnat/59048/1 "2004-10-17T14:49:15Z")

</div>

Hi  
I have a NATURAL client like the following  
DEFINE DATA LOCAL   
1 #NAME (A2)   
END-DEFINE   
CALLNAT ‘INSERT’ #NAME   
END  
  
I use ENX and we generated our stub by C  
When I run the NATURAL Program , I get 6979   
  
This is my insert method in C  
void ERX\_CALL\_DECLARATION INSERT (  
 char id[2+1]  
)  
{  
 id[0] = ‘s’;  
  
 return;  
}  
  
and the server side gives error :  
11:07:34 WORKER(0ffc): 10050033 Could not resolve RPC call for SYSTEM/INSERT.  
  
11:07:34 WORKER(0ffc): 10050044 ERXDynDispatch() failed.  
11:07:34 WORKER(0ffc): 10010009 Invalid format buffer. Location of wrong Paramet  
er is 1.  
  
  
What is the possible reason ?  
  
and when I change #name to A1 I get no errors !!!  
  
  
Thanx

---

<div class="post-metadata">

**Author:** ![Bernhard\_Fricke](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@Bernhard\_Fricke](https://techcommunity.softwareag.com/u/Bernhard_Fricke)\
**Post date:** [November 5, 2004, 7:09pm UTC](https://techcommunity.softwareag.com/t/nat6979-premature-termination-of-a-remote-callnat/59048/2 "2004-11-05T19:09:26Z")

</div>

Hello,  
  
The C wrapper offers for A type fields 2 different styles   
- C style strings with null-termination  
- Mainframe style strings without null-termination  
You can control this at generation time of the stubs.  
  
The C prototype you posted is for an A2 field and uses C style in the C interface. You can see this in the [2+1] length of the function prototype.   
For a mainframe style you would got a length of [2] in the server frame.  
  
If you use C style or Mainframe style on the C side should not effect the partner - field length is still 2 bytes (because of A2).  
  
For an A1 field there is no difference in the mapping. It is mapped to a char type always in the C interface, not a string, neither C-style nor Mainframe style. But also this must not affect the partner - field length is still 1 byte (because of A1).  
  
Your observation look like a bug. Can you provide a RPC Server trace with trace level support (Specify TraceLevel=SUPPORT in the config file) for the situation where it is not working and open a Support Request?  
  
Regards Bernhard Fricke  
  
[This message was edited by Bernhard Fricke on 05 Nov 2004 at 13:50.]  
  
[This message was edited by Bernhard Fricke on 05 Nov 2004 at 13:51.]

---

<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, 2:39pm UTC](https://techcommunity.softwareag.com/t/nat6979-premature-termination-of-a-remote-callnat/59048/3 "2021-04-02T14:39:37Z")

</div>


