# MODIFICATION  - Best Method / Example

**URL:** <https://techcommunity.softwareag.com/t/modification-best-method-example/188494>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Add-on-Products, Natural-Engineer, Natural-Other-Addons\
**Created:** [May 16, 2016, 5:13pm UTC](https://techcommunity.softwareag.com/t/modification-best-method-example/188494 "2016-05-16T17:13:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Mayor](https://avatars.discourse-cdn.com/v4/letter/c/5e9695/32.png) [@Chris\_Mayor](https://techcommunity.softwareag.com/u/Chris_Mayor)\
**Post date:** [May 16, 2016, 5:13pm UTC](https://techcommunity.softwareag.com/t/modification-best-method-example/188494/1 "2016-05-16T17:13:40Z")

</div>

I am attempting my first Modification exercise and would like to know the best way to achieve what I require

This code exists in many programs and needs amending.

Before Code

0580 \*  
0590 MOVE \*PROGRAM TO #PROGRAMA  
0600 CALL ‘C283MU’ #PROGRAMA  
0610 IF #PROGRAMA = ‘ERRORCON’  
0620 TERMINATE  
0630 END-IF  
0640 \*  
0650 ON ERROR  
0660 INCLUDE N90ERROR  
0670 END-ERROR  
0680 \*

After Code

0580 \*  
0590 \* MOVE \*PROGRAM TO #PROGRAMA  
0600 \* CALL ‘C283MU’ #PROGRAMA  
0610 \* IF #PROGRAMA = ‘ERRORCON’  
0620 \* TERMINATE  
0630 \* END-IF  
0640 \*  
0650 ON ERROR  
0660 \* INCLUDE N90ERROR  
0661 INCLUDE NMI9ERROR  
0670 END-ERROR  
0680 \*

I other words remove code 590 - 630 by commenting out

and replacing the INCLUDE object name at 660

I have set up impact analysis

Search Keyword…: MOVE

Search Value (Data Item/Lite  
\*PROGRAM\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
Y Data Item \_ Literal

Search Keyword…: CALL

Keyword Value (Cal  
C283MU\_\_\_\_\_\_\_\_\_\_\_\_  
Search Value (Data

* * *

```
 Y Data Item _

```

Search Keyword…: TERMINATE\_\_\_\_\_  
Object Name…: \_\_\_\_\_\_\_\_

Search Keyword…: IF\_\_\_\_\_  
Object Name…: \_\_\_\_\_\_\_

I have run Impact Analysis choosing I object I know contains this data

Choose M to modify on line the 1 object

and get the following

C T Line Attr Ext.Obj Element Name  
\_ A I 0590 \*PROGRAM  
\_ A K 0600 C283MU  
\_ A K 0620 TERMINATE

My IF statement is not found , but that is another query.

What is the best way to specify commenting out the found code ??

I have looked at the User Exit NEEUEX3,  
coding if statements looking for the code in lines 590 - 630 replacing the original with an \* in pos 1 of the line  
but not successful

This is the result of adding \* \*\* and \*\*\* in the replace value in the Modification Element Categorization screen.

0650 \* ---------------------------------------------------------------  
0660 \* TLMPAPRS - START  
0670 \* ---------------------------------------------------------------  
0680 \* PAPR Specific change to Comment out C283MU Processing  
0690 \* and change N90ERROR to MI9ERROR  
0700 \* ---------------------------------------------------------------  
0710 \* TLMAPAPRS- END  
0720 \* ---------------------------------------------------------------  
0730 \*  
0740 /\* MOVE _PROGRAM TO #PROGRAMA /_ NEE OLD CODE  
0750 MOVE \*\* TO #PROGRAMA /\* NEE MODIFIED AUTO  
0760 /\* CALL ‘C283MU’ #PROGRAMA /\* NEE OLD CODE  
0770 CALL '_’ #PROGRAMA / NEE MODIFIED AUTO  
0780 IF #PROGRAMA = ‘ERRORCON’  
0790 / TERMINATE /_ NEE OLD CODE  
0800 ESCAPE ROUTINE /\* NEE MODIFIED AUTO  
0810 END-IF

Have I missed something simple that allows me to comment out a block of code.

All help greatly appreciated.

Chris.

---

<div class="post-metadata">

**Author:** ![Graham\_Axtell](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Graham\_Axtell](https://techcommunity.softwareag.com/u/Graham_Axtell)\
**Post date:** [May 17, 2016, 11:44am UTC](https://techcommunity.softwareag.com/t/modification-best-method-example/188494/2 "2016-05-17T11:44:58Z")

</div>

Hi Chris,

NEE Modification is generally performed on a line basis therefore to comment out blocks is not really feasible using standard NEE.

However you could use Similar Code which is accessed from Advanced Services-\>Refactoring-\>Componentization. This will identify similar source code structures within objects. You could then specify a TLM which only has e.g. a comment in it. The similar code modification would comment out each block of code and effectively add the TLM comment after.

You could then re-extract and load the modified code into a different NEE library and run a standard impact analysis to replace the INCLUDE line.

Hope this helps a bit,

Graham.

---

<div class="post-metadata">

**Author:** ![Chris\_Mayor](https://avatars.discourse-cdn.com/v4/letter/c/5e9695/32.png) [@Chris\_Mayor](https://techcommunity.softwareag.com/u/Chris_Mayor)\
**Post date:** [May 17, 2016, 5:01pm UTC](https://techcommunity.softwareag.com/t/modification-best-method-example/188494/3 "2016-05-17T17:01:08Z")

</div>

Thanks Graham, Currently using mainframe V8.2.3.2 so haven’t been able to find Advanced Services-\>Refactoring-\>Componentization

What is needed is “Comment Out Line” function - jut simply put an '\* ’ in front of an existing line identified by an Impact Criteria.

I have been doing further experimentation using TLMDYNAM, but that is amending a MOVE statement to ASSIGN

here is the result of 1 attempt

0590 /\* MOVE _PROGRAM TO #PROGRAMA /_ NEE OLD CODE  
0600 /\* ----------------------------------------------------------------  
0600 /\*  
0600 /\* Sample TLM to show dynamic replacement of operands.  
0600 /\* This example shows how to use dynamic operand replacement to conv  
0600 /\* all MOVE statements to ASSIGNS  
0600 /\*  
0600 /\* Impact Criteria = MOVE with replacement TLM set of TLMDYNAM  
0600 /\*  
0600 /\* Up to 10 dynamic operands per statement may be specified.  
0600 /\* Conditional logic is specified via _NEE XX-OPERn and closed via  
0600 / NEE BLOCK-END  
0600 /  
0600 / START OF TLMDYNAM  
0600 /_  
0600 /\* ----------------------------------------------------------------  
0600 ASSIGN #PROGRAMA = _PROGRAM  
0600 /_ ----------------------------------------------------------------  
0600 /\* END OF TLMDYNAM  
0600 /\* ----------------------------------------------------------------

works to an extent except for the 0600 ASSIGN #PROGRAMA = \*PROGRAM which I don’t want, and seems to be the result of TLMDYNAM

and also

0620 /\* TERMINATE /\* NEE OLD CODE  
0630 /\* ----------------------------------------------------------------  
0630 /\*  
0630 /\* Sample TLM to show dynamic replacement of operands.  
0630 /\* This example shows how to use dynamic operand replacement to conv  
0630 /\* all MOVE statements to ASSIGNS  
0630 /\*  
0630 /\* Impact Criteria = MOVE with replacement TLM set of TLMDYNAM  
0630 /\*  
0630 /\* Up to 10 dynamic operands per statement may be specified.  
0630 /\* Conditional logic is specified via _NEE XX-OPERn and closed via  
0630 / NEE BLOCK-END  
0630 /  
0630 / START OF TLMDYNAM  
0630 /_  
0630 /\* ----------------------------------------------------------------  
0630 ASSIGN =  
0630 /\* ----------------------------------------------------------------  
0630 /\* END OF TLMDYNAM

works to an extent except for the 0630 ASSIGN = which I don’t want, and seems to be the result of TLMDYNAM

Looking at the docco I see

TLM Data  
Data for passing to the TLM. The modification process will move the value into the TLM Data field. TLM data field is XX-TLM.

but I don’t see any XX-TLM in TLMDYNAM.

Had success as below with CALL Key word

/\* CALL ‘C283MU’ #PROGRAMA /\* NEE OLD CODE

- CALL ‘C283MU’ #PROGRAMA /\* NEE MODIFIED AUTO

by using KEYWORD replace with \* CALL, but can’t seem to be able to the same for MOVE or IF

MFISRM02 - Impact Criteria - Application: PAPRBKP  
Version: 01  
Search Keyword…: CALL\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
Object Name…: \_\_\_\_\_\_\_\_

Keyword Value (Call Name)  
C283MU\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
Search Value (Data Item/Literal/Definition)

* * *

```
 Y Data Item _ Literal _ Definition _ Parameter                           
             _ Word _ Case                                                

```

Replace Value…:

* * *

```
             Y Data Item _ Literal                                        

```

MFIEMM03 - Impact Element Categorization - Application: PAPRBKP  
Version: 01  
Object: N03PR6A Page: 1  
Field : C283MU  
Attr : Impact Type: Keyword Ext. Object:

Search Criteria: Searching All Objects for CALL C283MU , replace keyword  
with \* CALL

```
Stmt Source Line                                                          
0600 CALL 'C283MU' #PROGRAMA                                              

```

I can probably use TLNDYNAM or the like if I could understand the documentation in the manual 🙂

any chance you could provide more insight in to that area for me please

Regards, and to Brian

Chris.

---

<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:36pm UTC](https://techcommunity.softwareag.com/t/modification-best-method-example/188494/4 "2021-04-02T15:36:02Z")

</div>


