N command code

The N command code prevents you from replacing a segment on a path call. If you use the N command code with the D command code, the application program can process multiple segments by using one call. The D command code alone retrieves a path of segments in your I/O area. However, you can determine which segments that you want to replace by using the N command code with the D command code.

For example, the following code only replaces the TREATMNT segment.
GHU    PATIENT*D(PATNObbb=b06439)
       ILLNESSb*D(ILLDATEb=19930301)
       TREATMNT
REPL   PATIENT*N(PATNObbb=b06439)
       ILLNESSb*N(ILLDATEb=19930301)
       TREATMNT
Restriction: If you use D and N command codes together, IMS retrieves the segment but does not replace it.

The N command code applies only to REPL calls, and IMS ignores it if you include the code in any other call.