# How to get an INPUT ALFAVAR (AD=MYRT'\_') right justified?

**URL:** <https://techcommunity.softwareag.com/t/how-to-get-an-input-alfavar-ad-myrt-right-justified/238334>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [January 27, 2021, 8:03pm UTC](https://techcommunity.softwareag.com/t/how-to-get-an-input-alfavar-ad-myrt-right-justified/238334 "2021-01-27T20:03:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javier\_Gonzalez2](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/javier_gonzalez2/32/6988_2.png) [@Javier\_Gonzalez2](https://techcommunity.softwareag.com/u/Javier_Gonzalez2)\
**Post date:** [January 27, 2021, 8:03pm UTC](https://techcommunity.softwareag.com/t/how-to-get-an-input-alfavar-ad-myrt-right-justified/238334/1 "2021-01-27T20:03:52Z")

</div>

I would get my ALFAVAR(A2) right justified .

RESET CV-VAR  
INPUT ALFAVAR (AD=MYRT’\_’ CV=CV-VAR) → (ALFAVAR='1 ')  
DISPLAY ALFAVAR (EM=H(2)) —\> (F140) Left just  
END

How can I get (40F1) right justified ?

---

<div class="post-metadata">

**Author:** ![wolfgang.winter](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/wolfgang.winter/32/17954_2.png) [@wolfgang.winter](https://techcommunity.softwareag.com/u/wolfgang.winter)\
**Post date:** [January 27, 2021, 8:25pm UTC](https://techcommunity.softwareag.com/t/how-to-get-an-input-alfavar-ad-myrt-right-justified/238334/2 "2021-01-27T20:25:42Z")

</div>

As long as you do not modify the value on the screen the variable will not change.  
Try to modify it to ’ 2’ and you will see it will print as 40F2.

When you enter just ‘2’ you will get F240 as well, because AD=R only affects the on-screen display value, nothing else.

If you require it right justified at any rate you will need to MOVE RIGHT after the INPUT.

---

<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 27, 2021, 8:26pm UTC](https://techcommunity.softwareag.com/t/how-to-get-an-input-alfavar-ad-myrt-right-justified/238334/3 "2021-04-27T20:26:02Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
