Skip to content

MvIMPORTSTOP#


An loop can be explicitly halted using the <MvIMPORTSTOP>. Execution jumps to the code following the closing tag.

Syntax
<MvIMPORTSTOP> 

Importing can be halted explicitly inside an <MvIMPORT> loop using the <MvIMPORTSTOP> tag. The program jumps to the code following the </MvIMPORT> tag, without reading any more input from the data file.

Example#

The example below terminates the loop when an error is detected.

<MvIMPORT FILE = "{ g.ProductImport_File }"
          FIELDS = "l.line"
          DELIMITER = "">

    ... when processing the file an error is discovered ...

    <MvIF EXPR = "{ g.error }">
        <MvEVAL EXPR = "{ g.error }">
        <MvIMPORTSTOP>
    </MvIF>
</MvIMPORT>