# Call two helproutines for one map field

**URL:** <https://techcommunity.softwareag.com/t/call-two-helproutines-for-one-map-field/205596>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [September 20, 2019, 6:34am UTC](https://techcommunity.softwareag.com/t/call-two-helproutines-for-one-map-field/205596 "2019-09-20T06:34:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mun1ek\_2](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mun1ek\_2](https://techcommunity.softwareag.com/u/mun1ek_2)\
**Post date:** [September 20, 2019, 6:34am UTC](https://techcommunity.softwareag.com/t/call-two-helproutines-for-one-map-field/205596/1 "2019-09-20T06:34:42Z")

</div>

I have field on map and on some conditional i need to call HELP1 and on another conditional HELP2 helproutine. Is this possible? I’ve tried call from assigned to field MAINHELP call another helproutine by INPUT #F (HE=‘HELP1’) but it shows input… Any idea?

---

<div class="post-metadata">

**Author:** ![George\_Cooper](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/george_cooper/32/7831_2.png) [@George\_Cooper](https://techcommunity.softwareag.com/u/George_Cooper)\
**Post date:** [September 20, 2019, 11:23am UTC](https://techcommunity.softwareag.com/t/call-two-helproutines-for-one-map-field/205596/2 "2019-09-20T11:23:21Z")

</div>

I’m a bit rusty on HELPROUTINES, and not currently on a mainframe, but I saw an old tip about using a variable name to dynamically assign the desired HELPROUTINE name.

I think it would work like this, but no guarantees.

1 #HELPRTN (A8 )

IF condition 1 is true  
MOVE ‘HELP1’ TO #HELPRTN  
ELSE  
MOVE ‘HELP2’ TO #HELPRTN  
END-IF

INPUT #FLD1 (HE=#HELPRTN) /\* No quotes means its a variable name, not a HELPROUTINE name.

Hope that helps,  
George

---

<div class="post-metadata">

**Author:** ![mun1ek\_2](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mun1ek\_2](https://techcommunity.softwareag.com/u/mun1ek_2)\
**Post date:** [September 25, 2019, 11:56am UTC](https://techcommunity.softwareag.com/t/call-two-helproutines-for-one-map-field/205596/3 "2019-09-25T11:56:32Z")

</div>

Finally i converted my helproutines to subroutines

---

<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:43pm UTC](https://techcommunity.softwareag.com/t/call-two-helproutines-for-one-map-field/205596/4 "2021-04-02T15:43:33Z")

</div>


