# strange problem with error 3113

**URL:** <https://techcommunity.softwareag.com/t/strange-problem-with-error-3113/76605>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [April 23, 2008, 2:58pm UTC](https://techcommunity.softwareag.com/t/strange-problem-with-error-3113/76605 "2008-04-23T14:58:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [April 23, 2008, 2:58pm UTC](https://techcommunity.softwareag.com/t/strange-problem-with-error-3113/76605/1 "2008-04-23T14:58:15Z")

</div>

I don’t understand how ISN-REK(S,1) may be wrong in line:  
GET SW ISN-REK(S,1)  
?

```auto

1 SW VIEW OF XXXX1
...
1 SW2 VIEW OF XXXX1
...
    FOR S=1 TO 2                                     
        IF ISN-REK(S,1) EQ 0                    
          ESCAPE BOTTOM                                
        END-IF                                         
*                                                    
        /* IS GOOD ?
        RESET #ISN-OK                                  
        READ (1) SW2 BY ISN = ISN-REK(S,1)     
          #ISN-OK := TRUE                              
        END-READ                                       
        IF NOT #ISN-OK                                 
          ESCAPE TOP /* NEXT ONE
        END-IF                                         
*                                                    
        GET SW ISN-REK(S,1) <--- ERROR 3113
        ...
    END-FOR
```

---

<div class="post-metadata">

**Author:** ![Aldo\_Teusch](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/aldo_teusch/32/87_2.png) [@Aldo\_Teusch](https://techcommunity.softwareag.com/u/Aldo_Teusch)\
**Post date:** [April 23, 2008, 7:24pm UTC](https://techcommunity.softwareag.com/t/strange-problem-with-error-3113/76605/2 "2008-04-23T19:24:37Z")

</div>

Hi mun1ek,

As I understand you should receive a syntax error because array notation is not allowed for this operand in a GET statement.

Aldo

---

<div class="post-metadata">

**Author:** ![Jerome\_LeBlanc](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/jerome_leblanc/32/111_2.png) [@Jerome\_LeBlanc](https://techcommunity.softwareag.com/u/Jerome_LeBlanc)\
**Post date:** [April 23, 2008, 7:43pm UTC](https://techcommunity.softwareag.com/t/strange-problem-with-error-3113/76605/3 "2008-04-23T19:43:05Z")

</div>

Your READ (1) loop will read one record from the file starting from ISN-REK. This does not assure that ISN-REK is valid, it may be reading the next higher ISN.

Your “is good” logic should look like this:

```auto
        /* IS GOOD ?
        RESET #ISN-OK                                 
        READ (1) SW2 BY ISN = ISN-REK(S,1)   
          IF *ISN = ISN-REK(S,1)  
            #ISN-OK := TRUE                             
          END-IF
        END-READ                                       
```

There are other ways to code this, but that should eliminate the 3113 errors.

---

<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:49pm UTC](https://techcommunity.softwareag.com/t/strange-problem-with-error-3113/76605/4 "2021-04-02T14:49:23Z")

</div>


