MODIFICATION - Best Method / Example

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.

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.

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 :slight_smile:

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

Regards, and to Brian

Chris.