# Previous Program System Variable

**URL:** <https://techcommunity.softwareag.com/t/previous-program-system-variable/101135>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [August 2, 2012, 10:34pm UTC](https://techcommunity.softwareag.com/t/previous-program-system-variable/101135 "2012-08-02T22:34:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kirk\_Stedem](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Kirk\_Stedem](https://techcommunity.softwareag.com/u/Kirk_Stedem)\
**Post date:** [August 2, 2012, 10:34pm UTC](https://techcommunity.softwareag.com/t/previous-program-system-variable/101135/1 "2012-08-02T22:34:00Z")

</div>

Is there a system variable that can be used to determine the previous program that called a subprogram? I am looking for a way to determine the calling program or subprogram that just called the subprogram that I am working on. Over 70 modules are calling the subprogram. In other words, if the calling program is DFPOACEA and the subprogram is DFNRO096, is there a system variable that I can use to make decisions on that gives me the calling program name of DFPOACEA?

---

<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:** [August 2, 2012, 11:44pm UTC](https://techcommunity.softwareag.com/t/previous-program-system-variable/101135/2 "2012-08-02T23:44:46Z")

</div>

No, there is no system variable, but check out  
USR0600N and USR4214N in lib SYSEXT, these  
subprograms provide “call stack” information.

---

<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:02pm UTC](https://techcommunity.softwareag.com/t/previous-program-system-variable/101135/3 "2021-04-02T15:02:15Z")

</div>


