# Processing rules on fields in a map in Natural

**URL:** <https://techcommunity.softwareag.com/t/processing-rules-on-fields-in-a-map-in-natural/240194>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [April 1, 2021, 8:41am UTC](https://techcommunity.softwareag.com/t/processing-rules-on-fields-in-a-map-in-natural/240194 "2021-04-01T08:41:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bertus56](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bertus56](https://techcommunity.softwareag.com/u/bertus56)\
**Post date:** [April 1, 2021, 8:41am UTC](https://techcommunity.softwareag.com/t/processing-rules-on-fields-in-a-map-in-natural/240194/1 "2021-04-01T08:41:55Z")

</div>

How do I code a processing rule on a map for an array - specifically concerning the index.  
If I manually change the index on each occurrence of the array - all the occurrences changes similarly.  
Example  
Rule \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Array STRT-MIN

> ```
> > + Rank 0 S 1 L 1 Report Mode
> 
> ```

ALL …+…10…+…+…+…30…+…+…+…50…+…+…+…70.  
0010 IF & (1) \> 59 THEN REINPUT ‘MAX MINUTES 59’ MARK \*& (1)

---

<div class="post-metadata">

**Author:** ![Nikolay\_Kuhta](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nikolay\_Kuhta](https://techcommunity.softwareag.com/u/Nikolay_Kuhta)\
**Post date:** [April 1, 2021, 3:54pm UTC](https://techcommunity.softwareag.com/t/processing-rules-on-fields-in-a-map-in-natural/240194/2 "2021-04-01T15:54:20Z")

</div>

Hi Bertus,  
Well, I used to do such things as follows (just an example)  
DEFINE DATA LOCAL  
1 #I (I4)  
END-DEFINE  
FOR #I = 1 TO 3  
IF & (#I) NOT = ‘22’  
REINPUT ‘22 is required’ MARK \*&(#I)  
END-IF  
END-FOR  
Hope this would help you 🙂

---

<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:** [March 19, 2024, 4:42pm UTC](https://techcommunity.softwareag.com/t/processing-rules-on-fields-in-a-map-in-natural/240194/3 "2024-03-19T16:42:15Z")

</div>

This topic was automatically closed after 1083 days. New replies are no longer allowed.
