# Executing a program in natural editor

**URL:** <https://techcommunity.softwareag.com/t/executing-a-program-in-natural-editor/175045>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [March 14, 2014, 1:21am UTC](https://techcommunity.softwareag.com/t/executing-a-program-in-natural-editor/175045 "2014-03-14T01:21:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vidya\_Raghavan](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vidya\_Raghavan](https://techcommunity.softwareag.com/u/Vidya_Raghavan)\
**Post date:** [March 14, 2014, 1:21am UTC](https://techcommunity.softwareag.com/t/executing-a-program-in-natural-editor/175045/1 "2014-03-14T01:21:29Z")

</div>

Hi

I am very new to Natural and am trying to execute a program in the natural editor using the Create object option:  
in the below screen :

```
         Code Function                                  
                                                          
           C Create Object                             
           E Edit Object                               
           R Rename Object                             
           D Delete Object                             
           X Execute Program                           
           L List Object(s)                            
           S List Subroutines Used                     
           ? Help                                      
           . Exit                                      
                                                          
   Code .. _ Type .. _                                 
                Name .. ________________________________  

```

I created the program which is to read a file using the ISN of a record and display 2 fields and saved it.

For example consider this code for reading the file which has the DDM name EMPLOYEE

> ```
> > + Program TEST   
> 
> ```

All …+…1…+…2…+…3…+…4…+…5…+…  
0010 DEFINE DATA LOCAL  
0020 1 EMPLOYEE VIEW OF EMPLOYEE  
0030 2 EMPLOYEE-NAME  
0040 2 EMPLOYEE-ID  
0050 END-DEFINE  
0060 READ (1) EMPLOYEE WITH ISN = 123456  
0070 DISPLAY EMPLOYEE EMPLOYEE-ID  
0080 END-READ  
0090 END  
[/code]

The check command shows that there are no syntax errors  
However when I try to execute this program using the X option , I get the foll error :

```
                 ERROR: 0082                               
                 PROGRAM: TEST                               
                 ERROR LINE: 0000                               
                 STATUS: C             

```

Can someone help!

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [March 14, 2014, 6:47am UTC](https://techcommunity.softwareag.com/t/executing-a-program-in-natural-editor/175045/2 "2014-03-14T06:47:00Z")

</div>

You cannot EXECUTE a source module. First you need to create a compiled object. Typically this is done with the STOW command (which also saves the source).

For a quick test, you can RUN the source. This gives the same result as EXECUTE, but is a compile-and-go.

---

<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:30pm UTC](https://techcommunity.softwareag.com/t/executing-a-program-in-natural-editor/175045/3 "2021-04-02T15:30:33Z")

</div>


