# how to shut down Nat RPC server internally-Nat315,EntireX711

**URL:** <https://techcommunity.softwareag.com/t/how-to-shut-down-nat-rpc-server-internally-nat315-entirex711/59711>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [September 21, 2006, 9:41pm UTC](https://techcommunity.softwareag.com/t/how-to-shut-down-nat-rpc-server-internally-nat315-entirex711/59711 "2006-09-21T21:41:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruce\_Lightsey](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@Bruce\_Lightsey](https://techcommunity.softwareag.com/u/Bruce_Lightsey)\
**Post date:** [September 21, 2006, 9:41pm UTC](https://techcommunity.softwareag.com/t/how-to-shut-down-nat-rpc-server-internally-nat315-entirex711/59711/1 "2006-09-21T21:41:36Z")

</div>

need to allow a Nat RPC server task to shut itself down gracefully after it finishes it’s conversation. Deregister and shutdown with quiesce would be best.  
EntireX is 7.1.1 and Natural is 3.1.5 on z/OS.  
This is a short-term work-around until the cobol and assembler modules that are called from the Natural sub-program are cleaned up ( repeated loading of tables into memory causing an abend at end-of-memory - really old batch modules ).

---

<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:** [October 27, 2006, 5:00am UTC](https://techcommunity.softwareag.com/t/how-to-shut-down-nat-rpc-server-internally-nat315-entirex711/59711/2 "2006-10-27T05:00:35Z")

</div>

You can use the NATRPC03 exit - it is called after each RPC call (before it returns data). From there, use CMTASK to start a new Natural thread - the STACK for that thread will call USR2073N until it receives 00070007 (server not registered) response. See library SYSEXTP for examples of calling CMTASK under the ASYN\* examples.

Your Natural environment will need to be configured for NTASKS if you are running in batch. You can use NTASKS=1, but since CMTASK will behave as if you specified NTASKS=2, you need to ensure that you can operate with NTASKS=2 (or more) correctly (eg use reentrant ADALNKR, not ADAUSER and use shared nucleus).

---

<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:40pm UTC](https://techcommunity.softwareag.com/t/how-to-shut-down-nat-rpc-server-internally-nat315-entirex711/59711/3 "2021-04-02T14:40:00Z")

</div>


